From b351bb8402cf924bbe08c02e1adfe9db3ce83d77 Mon Sep 17 00:00:00 2001 From: Stepan Andrushko Date: Thu, 7 Mar 2019 17:55:01 +0200 Subject: NSB: Improve get_url in ansible scripts Added retries and delay to the ansible 'get_url' module to get more robust script. JIRA: YARDSTICK-1605 Change-Id: Ic4d0b937ad810e42db61c0a8b1f6f137557392f8 Signed-off-by: Stepan Andrushko --- ansible/roles/download_civetweb/tasks/main.yml | 4 ++++ ansible/roles/download_dpdk/tasks/main.yml | 4 ++++ ansible/roles/download_drivers/tasks/i40evf.yml | 4 ++++ ansible/roles/download_l2fwd/tasks/main.yml | 4 ++++ ansible/roles/download_pktgen/tasks/main.yml | 4 ++++ ansible/roles/download_trex/tasks/main.yml | 4 ++++ 6 files changed, 24 insertions(+) diff --git a/ansible/roles/download_civetweb/tasks/main.yml b/ansible/roles/download_civetweb/tasks/main.yml index 03dd3ccd3..b6a475774 100644 --- a/ansible/roles/download_civetweb/tasks/main.yml +++ b/ansible/roles/download_civetweb/tasks/main.yml @@ -18,6 +18,10 @@ dest: "{{ clone_dest }}/" validate_certs: False checksum: "{{ civetweb_sha256s }}" + register: package_result + until: package_result is succeeded + retries: 10 + delay: 5 - name: unarchive civetweb unarchive: diff --git a/ansible/roles/download_dpdk/tasks/main.yml b/ansible/roles/download_dpdk/tasks/main.yml index 55b466cb7..e434536a3 100644 --- a/ansible/roles/download_dpdk/tasks/main.yml +++ b/ansible/roles/download_dpdk/tasks/main.yml @@ -26,6 +26,10 @@ dest: "{{ dpdk_dest }}" validate_certs: False checksum: "{{ dpdk_md5[dpdk_version] }}" + register: package_result + until: package_result is succeeded + retries: 10 + delay: 5 - unarchive: src: "{{ dpdk_dest }}/{{ dpdk_file }}" diff --git a/ansible/roles/download_drivers/tasks/i40evf.yml b/ansible/roles/download_drivers/tasks/i40evf.yml index cb8a09d6c..48a0330ab 100644 --- a/ansible/roles/download_drivers/tasks/i40evf.yml +++ b/ansible/roles/download_drivers/tasks/i40evf.yml @@ -23,6 +23,10 @@ dest: "{{ i40evf_dest }}/{{ i40evf_gzfile }}" validate_certs: False checksum: "{{ i40evf_checksum[i40evf_version] }}" + register: package_result + until: package_result is succeeded + retries: 10 + delay: 5 - name: Unarchive the i40evf file unarchive: diff --git a/ansible/roles/download_l2fwd/tasks/main.yml b/ansible/roles/download_l2fwd/tasks/main.yml index 7f2ea25c4..43b0ec366 100644 --- a/ansible/roles/download_l2fwd/tasks/main.yml +++ b/ansible/roles/download_l2fwd/tasks/main.yml @@ -20,6 +20,10 @@ get_url: url: "{{ l2fwd_url }}" dest: "{{ l2fwd_dest }}" + register: package_result + until: package_result is succeeded + retries: 10 + delay: 5 - unarchive: src: "{{ l2fwd_dest }}/{{ l2fwd_file }}" diff --git a/ansible/roles/download_pktgen/tasks/main.yml b/ansible/roles/download_pktgen/tasks/main.yml index ff71f207d..b5ac8cfe8 100644 --- a/ansible/roles/download_pktgen/tasks/main.yml +++ b/ansible/roles/download_pktgen/tasks/main.yml @@ -22,6 +22,10 @@ dest: "{{ pktgen_dest }}" validate_certs: False checksum: "{{ pktgen_sha256s[pktgen_version] }}" + register: package_result + until: package_result is succeeded + retries: 10 + delay: 5 - unarchive: src: "{{ pktgen_dest }}/{{ pktgen_file }}" diff --git a/ansible/roles/download_trex/tasks/main.yml b/ansible/roles/download_trex/tasks/main.yml index 9df67d939..44449a9c0 100644 --- a/ansible/roles/download_trex/tasks/main.yml +++ b/ansible/roles/download_trex/tasks/main.yml @@ -23,6 +23,10 @@ dest: "{{ trex_dest }}" validate_certs: False checksum: "{{ trex_sha256s[trex_version] }}" + register: package_result + until: package_result is succeeded + retries: 10 + delay: 5 - name: unarchive Trex unarchive: -- cgit 1.2.3-korg