From 4ad99224bd655d85c6829e0c9d5653ef0837549f Mon Sep 17 00:00:00 2001 From: Sofer Athlan-Guyot Date: Mon, 22 Oct 2018 10:25:31 +0200 Subject: [PATCH] Fix cinder_api_apache error during upgrade. In I35c8d9985df21b3084fba558687e1f408e5a0878 we removed the cinder_api_apache from step 2. This cause the upgrade to fail as the next task is using that variable. Converting it to a fact in step 0 so that we can call it later. Change-Id: I55058fd6288eec87fd1cd028b4a684b9472496cb Resolve-Bug: #1799166 --- docker/services/cinder-api.yaml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/docker/services/cinder-api.yaml b/docker/services/cinder-api.yaml index 0f382d8e4e..a9bd63d4e1 100644 --- a/docker/services/cinder-api.yaml +++ b/docker/services/cinder-api.yaml @@ -253,6 +253,9 @@ outputs: shell: "httpd -t -D DUMP_VHOSTS | grep -q cinder" register: cinder_api_apache ignore_errors: true + - name: Set fact cinder_api_apache (upgrade) + set_fact: + cinder_api_apache: "{{ cinder_api_apache.rc == 0 }}" - name: "PreUpgrade step0,validation: Check service openstack-cinder-api is running" shell: systemctl is-active --quiet openstack-cinder-api when: cinder_api_enabled|bool @@ -271,7 +274,7 @@ outputs: when: cinder_api_enabled|bool - name: Stop and disable cinder_api service service: name=httpd state=stopped enabled=no - when: cinder_api_apache.rc == 0 + when: cinder_api_apache|bool - when: step|int == 3 block: - name: remove old cinder cron jobs