aboutsummaryrefslogtreecommitdiffstats
path: root/docker/services/pacemaker/cinder-volume.yaml
diff options
context:
space:
mode:
authormarios <marios@redhat.com>2017-07-04 16:52:26 +0300
committermarios <marios@redhat.com>2017-07-20 13:43:09 +0300
commitcdc3477b7780c751807fe18c3767762189cf03b4 (patch)
treef7ccb4445de9ad5fd22caaa06717193fd64acf39 /docker/services/pacemaker/cinder-volume.yaml
parenta34955d45135dc66477f2f162e76f9183762dd96 (diff)
Remove non-containerized pacemaker resources on upgrade
Adds upgrade_tasks to remove the pacemaker resources using the ansible-pacemaker module. Resources are disabled and removed in step2 (called only on bootstrap node) and then the cluster stop is moved to step3 The existing systemd/service call is kept but only to disable services after they are disabled/deleted from the cluster. Related-Bug: 1701485 Co-Authored-By: Damien Ciabrini <dciabrin@redhat.com> Change-Id: Ia597d240ea5834c50a8f6c4fac0b6ed417b8535c
Diffstat (limited to 'docker/services/pacemaker/cinder-volume.yaml')
-rw-r--r--docker/services/pacemaker/cinder-volume.yaml28
1 files changed, 26 insertions, 2 deletions
diff --git a/docker/services/pacemaker/cinder-volume.yaml b/docker/services/pacemaker/cinder-volume.yaml
index d016cf83..262e999d 100644
--- a/docker/services/pacemaker/cinder-volume.yaml
+++ b/docker/services/pacemaker/cinder-volume.yaml
@@ -157,6 +157,30 @@ outputs:
executable: /bin/bash
creates: /dev/loop2
upgrade_tasks:
- - name: Stop and disable cinder_volume service
+ - name: get bootstrap nodeid
+ tags: common
+ command: hiera -c /etc/puppet/hiera.yaml bootstrap_nodeid
+ register: bootstrap_node
+ - name: set is_bootstrap_node fact
+ tags: common
+ set_fact: is_bootstrap_node={{bootstrap_node.stdout|lower == ansible_hostname|lower}}
+ - name: Disable the openstack-cinder-volume cluster resource
tags: step2
- service: name=openstack-cinder-volume state=stopped enabled=no
+ pacemaker_resource:
+ resource: openstack-cinder-volume
+ state: disable
+ wait_for_resource: true
+ when: is_bootstrap_node
+ - name: Delete the stopped openstack-cinder-volume cluster resource.
+ tags: step2
+ pacemaker_resource:
+ resource: openstack-cinder-volume
+ state: delete
+ wait_for_resource: true
+ when: is_bootstrap_node
+ - name: Disable cinder_volume service from boot
+ tags: step2
+ service: name=openstack-cinder-volume enabled=no
+
+
+