aboutsummaryrefslogtreecommitdiffstats
path: root/docker/services/heat-api-cfn.yaml
diff options
context:
space:
mode:
authorThomas Herve <therve@redhat.com>2017-07-12 16:54:23 +0200
committerEmilien Macchi <emilien@redhat.com>2017-07-19 06:21:30 -0700
commit223733cccf2ca388431fbf0cd08d9fd39572a3cd (patch)
tree16f6c9b782263102e8c86b0941563e71d0e0c774 /docker/services/heat-api-cfn.yaml
parent7e4f7dd2b0324247bba8fd8da5f3becd20e8299f (diff)
Stop Heat WSGI services on docker upgrade
As we made the migration to HTTPd during the same cycle, we didn't include stopping the WSGI services before the upgrades. This handles the case, and fixes an issue with the puppet upgrade as well. Change-Id: I54ba6214d4bf052c0d840d5bbce2b524d82b7017 Closes-Bug: #1699443
Diffstat (limited to 'docker/services/heat-api-cfn.yaml')
-rw-r--r--docker/services/heat-api-cfn.yaml21
1 files changed, 19 insertions, 2 deletions
diff --git a/docker/services/heat-api-cfn.yaml b/docker/services/heat-api-cfn.yaml
index aff0f1a1..70612899 100644
--- a/docker/services/heat-api-cfn.yaml
+++ b/docker/services/heat-api-cfn.yaml
@@ -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]