Add validation task in docker services [Sahara]
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: I41088442f29e99c553312d0e4303ea3db6df8dad Partial-Bug: #1704389
This commit is contained in:
parent
9bd858ebdf
commit
133d9a2a96
docker/services
@ -139,8 +139,18 @@ outputs:
|
||||
path: /var/log/containers/sahara
|
||||
state: directory
|
||||
upgrade_tasks:
|
||||
- name: Check if sahara_api is deployed
|
||||
command: systemctl is-enabled --quiet openstack-sahara-api
|
||||
tags: common
|
||||
ignore_errors: True
|
||||
register: sahara_api_enabled
|
||||
- name: "PreUpgrade step0,validation: Check service openstack-sahara-api is running"
|
||||
command: systemctl is-active --quiet openstack-sahara-api
|
||||
when: sahara_api_enabled.rc == 0
|
||||
tags: step0,validation
|
||||
- name: Stop and disable sahara_api service
|
||||
tags: step2
|
||||
when: sahara_api_enabled.rc == 0
|
||||
service: name=openstack-sahara-api state=stopped enabled=no
|
||||
- name: Remove openstack-sahara-api package if operator requests it
|
||||
yum: name=openstack-sahara-api state=removed
|
||||
|
@ -122,8 +122,18 @@ outputs:
|
||||
path: /var/log/containers/sahara
|
||||
state: directory
|
||||
upgrade_tasks:
|
||||
- name: Check if sahara_engine is deployed
|
||||
command: systemctl is-enabled --quiet openstack-sahara-engine
|
||||
tags: common
|
||||
ignore_errors: True
|
||||
register: sahara_engine_enabled
|
||||
- name: "PreUpgrade step0,validation: Check service openstack-sahara-engine is running"
|
||||
command: systemctl is-active --quiet openstack-sahara-engine
|
||||
when: sahara_engine_enabled.rc == 0
|
||||
tags: step0,validation
|
||||
- name: Stop and disable sahara_engine service
|
||||
tags: step2
|
||||
when: sahara_engine_enabled.rc == 0
|
||||
service: name=openstack-sahara-engine state=stopped enabled=no
|
||||
- name: Remove openstack-sahara-engine package if operator requests it
|
||||
yum: name=openstack-sahara-engine state=removed
|
||||
|
Loading…
x
Reference in New Issue
Block a user