Merge "Online backup of the galera database must desynchronize the node before backup" into stable/train

This commit is contained in:
Zuul 2021-08-06 00:12:50 +00:00 committed by Gerrit Code Review
commit 025faac328
1 changed files with 26 additions and 0 deletions

View File

@ -104,6 +104,19 @@
tags:
- bar_create_recover_image
- name: Galera desync the MySQL node
shell: |
set -o pipefail
{{ tripleo_container_cli }} exec {{ tripleo_backup_and_restore_mysql_container }} bash -c "mysql -p -u root \
-p{{ mysql_password.stdout }} --execute 'SET GLOBAL wsrep_desync = ON'"
when:
- mysql_password.stderr is defined
- enabled_galera
- tripleo_backup_and_restore_enable_snapshots|bool or not tripleo_backup_and_restore_service_manager|bool
tags:
- bar_create_recover_image
no_log: "{{ tripleo_backup_and_restore_hide_sensitive_logs | bool }}"
- name: MySQL Grants backup
shell: |
set -o pipefail
@ -130,6 +143,19 @@
- bar_create_recover_image
no_log: "{{ not ((ansible_verbosity | int) >= 2) | bool }}"
- name: Galera sync the MySQL node
shell: |
set -o pipefail
{{ tripleo_container_cli }} exec {{ tripleo_backup_and_restore_mysql_container }} bash -c "mysql -p -u root \
-p{{ mysql_password.stdout }} --execute 'SET GLOBAL wsrep_desync = OFF'"
when:
- mysql_password.stderr is defined
- enabled_galera
- tripleo_backup_and_restore_enable_snapshots|bool or not tripleo_backup_and_restore_service_manager|bool
tags:
- bar_create_recover_image
no_log: "{{ tripleo_backup_and_restore_hide_sensitive_logs | bool }}"
- name: Pause mysql.
command: "{{ tripleo_container_cli }} pause {{ tripleo_backup_and_restore_mysql_container }}"
when: