Add pacemaker composable upgrade steps
authorMathieu Bultel <mbultel@redhat.com>
Fri, 25 Nov 2016 10:46:53 +0000 (11:46 +0100)
committerMathieu Bultel <mbultel@redhat.com>
Thu, 2 Feb 2017 14:54:06 +0000 (15:54 +0100)
This review adds the pacemaker ansible upgrade steps
into the pacemaker service manifest.

It makes use of the ansible-pacemaker module which for now
is at https://github.com/redhat-openstack/ansible-pacemaker

Change-Id: I33c798a198046d5f66e6b20f86080a8187dc208b

puppet/services/pacemaker.yaml

index a8a9fb9..9c85fce 100644 (file)
@@ -81,6 +81,10 @@ parameters:
         \[(?<pid>[^ ]*)\]
         (?<host>[^ ]*)
         (?<message>.*)$/
+  PacemakerResources:
+    type: comma_delimited_list
+    description: List of resources managed by pacemaker
+    default: ['rabbitmq','haproxy']
 
 outputs:
   role_data:
@@ -120,3 +124,14 @@ outputs:
         tripleo::profile::base::pacemaker::remote_authkey: {get_param: PacemakerRemoteAuthkey}
       step_config: |
         include ::tripleo::profile::base::pacemaker
+      upgrade_tasks:
+        - name: Stop pacemaker cluster
+          tags: step1
+          pacemaker_cluster: state=offline
+        - name: Start pacemaker cluster
+          tags: step4
+          pacemaker_cluster: state=online
+        - name: Check pacemaker resource
+          tags: step4
+          pacemaker_resource: state=started resource={{item}} check_mode=true wait_for_resource=true timeout=200
+          with_items: {get_param: PacemakerResources}