Switch from pacemaker standby to pacemaker stop

Currently, the "snapshots" backup is being taken after taking out one
node from the cluster using pcs node standby. The consequence of it is
that the standby property is also being backuped, so when the node is
restored, it appears as standby and it needs to be unstandby manually.

Switching to pcs cluster stop/pcs cluster start does not make the playbook take any
longer, nor it creates an impact on the time the vips take to be
migrated to a different node while provides the advantage that when the
node is restarted (during restore), pacemaker starts correctly without
any other manual step.

Not a clean cherry pick due to different naming of the role directory.

Change-Id: Ided482f7eaed8d5e1fac60679ef3ba07bda41c0c
(cherry picked from commit 0fb4873ca0)
(cherry picked from commit 76d61eaccb)
This commit is contained in:
Juan Larriba 2021-06-04 10:40:44 +02:00
parent 5daaeac04c
commit ad3daf7ee9
4 changed files with 6 additions and 3 deletions

View File

@ -33,7 +33,7 @@
- always
- name: Take this node out of pacemaker
command: pcs node standby
command: pcs cluster stop --request-timeout={{ tripleo_backup_and_restore_pcs_timeout }}
when:
- pacemaker_enabled
- tripleo_backup_and_restore_enable_snapshots|bool

View File

@ -16,7 +16,7 @@
#
# Start again pacemaker
- name: Add the node to the pacemaker cluster
command: pcs node unstandby
command: pcs cluster start
tags:
- bar_create_recover_image

View File

@ -81,3 +81,6 @@ tripleo_backup_and_restore_remove_default_cronjob: true
# Skip the ping test to the NFS server on rear setup
tripleo_backup_and_restore_skip_nfs_test: false
# How many seconds do we want to wait fir pcs cluster stop to finish
tripleo_backup_and_restore_pcs_timeout: 3600

View File

@ -62,7 +62,7 @@
- not tripleo_backup_and_restore_enable_snapshots|bool
- name: Pacemaker management
import_tasks: ../backup/tasks/pacemaker_unstandby.yml
import_tasks: ../backup/tasks/pacemaker_start.yml
when:
- pacemaker_enabled
- tripleo_backup_and_restore_enable_snapshots|bool