Make Galera desync operation more resilient

Sometimes, after a hard reboot of a controller node the Galera database
is up&running but not yet able to receive requests via the mysql.sock
socket, even if it is already opened. It takes few seconds to get it
working, but during that time, we should keep retrying the desync
operation until it connects to the database.

Closes-Bug: #1945639

Change-Id: I71fe4c14195ebcf11912753425ea15bc679b14f9
This commit is contained in:
Juan Larriba 2021-09-30 14:45:03 +02:00
parent 2c61c01329
commit d2eb1ffcbf
1 changed files with 4 additions and 0 deletions

View File

@ -109,6 +109,10 @@
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'"
register: desync_output
retries: 300
delay: 5
until: not desync_output.stderr
when:
- mysql_password.stderr is defined
- enabled_galera