Retry container pull 3 times

Pulling images over internet is not considered as very stable operation
as there can be a lot of issues (DNS, HTTP rate limit, route change or
interface restart ...) This patch retries "pull" 3 times to mitigate
possible networking issues

Change-Id: I03643576c9f8444d6db36364a73bccce244c8446
Closes-Bug: 1899057
This commit is contained in:
Sergii Golovatiuk
2020-10-08 18:38:16 +02:00
parent 268eb7c5ba
commit cd6dc467ce
10 changed files with 40 additions and 0 deletions

View File

@@ -197,6 +197,10 @@ outputs:
manila_share_image_latest: *manila_share_image_pcmklatest
- name: Pull latest manila_share images
command: "{{container_cli}} pull {{manila_share_image}}"
register: result
retries: 3
delay: 3
until: result.rc == 0
- name: Get previous manila_share image id
shell: "{{container_cli}} inspect --format '{{'{{'}}.Id{{'}}'}}' {{manila_share_image_latest}}"
register: old_manila_share_image_id