Merge "Add validation task in docker services [Mistral]"
This commit is contained in:
commit
dff8a05f76
@ -187,6 +187,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
|
||||
|
@ -115,6 +115,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
|
||||
|
@ -120,14 +120,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