Merge "Add all existing parameter mismatches to exclusion list"
[apex-tripleo-heat-templates.git] / docker / services / neutron-api.yaml
index f7fef86..a9125c8 100644 (file)
@@ -15,6 +15,10 @@ parameters:
     description: Mapping of service endpoint -> protocol. Typically set
                  via parameter_defaults in the resource registry.
     type: json
+  ServiceData:
+    default: {}
+    description: Dictionary packing service data
+    type: json
   ServiceNetMap:
     default: {}
     description: Mapping of service_name -> network name. Typically set
@@ -49,6 +53,7 @@ resources:
     type: ../../puppet/services/neutron-api.yaml
     properties:
       EndpointMap: {get_param: EndpointMap}
+      ServiceData: {get_param: ServiceData}
       ServiceNetMap: {get_param: ServiceNetMap}
       DefaultPasswords: {get_param: DefaultPasswords}
       RoleName: {get_param: RoleName}
@@ -158,8 +163,18 @@ outputs:
             path: /var/log/containers/neutron
             state: directory
       upgrade_tasks:
+        - name: Check if neutron_server is deployed
+          command: systemctl is-enabled neutron-server
+          tags: common
+          ignore_errors: True
+          register: neutron_server_enabled
+        - name: "PreUpgrade step0,validation: Check service neutron-server is running"
+          shell: /usr/bin/systemctl show 'neutron-server' --property ActiveState | grep '\bactive\b'
+          when: neutron_server_enabled.rc == 0
+          tags: step0,validation
         - name: Stop and disable neutron_api service
           tags: step2
+          when: neutron_server_enabled.rc == 0
           service: name=neutron-server state=stopped enabled=no
       metadata_settings:
         get_attr: [NeutronBase, role_data, metadata_settings]