Add retries to initial image fetch

Since we're fetching containers from a remote location, if there is any
sort of connectivity issues while deploying, we end up failing the
deploy. We should retries these calls to improve deployment reliability.

Change-Id: Ia67f46f418b05bdf3ad797aab496c9b430c47650
Closes-Bug: #1878615
(cherry picked from commit c071d14d32)
This commit is contained in:
Alex Schultz 2020-05-14 07:40:13 -06:00
parent d185f39873
commit 8e20a1fc4d
2 changed files with 4 additions and 0 deletions

View File

@ -192,6 +192,8 @@ outputs:
- name: Pre-fetch all the containers
become: true
shell: "docker pull {{ container_image }}"
retries: 5
delay: 5
loop_control:
loop_var: container_image
loop: "{{ lookup('file', tripleo_role_name + '/docker_config.yaml', errors='ignore') | default('{}', True) | from_yaml | recursive_get_key_from_dict(key='image') | unique }}"

View File

@ -149,6 +149,8 @@ outputs:
podman_image:
name: "{{ container_image }}"
validate_certs: false
retries: 5
delay: 5
loop_control:
loop_var: container_image
loop: "{{ lookup('file', tripleo_role_name + '/docker_config.yaml', errors='ignore') | default('{}', True) | from_yaml | recursive_get_key_from_dict(key='image') | unique }}"