Add validation task in docker services [Mistral]
Docker services are missing the pre-upgrade validation task in the upgrade_tasks section which verifies if the service is running before going on with the upgrade. Change-Id: Ic1cc3fb7cf59eaa67dd74e762f534f97b988541e Partial-Bug: #1704389
This commit is contained in:
parent
9bd858ebdf
commit
ffcff0fa64
@ -186,6 +186,34 @@ outputs:
|
||||
path: /var/log/containers/mistral
|
||||
state: directory
|
||||
upgrade_tasks:
|
||||
- name: Stop and disable mistral_api service
|
||||
- name: Check if mistral api is deployed
|
||||
command: systemctl is-enabled --quiet openstack-mistral-api
|
||||
tags: common
|
||||
ignore_errors: True
|
||||
register: mistral_api_enabled
|
||||
- name: Check for mistral_api running under apache
|
||||
tags: common
|
||||
shell: "httpd -t -D DUMP_VHOSTS | grep -q mistral"
|
||||
ignore_errors: True
|
||||
register: httpd_enabled
|
||||
- name: "PreUpgrade step0,validation: Check if openstack-mistral-api is running"
|
||||
command: systemctl is-active --quiet openstack-mistral-api
|
||||
when: mistral_api_enabled.rc == 0 and httpd_enabled.rc != 0
|
||||
tags: step0,validation
|
||||
- name: Stop and disable mistral_api service (pre-upgrade not under httpd)
|
||||
tags: step2
|
||||
when: mistral_api_enabled.rc == 0 and httpd_enabled.rc != 0
|
||||
service: name=openstack-mistral-api state=stopped enabled=no
|
||||
- name: Check if httpd service is running
|
||||
command: systemctl is-active --quiet httpd
|
||||
tags: common
|
||||
ignore_errors: True
|
||||
register: httpd_running
|
||||
- name: "PreUpgrade step0,validation: Check if mistral_api_wsgi is running"
|
||||
shell: systemctl status 'httpd' | grep -q mistral
|
||||
tags: step0,validation
|
||||
when: httpd_enabled.rc == 0 and httpd_running.rc == 0
|
||||
- name: Stop mistral_api service (running under httpd)
|
||||
tags: step2
|
||||
service: name=httpd state=stopped enabled=no
|
||||
when: httpd_enabled.rc == 0 and httpd_running.rc == 0
|
||||
|
@ -113,6 +113,16 @@ outputs:
|
||||
path: /var/log/containers/mistral
|
||||
state: directory
|
||||
upgrade_tasks:
|
||||
- name: Check if mistral engine is deployed
|
||||
command: systemctl is-enabled --quiet openstack-mistral-engine
|
||||
tags: common
|
||||
ignore_errors: True
|
||||
register: mistral_engine_enabled
|
||||
- name: "PreUpgrade step0,validation: Check if openstack-mistral-engine is running"
|
||||
command: systemctl is-active --quiet openstack-mistral-engine
|
||||
when: mistral_engine_enabled.rc == 0
|
||||
tags: step0,validation
|
||||
- name: Stop and disable mistral_engine service
|
||||
tags: step2
|
||||
when: mistral_engine_enabled.rc == 0
|
||||
service: name=openstack-mistral-engine state=stopped enabled=no
|
||||
|
@ -113,6 +113,16 @@ outputs:
|
||||
path: /var/log/containers/mistral
|
||||
state: directory
|
||||
upgrade_tasks:
|
||||
- name: Check if mistral-event-engine is deployed
|
||||
command: systemctl is-enabled --quiet openstack-mistral-event-engine
|
||||
tags: common
|
||||
ignore_errors: True
|
||||
register: mistral_event_engine_enabled
|
||||
- name: "PreUpgrade step0,validation: Check if openstack-mistral-event-engine is running"
|
||||
command: systemctl is-active --quiet openstack-mistral-event-engine
|
||||
when: mistral_event_engine_enabled.rc == 0
|
||||
tags: step0,validation
|
||||
- name: Stop and disable mistral_event_engine service
|
||||
tags: step2
|
||||
when: mistral_event_engine_enabled.rc == 0
|
||||
service: name=openstack-mistral-event-engine state=stopped enabled=no
|
||||
|
@ -118,14 +118,12 @@ outputs:
|
||||
state: directory
|
||||
upgrade_tasks:
|
||||
- name: Check if mistral executor is deployed
|
||||
command: systemctl is-enabled openstack-mistral-executor
|
||||
command: systemctl is-enabled --quiet openstack-mistral-executor
|
||||
tags: common
|
||||
ignore_errors: True
|
||||
register: mistral_executor_enabled
|
||||
- name: "PreUpgrade step0,validation: Check if openstack-mistral-executor is running"
|
||||
shell: >
|
||||
/usr/bin/systemctl show 'openstack-mistral-executor' --property ActiveState |
|
||||
grep '\bactive\b'
|
||||
command: systemctl is-active --quiet openstack-mistral-executor
|
||||
when: mistral_executor_enabled.rc == 0
|
||||
tags: step0,validation
|
||||
- name: Stop and disable mistral_executor service
|
||||
|
Loading…
x
Reference in New Issue
Block a user