Add upgrade tasks for heat over httpd
authorJuan Antonio Osorio Robles <jaosorior@redhat.com>
Mon, 6 Mar 2017 07:56:43 +0000 (09:56 +0200)
committerEmilien Macchi <emilien@redhat.com>
Fri, 10 Mar 2017 23:07:27 +0000 (23:07 +0000)
Change-Id: Ia7b8c41d4d8135f58661a74a4298f60abb251fbe

puppet/services/heat-api-cfn.yaml
puppet/services/heat-api-cloudwatch.yaml
puppet/services/heat-api.yaml

index dde0bac..418f497 100644 (file)
@@ -122,7 +122,16 @@ outputs:
           shell: /usr/bin/systemctl show 'openstack-heat-api-cfn' --property ActiveState | grep '\bactive\b'
           when: heat_api_cfn_enabled.rc == 0
           tags: step0,validation
-        - name: Stop heat_api_cfn service
+        - name: check for heat_api_cfn running under apache (post upgrade)
           tags: step1
-          when: heat_api_cfn_enabled.rc == 0
-          service: name=openstack-heat-api-cfn state=stopped
+          shell: "httpd -t -D DUMP_VHOSTS | grep -q heat_api_cfn_wsgi"
+          register: heat_api_cfn_apache
+          ignore_errors: true
+        - name: Stop heat_api_cfn service (running under httpd)
+          tags: step1
+          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: step1
+          when: heat_api_cfn_apache.rc == 0
+          service: name=openstack-heat-api-cfn state=stopped enabled=no
index fc2e9d9..6a80346 100644 (file)
@@ -106,7 +106,16 @@ outputs:
           shell: /usr/bin/systemctl show 'openstack-heat-api-cloudwatch' --property ActiveState | grep '\bactive\b'
           when: heat_api_cloudwatch_enabled.rc == 0
           tags: step0,validation
-        - name: Stop heat_api_cloudwatch service
+        - name: check for heat_api_cloudwatch running under apache (post upgrade)
+          tags: step1
+          shell: "httpd -t -D DUMP_VHOSTS | grep -q heat_api_cloudwatch_wsgi"
+          register: heat_api_cloudwatch_apache
+          ignore_errors: true
+        - name: Stop heat_api_cloudwatch service (running under httpd)
+          tags: step1
+          service: name=httpd state=stopped
+          when: "heat_api_cloudwatch_apache.rc == 0"
+        - name: Stop and disable heat_api_cloudwatch service (pre-upgrade not under httpd)
           tags: step1
           when: heat_api_cloudwatch_enabled.rc == 0
-          service: name=openstack-heat-api-cloudwatch state=stopped
+          service: name=openstack-heat-api-cloudwatch state=stopped enabled=no
index 95f7f0c..2bc92cd 100644 (file)
@@ -122,7 +122,16 @@ outputs:
           shell: /usr/bin/systemctl show 'openstack-heat-api' --property ActiveState | grep '\bactive\b'
           when: heat_api_enabled.rc == 0
           tags: step0,validation
-        - name: Stop heat_api service
+        - name: check for heat_api running under apache (post upgrade)
+          tags: step1
+          shell: "httpd -t -D DUMP_VHOSTS | grep -q heat_api_wsgi"
+          register: heat_api_apache
+          ignore_errors: true
+        - name: Stop heat_api service (running under httpd)
+          tags: step1
+          service: name=httpd state=stopped
+          when: "heat_api_apache.rc == 0"
+        - name: Stop and disable heat_api service (pre-upgrade not under httpd)
           tags: step1
           when: heat_api_enabled.rc == 0
-          service: name=openstack-heat-api state=stopped
+          service: name=openstack-heat-api state=stopped enabled=no