Currently, the playbook stops the services and the pacemaker to perform the backup. If the backup fails for whatever reason, the playbook cannot run again and fails due to the services being down. This patch fixes the issue in two directions. First, by using the block-always ansible feature, we ensure that whenever an error happens, the playbook will restart the pacemaker and the services before exiting.
The second direction is on the execution itself. By controlling certain actions, we ensure that the backup will be succesful not matter what state the services and the pacemaker are when the playbook is ran. This ensures success even in the case an operator stops the ansible execution manually (which will not trigger the 'always' condition).
(cherry picked from commit 9a865d1769)
- assure we have docker installed
- fixed hiera call, which can be in /usr/bin/hiera,
/opt/puppetlabs/bin/hiera, or /bin/hiera
Co-authored-by: Sorin Sbarnea <firstname.lastname@example.org>
The current role for backup and restore will need service
management to insure that all running services on the nodes
are stopped and restarted in order to capture a consistent state.
This change also includes database dump functionality which will
allow the operator to create a clean backup of the database.