Merge "Consistent hostname format env for split-stack"
[apex-tripleo-heat-templates.git] / docker / services / heat-api-cfn.yaml
index aff0f1a..7061289 100644 (file)
@@ -125,8 +125,25 @@ outputs:
             path: /var/log/containers/heat
             state: directory
       upgrade_tasks:
-        - name: Stop and disable heat_api_cfn service
+        - name: Check if heat_api_cfn is deployed
+          command: systemctl is-enabled openstack-heat-api-cfn
+          tags: common
+          ignore_errors: True
+          register: heat_api_cfn_enabled
+        - name: check for heat_api_cfn running under apache (post upgrade)
           tags: step2
-          service: name=httpd state=stopped enabled=no
+          shell: "httpd -t -D DUMP_VHOSTS | grep -q heat_api_cfn_wsgi"
+          register: heat_api_cfn_apache
+          ignore_errors: true
+          changed_when: false
+          check_mode: no
+        - name: Stop heat_api_cfn service (running under httpd)
+          tags: step2
+          service: name=httpd state=stopped
+          when: heat_api_cfn_apache.rc == 0
+        - name: Stop and disable heat_api_cfn service (pre-upgrade not under httpd)
+          tags: step2
+          service: name=openstack-heat-api-cfn state=stopped enabled=no
+          when: heat_api_cfn_enabled.rc == 0
       metadata_settings:
         get_attr: [HeatBase, role_data, metadata_settings]