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
This commit is contained in:
Juan Larriba 2021-07-07 15:30:04 +02:00
parent 947a59d0a3
commit aa93f9d7a0
1 changed files with 8 additions and 2 deletions

View File

@ -56,6 +56,14 @@
tags:
- 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
shell: |
set -o pipefail
@ -66,8 +74,6 @@
delay: 5
when:
- enabled_galera
- tripleo_backup_and_restore_service_manager|bool
- not tripleo_backup_and_restore_enable_snapshots|bool
tags:
- bar_create_recover_image