From 1b1078aca96a1cc22ccaab335c0159b3bf5fa9a5 Mon Sep 17 00:00:00 2001 From: Dmitriy Rabotjagov Date: Sun, 12 May 2019 19:24:54 +0300 Subject: [PATCH] Add retry for backup get_url task As CentOS aria2 package is still only in epel-testing repo, get_url tends to fail with timout errors, which forces to do rechecks and creates extra load on gates. So we're adding retries for this task and extending timeout. Change-Id: I26d3c9338247ffc789bf4a5291e65e954151cc51 --- tasks/lxc_cache_preparation_systemd_new.yml | 5 +++++ tasks/lxc_cache_preparation_systemd_old.yml | 5 +++++ 2 files changed, 10 insertions(+) diff --git a/tasks/lxc_cache_preparation_systemd_new.yml b/tasks/lxc_cache_preparation_systemd_new.yml index c2c36020..2a1c6e9e 100644 --- a/tasks/lxc_cache_preparation_systemd_new.yml +++ b/tasks/lxc_cache_preparation_systemd_new.yml @@ -37,6 +37,11 @@ dest: "/tmp/{{ cache_basename }}" validate_certs: "{{ (lxc_hosts_validate_certs | bool) | lower }}" force: true + timeout: 15 + register: image_download + until: image_download is success + retries: 3 + delay: 2 when: job_result.failed - name: Ensure systemd-importd is enabled diff --git a/tasks/lxc_cache_preparation_systemd_old.yml b/tasks/lxc_cache_preparation_systemd_old.yml index 68a7c890..8ab94e38 100644 --- a/tasks/lxc_cache_preparation_systemd_old.yml +++ b/tasks/lxc_cache_preparation_systemd_old.yml @@ -46,6 +46,11 @@ dest: "/tmp/{{ cache_basename }}" validate_certs: "{{ (lxc_hosts_validate_certs | bool) | lower }}" force: true + timeout: 15 + register: image_download + until: image_download is success + retries: 3 + delay: 2 when: job_result.failed - name: Place container rootfs