Add validation task in docker services [Manila]

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: Iacedff7acfa95084508c20ac5331bfd873706a26
Partial-Bug: #1704389
This commit is contained in:
Jose Luis Franco Arza 2017-09-08 09:01:51 +02:00
parent 9bd858ebdf
commit 82d97445c8
3 changed files with 30 additions and 0 deletions

@ -132,6 +132,16 @@ outputs:
- /var/log/containers/manila
- /var/log/containers/httpd/manila-api
upgrade_tasks:
- name: Check if manila_api is deployed
command: systemctl is-enabled --quiet openstack-manila-api
tags: common
ignore_errors: True
register: manila_api_enabled
- name: "PreUpgrade step0,validation: Check service openstack-manila-api is running"
command: systemctl is-active --quiet openstack-manila-api
when: manila_api_enabled.rc == 0
tags: step0,validation
- name: Stop and disable manila_api service
tags: step2
when: manila_api_enabled.rc == 0
service: name=openstack-manila-api state=stopped enabled=no

@ -106,6 +106,16 @@ outputs:
path: /var/log/containers/manila
state: directory
upgrade_tasks:
- name: Check if manila_scheduler is deployed
command: systemctl is-enabled --quiet openstack-manila-scheduler
tags: common
ignore_errors: True
register: manila_scheduler_enabled
- name: "PreUpgrade step0,validation: Check service openstack-manila-scheduler is running"
command: systemctl is-active --quiet openstack-manila-scheduler
when: manila_scheduler_enabled.rc == 0
tags: step0,validation
- name: Stop and disable manila_scheduler service
tags: step2
when: manila_scheduler_enabled.rc == 0
service: name=openstack-manila-scheduler state=stopped enabled=no

@ -117,6 +117,16 @@ outputs:
path: /etc/ceph
state: directory
upgrade_tasks:
- name: Check if manila_share is deployed
command: systemctl is-enabled --quiet openstack-manila-share
tags: common
ignore_errors: True
register: manila_share_enabled
- name: "PreUpgrade step0,validation: Check service openstack-manila-share is running"
command: systemctl is-active --quiet openstack-manila-share
when: manila_share_enabled.rc == 0
tags: step0,validation
- name: Stop and disable manila_share service
tags: step2
when: manila_share_enabled.rc == 0
service: name=openstack-manila-share state=stopped enabled=no