[ffwd3] Idempotency fix for pacemaker and leapp

The system_upgrade can be rerun and if we just blindly stop
pacemaker without restarting it it can cause errors when rerunning.

Change-Id: Ifcf9246bfa040fc672ff270297658fb62dfc3819
This commit is contained in:
Lukas Bezdicka 2023-07-17 11:43:05 +02:00
parent 3011e078ae
commit a4185f80d2

@ -223,6 +223,25 @@ outputs:
pacemaker_cluster: state=offline
when: pcs_stat.stat.exists
- name: system_upgrade_prepare step 5
tags:
- never
- system_upgrade
- system_upgrade_prepare
when:
- step|int == 5
block:
- name: Check if pcs is present
stat:
path: /usr/sbin/pcs
register: pcs_stat
- name: Start pacemaker cluster after reboot
# NOTE: We are intentionally not using the community version of
# pacemaker_cluster here due to variances between the two:
# https://bugs.launchpad.net/tripleo/+bug/1938967
pacemaker_cluster: state=online
when: pcs_stat.stat.exists
update_tasks:
- name: Force pre-fetch of container images
when: