From 258a4af14698b09be588d5eba0f9449fce994dde Mon Sep 17 00:00:00 2001 From: Emilien Macchi Date: Thu, 16 Jul 2020 14:34:40 -0400 Subject: [PATCH] Retry fetching {{ deployment_uuid }}.notify.json file During a deployment, there is a small chance that right after 55-heat-config run, the {{ deployment_uuid }}.notify.json file doesn't exist yet on the filesystem. This patch will retry to fetch the file during 20s and return an error message if it can't be found. Change-Id: Ia29944a07900ff36d5d4a5826cdd076d11864962 Closes-Bug: #1887846 (cherry picked from commit e6634751e5bb127e4513bb7fc6ce51ca4770a7e9) --- tripleo_common/templates/deployments.yaml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tripleo_common/templates/deployments.yaml b/tripleo_common/templates/deployments.yaml index ba83dea46..3eddbf4c6 100644 --- a/tripleo_common/templates/deployments.yaml +++ b/tripleo_common/templates/deployments.yaml @@ -185,6 +185,7 @@ - name: "Run deployment {{ item }}" shell: | /usr/libexec/os-refresh-config/configure.d/55-heat-config + timeout 20 bash -c -- 'while [ ! -f /var/lib/heat-config/deployed/{{ deployment_uuid }}.notify.json ]; do sleep 1; done' exit $(jq .deploy_status_code /var/lib/heat-config/deployed/{{ deployment_uuid }}.notify.json) become: true environment: @@ -196,6 +197,7 @@ - name: "Run async deployment {{ item }}" shell: | /usr/libexec/os-refresh-config/configure.d/55-heat-config + timeout 20 bash -c -- 'while [ ! -f /var/lib/heat-config/deployed/{{ deployment_uuid }}.notify.json ]; do sleep 1; done' exit $(jq .deploy_status_code /var/lib/heat-config/deployed/{{ deployment_uuid }}.notify.json) become: true environment: