From a4185f80d2158560a546d0f46e8d4caab9ff6e43 Mon Sep 17 00:00:00 2001 From: Lukas Bezdicka Date: Mon, 17 Jul 2023 11:43:05 +0200 Subject: [PATCH] [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 --- .../podman/podman-baremetal-ansible.yaml | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/deployment/podman/podman-baremetal-ansible.yaml b/deployment/podman/podman-baremetal-ansible.yaml index 123bd9ac0f..5e5721676b 100644 --- a/deployment/podman/podman-baremetal-ansible.yaml +++ b/deployment/podman/podman-baremetal-ansible.yaml @@ -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: