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 e6634751e5
)
This commit is contained in:
parent
d9433a5af0
commit
258a4af146
|
@ -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:
|
||||
|
|
Loading…
Reference in New Issue