From 1ccb5dd0fe5ce760f3fa684a6779570a9c6ef2d3 Mon Sep 17 00:00:00 2001 From: Jose Luis Franco Arza Date: Fri, 14 Jul 2017 09:50:58 +0200 Subject: 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 --- docker/services/mistral-executor.yaml | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'docker/services/mistral-executor.yaml') 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 -- cgit 1.2.3-korg