diff options
author | Jose Luis Franco Arza <jfrancoa@redhat.com> | 2017-07-14 09:50:58 +0200 |
---|---|---|
committer | Jose Luis Franco Arza <jfrancoa@redhat.com> | 2017-07-14 14:47:01 +0200 |
commit | 1ccb5dd0fe5ce760f3fa684a6779570a9c6ef2d3 (patch) | |
tree | f21ac18033771da15f3d05a4359758d8a67fba01 /docker/services/mistral-executor.yaml | |
parent | f2b68a1d13a1b7357182cdbc07872f84dcade3c9 (diff) |
Add validation task in docker services
Docker services are missing the pre-upgrade validation task
in the upgrade_tasks section which verifies if the service
is running before stopping it.
Change-Id: Ia8c25827d0d6f34e0345c3946dfd6839a7116e04
Partial-Bug: #1704389
Diffstat (limited to 'docker/services/mistral-executor.yaml')
-rw-r--r-- | docker/services/mistral-executor.yaml | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/docker/services/mistral-executor.yaml b/docker/services/mistral-executor.yaml index 9ae07213..e3c5cda6 100644 --- a/docker/services/mistral-executor.yaml +++ b/docker/services/mistral-executor.yaml @@ -116,6 +116,18 @@ outputs: path: /var/log/containers/mistral state: directory upgrade_tasks: + - name: Check if mistral executor is deployed + command: systemctl is-enabled 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' + when: mistral_executor_enabled.rc == 0 + tags: step0,validation - name: Stop and disable mistral_executor service tags: step2 + when: mistral_executor_enabled.rc == 0 service: name=openstack-mistral-executor state=stopped enabled=no |