From a3a7099a37663eaee15828c08b14f1212534de03 Mon Sep 17 00:00:00 2001 From: Lukas Bezdicka Date: Thu, 22 Nov 2018 14:53:16 +0100 Subject: [PATCH] Upgrades: Ensure idempotency of pacemaker services The fact is_bootstrap_node has to be always present regardless the state of containerization of the service. Change-Id: Ie39f753494d87b7cfab28d92fc6783db012cc10f Resolves: rhbz#1652205 Closes-Bug: #1804488 --- docker/services/pacemaker/cinder-backup.yaml | 6 +++--- docker/services/pacemaker/cinder-volume.yaml | 6 +++--- docker/services/pacemaker/manila-share.yaml | 6 +++--- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/docker/services/pacemaker/cinder-backup.yaml b/docker/services/pacemaker/cinder-backup.yaml index 789e6120f4..3617ac708d 100644 --- a/docker/services/pacemaker/cinder-backup.yaml +++ b/docker/services/pacemaker/cinder-backup.yaml @@ -324,14 +324,14 @@ outputs: - name: Set fact cinder_backup_pcs_res set_fact: cinder_backup_pcs_res: "{{cinder_backup_pcs_res_result|succeeded}}" + - name: set is_bootstrap_node fact + tags: common + set_fact: is_bootstrap_node={{cinder_backup_short_bootstrap_node_name|lower == ansible_hostname|lower}} - name: Cinder-Backup baremetal to container upgrade tasks when: - step|int == 1 - not cinder_backup_containerized|bool block: - - name: set is_bootstrap_node fact - tags: common - set_fact: is_bootstrap_node={{cinder_backup_short_bootstrap_node_name|lower == ansible_hostname|lower}} - name: Check cluster resource status pacemaker_resource: resource: openstack-cinder-backup diff --git a/docker/services/pacemaker/cinder-volume.yaml b/docker/services/pacemaker/cinder-volume.yaml index 96b553b6a2..e94fe42bf2 100644 --- a/docker/services/pacemaker/cinder-volume.yaml +++ b/docker/services/pacemaker/cinder-volume.yaml @@ -290,14 +290,14 @@ outputs: - name: Set fact cinder_volume_pcs_res set_fact: cinder_volume_pcs_res: "{{cinder_volume_pcs_res_result|succeeded}}" + - name: set is_bootstrap_node fact + tags: common + set_fact: is_bootstrap_node={{cinder_volume_short_bootstrap_node_name|lower == ansible_hostname|lower}} - name: Cinder-Volume baremetal to container upgrade tasks when: - step|int == 1 - not cinder_volume_containerized|bool block: - - name: set is_bootstrap_node fact - tags: common - set_fact: is_bootstrap_node={{cinder_volume_short_bootstrap_node_name|lower == ansible_hostname|lower}} - name: Check cluster resource status pacemaker_resource: resource: openstack-cinder-volume diff --git a/docker/services/pacemaker/manila-share.yaml b/docker/services/pacemaker/manila-share.yaml index 250a62c678..73b28a8fe9 100644 --- a/docker/services/pacemaker/manila-share.yaml +++ b/docker/services/pacemaker/manila-share.yaml @@ -291,14 +291,14 @@ outputs: - name: Set fact manila_share_pcs_res set_fact: manila_share_pcs_res: "{{manila_share_pcs_res_result|succeeded}}" + - name: set is_bootstrap_node fact + tags: common + set_fact: is_bootstrap_node={{manila_share_short_bootstrap_node_name|lower == ansible_hostname|lower}} - name: Manila-Share baremetal to container upgrade tasks when: - step|int == 1 - not manila_share_containerized|bool block: - - name: set is_bootstrap_node fact - tags: common - set_fact: is_bootstrap_node={{manila_share_short_bootstrap_node_name|lower == ansible_hostname|lower}} - name: Check cluster resource status pacemaker_resource: resource: openstack-manila-share