Backup and Restore playbook is not 100% idempotent when running in snapshot mode

This fix a small issue that can happen when the user directly cancels
the execution of the playbook when the rear backup is happening. After
that, the node remains disconnected from pacemaker and it is necessary
to add it back to the cluster so the mysql-galera container is running
when we do the mysql dump.

As the pcs cluster start is an idempotent command in itself, we do not
need to perform a verification check before running it nor it will
generate errors (return 1) when ran if it was already running.

Closes-Bug: #1934897

Change-Id: I9a425665f4714751d8b1a0bd381533e4c383df9d
(cherry picked from commit aa93f9d7a0)
(cherry picked from commit a22d8d9817)
This commit is contained in:
Juan Larriba 2021-07-07 15:30:04 +02:00
parent 051b87d28b
commit a1ae19060b
1 changed files with 8 additions and 2 deletions

View File

@ -58,6 +58,14 @@
tags: tags:
- bar_create_recover_image - bar_create_recover_image
- name: Ensure the node is back into the cluster
command: pcs cluster start
when:
- enabled_galera
- tripleo_backup_and_restore_enable_snapshots|bool
tags:
- bar_create_recover_image
- name: Wait until pacemaker has Galera up&running - name: Wait until pacemaker has Galera up&running
shell: | shell: |
set -o pipefail set -o pipefail
@ -68,8 +76,6 @@
delay: 5 delay: 5
when: when:
- enabled_galera - enabled_galera
- tripleo_backup_and_restore_service_manager|bool
- not tripleo_backup_and_restore_enable_snapshots|bool
tags: tags:
- bar_create_recover_image - bar_create_recover_image