Merge "Use the running MariaDB server image for backups"
This commit is contained in:
commit
a7311034d2
@ -120,10 +120,6 @@ mariadb_wsrep_extra_provider_options: []
|
|||||||
####################
|
####################
|
||||||
# Backups
|
# Backups
|
||||||
####################
|
####################
|
||||||
mariabackup_image: "{{ docker_registry ~ '/' if docker_registry else '' }}{{ docker_namespace }}/mariadb-server"
|
|
||||||
mariabackup_tag: "{{ mariadb_tag }}"
|
|
||||||
mariabackup_image_full: "{{ mariabackup_image }}:{{ mariabackup_tag }}"
|
|
||||||
|
|
||||||
mariadb_backup_host: "{{ groups[mariadb_shard_group][0] }}"
|
mariadb_backup_host: "{{ groups[mariadb_shard_group][0] }}"
|
||||||
mariadb_backup_database_schema: "PERCONA_SCHEMA"
|
mariadb_backup_database_schema: "PERCONA_SCHEMA"
|
||||||
mariadb_backup_database_user: "{% if mariadb_loadbalancer == 'haproxy' %}backup{% else %}{{ mariadb_shard_backup_user_prefix }}{{ mariadb_shard_id | string }}{% endif %}"
|
mariadb_backup_database_user: "{% if mariadb_loadbalancer == 'haproxy' %}backup{% else %}{{ mariadb_shard_backup_user_prefix }}{{ mariadb_shard_id | string }}{% endif %}"
|
||||||
|
@ -1,4 +1,13 @@
|
|||||||
---
|
---
|
||||||
|
- name: Get MariaDB container facts
|
||||||
|
become: true
|
||||||
|
kolla_container_facts:
|
||||||
|
container_engine: "{{ kolla_container_engine }}"
|
||||||
|
name:
|
||||||
|
- "{{ mariadb_services.mariadb.container_name }}"
|
||||||
|
check_mode: false
|
||||||
|
register: container_facts
|
||||||
|
|
||||||
- name: Taking {{ mariadb_backup_type }} database backup via Mariabackup
|
- name: Taking {{ mariadb_backup_type }} database backup via Mariabackup
|
||||||
become: true
|
become: true
|
||||||
kolla_container:
|
kolla_container:
|
||||||
@ -6,7 +15,10 @@
|
|||||||
command: "bash -c 'sudo -E kolla_set_configs && /usr/local/bin/kolla_mariadb_backup.sh'"
|
command: "bash -c 'sudo -E kolla_set_configs && /usr/local/bin/kolla_mariadb_backup.sh'"
|
||||||
common_options: "{{ docker_common_options }}"
|
common_options: "{{ docker_common_options }}"
|
||||||
detach: False
|
detach: False
|
||||||
image: "{{ mariabackup_image_full }}"
|
# NOTE(mgoddard): Try to use the same image as the MariaDB server container
|
||||||
|
# to avoid compatibility issues. See
|
||||||
|
# https://bugs.launchpad.net/kolla-ansible/+bug/2058644.
|
||||||
|
image: "{{ container_facts.mariadb.Image | default(mariadb_services.mariadb.image) }}"
|
||||||
name: "mariabackup"
|
name: "mariabackup"
|
||||||
restart_policy: oneshot
|
restart_policy: oneshot
|
||||||
remove_on_exit: True
|
remove_on_exit: True
|
||||||
|
15
releasenotes/notes/bug-2058644-1db8786303234787.yaml
Normal file
15
releasenotes/notes/bug-2058644-1db8786303234787.yaml
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
---
|
||||||
|
upgrade:
|
||||||
|
- |
|
||||||
|
MariaDB backup now uses the same image as the running MariaDB server. The
|
||||||
|
following variables relating to MariaDB backups are no longer used and have
|
||||||
|
been removed:
|
||||||
|
|
||||||
|
* ``mariabackup_image``
|
||||||
|
* ``mariabackup_tag``
|
||||||
|
* ``mariabackup_image_full``
|
||||||
|
fixes:
|
||||||
|
- |
|
||||||
|
Modifies the MariaDB procedure to use the same container image as the
|
||||||
|
running MariaDB server container. This should prevent compatibility issues
|
||||||
|
that may cause the backup to fail.
|
Loading…
Reference in New Issue
Block a user