Merge "Unset default value for the DockerCephDaemonImage" into stable/pike
[apex-tripleo-heat-templates.git] / puppet / services / pacemaker / cinder-volume.yaml
index 1b0770f..f467587 100644 (file)
@@ -1,9 +1,13 @@
-heat_template_version: ocata
+heat_template_version: pike
 
 description: >
   OpenStack Cinder Volume service with Pacemaker configured with Puppet
 
 parameters:
+  ServiceData:
+    default: {}
+    description: Dictionary packing service data
+    type: json
   ServiceNetMap:
     default: {}
     description: Mapping of service_name -> network name. Typically set
@@ -32,6 +36,7 @@ resources:
   CinderVolumeBase:
     type: ../cinder-volume.yaml
     properties:
+      ServiceData: {get_param: ServiceData}
       ServiceNetMap: {get_param: ServiceNetMap}
       DefaultPasswords: {get_param: DefaultPasswords}
       EndpointMap: {get_param: EndpointMap}
@@ -54,3 +59,24 @@ outputs:
             cinder::host: hostgroup
       step_config:
         include ::tripleo::profile::pacemaker::cinder::volume
+      upgrade_tasks:
+        - name: Stop cinder_volume service (pacemaker)
+          tags: step1
+          pacemaker_resource:
+            resource: openstack-cinder-volume
+            state: disable
+            wait_for_resource: true
+        - name: get bootstrap nodeid
+          tags: step5
+          command: hiera bootstrap_nodeid
+          register: bootstrap_node
+        - block:
+          - name: Sync cinder DB
+            tags: step5
+            command: cinder-manage db sync
+          - name: Start cinder_volume service (pacemaker)
+            tags: step5
+            pacemaker_resource:
+              resource: openstack-cinder-volume
+              state: enable
+          when: bootstrap_node.stdout == ansible_hostname