From b0caee4753efd5f5d0f769d73bb8826dc8466de2 Mon Sep 17 00:00:00 2001 From: Brendan Shephard Date: Thu, 5 Aug 2021 01:44:23 +0000 Subject: [PATCH] Revert change to use community pacemaker_cluster module The community pacemaker_cluster module is not in sync with the real pacemaker_cluster module causing failures. https://github.com/ansible-collections/community.general/blob/main/plugins/modules/clustering/pacemaker_cluster.py#L19-L39 vs https://github.com/redhat-openstack/ansible-pacemaker/blob/master/modules/pacemaker_cluster.py#L32-L58 This causes failures in the minor update process. Related: Ie96b3d35cea61370b1f98d7e060d696c4807c6b7 Closes-Bug: #1938967 Change-Id: Id65f0eef7249588d6038883f703d8e587826a4ac --- .../pacemaker/pacemaker-baremetal-puppet.yaml | 18 ++++++++++++------ .../podman/podman-baremetal-ansible.yaml | 5 ++++- 2 files changed, 16 insertions(+), 7 deletions(-) diff --git a/deployment/pacemaker/pacemaker-baremetal-puppet.yaml b/deployment/pacemaker/pacemaker-baremetal-puppet.yaml index 0e4f225504..607ad87e45 100644 --- a/deployment/pacemaker/pacemaker-baremetal-puppet.yaml +++ b/deployment/pacemaker/pacemaker-baremetal-puppet.yaml @@ -217,7 +217,10 @@ outputs: cluster_recreate: "{{ tripleo_transfer_flag_stat.stat.exists|bool }}" - name: Check pacemaker cluster running before upgrade tags: validation - community.general.pacemaker_cluster: state=online check_and_fail=true + # 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 check_and_fail=true async: 30 poll: 4 when: not cluster_recreate|bool @@ -293,13 +296,13 @@ outputs: when: step|int == 2 block: - name: Stop pacemaker cluster - community.general.pacemaker_cluster: state=offline + pacemaker_cluster: state=offline when: not cluster_recreate|bool - name: upgrade step 4 when: step|int == 4 block: - name: Start pacemaker cluster - community.general.pacemaker_cluster: state=online + pacemaker_cluster: state=online when: not cluster_recreate|bool external_upgrade_tasks: - when: @@ -322,7 +325,10 @@ outputs: update_tasks: - name: Check pacemaker cluster running before the minor update when: step|int == 0 # TODO(marios) disabling validations? - community.general.pacemaker_cluster: state=online check_and_fail=true + # 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 check_and_fail=true async: 30 poll: 4 - name: Move virtual IPs to another node before stopping pacemaker @@ -352,10 +358,10 @@ outputs: command: systemd-cat -t ha-shutdown /var/lib/container-config-scripts/pacemaker_mutex_shutdown.sh --acquire - name: Stop pacemaker cluster when: step|int == 1 - community.general.pacemaker_cluster: state=offline + pacemaker_cluster: state=offline - name: Start pacemaker cluster when: step|int == 4 - community.general.pacemaker_cluster: state=online + pacemaker_cluster: state=online - name: Release the cluster shutdown lock when: step|int == 4 command: systemd-cat -t ha-shutdown /var/lib/container-config-scripts/pacemaker_mutex_shutdown.sh --release diff --git a/deployment/podman/podman-baremetal-ansible.yaml b/deployment/podman/podman-baremetal-ansible.yaml index a7e230d8cb..d184b23727 100644 --- a/deployment/podman/podman-baremetal-ansible.yaml +++ b/deployment/podman/podman-baremetal-ansible.yaml @@ -211,7 +211,10 @@ outputs: path: /usr/sbin/pcs register: pcs_stat - name: Stop pacemaker cluster before stopping all docker containers - community.general.pacemaker_cluster: state=offline + # 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=offline when: pcs_stat.stat.exists - name: Destroy pacemaker cluster command: /usr/sbin/pcs cluster destroy