Merge "Remove nova placement config for compute service node on upgrade"
[apex-tripleo-heat-templates.git] / puppet / services / pacemaker / cinder-volume.yaml
index d5dedf3..39914db 100644 (file)
@@ -1,4 +1,4 @@
-heat_template_version: 2016-04-08
+heat_template_version: pike
 
 description: >
   OpenStack Cinder Volume service with Pacemaker configured with Puppet
@@ -13,6 +13,14 @@ parameters:
   DefaultPasswords:
     default: {}
     type: json
+  RoleName:
+    default: ''
+    description: Role name on which the service is applied
+    type: string
+  RoleParameters:
+    default: {}
+    description: Parameters specific to the role
+    type: json
   EndpointMap:
     default: {}
     description: Mapping of service endpoint -> protocol. Typically set
@@ -27,6 +35,8 @@ resources:
       ServiceNetMap: {get_param: ServiceNetMap}
       DefaultPasswords: {get_param: DefaultPasswords}
       EndpointMap: {get_param: EndpointMap}
+      RoleName: {get_param: RoleName}
+      RoleParameters: {get_param: RoleParameters}
 
 outputs:
   role_data:
@@ -34,10 +44,28 @@ outputs:
     value:
       service_name: cinder_volume
       monitoring_subscription: {get_attr: [CinderVolumeBase, role_data, monitoring_subscription]}
+      logging_source: {get_attr: [CinderVolumeBase, role_data, logging_source]}
+      logging_groups: {get_attr: [CinderVolumeBase, role_data, logging_groups]}
       config_settings:
         map_merge:
           - get_attr: [CinderVolumeBase, role_data, config_settings]
           - cinder::volume::manage_service: false
             cinder::volume::enabled: false
+            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: 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