summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarkos Chandras <mchandras@suse.de>2018-02-27 16:13:04 +0000
committerMarkos Chandras <mchandras@suse.de>2018-02-27 16:18:44 +0000
commit4307ead229533fc0dd9f076dcdd5e5fa299313b0 (patch)
tree3dfa00cce85f9098ad30c0241b6a207711a306c2
parentaba10663bdd5af8e1129bae6c01e7fdd09cb1a4e (diff)
xci: script: start-new-vm: Switch to using 'curl' instead of 'wget'
curl supports the 'retry' argument to handle all sorts of connection problems so we can use it to retry if we encounter a broken connection. Change-Id: I3c8afd2be36ee36c5477f05495704bbbee5b9757 Signed-off-by: Markos Chandras <mchandras@suse.de>
-rwxr-xr-xxci/scripts/vm/start-new-vm.sh7
1 files changed, 4 insertions, 3 deletions
diff --git a/xci/scripts/vm/start-new-vm.sh b/xci/scripts/vm/start-new-vm.sh
index f53ec5ef..4f15f917 100755
--- a/xci/scripts/vm/start-new-vm.sh
+++ b/xci/scripts/vm/start-new-vm.sh
@@ -53,9 +53,10 @@ update_clean_vm_files() {
local image_remote="${opnfv_url}/${OS}.qcow2"
get_new_vm_files() {
+ echo "Downloading new ${OS} images from ${opnfv_url}"
rm -rf ${vm_cache}/${OS}*
- wget --quiet ${image_remote}
- wget --quiet ${sha_remote}
+ curl -O -s --retry 10 ${image_remote}
+ curl -O -s --retry 10 ${sha_remote}
}
# There are 3 reasons why we want to fetch files from the GS storage
@@ -68,7 +69,7 @@ update_clean_vm_files() {
sha_local=$(awk '{print $1}' $shafile)
if $XCI_UPDATE_CLEAN_VM_OS; then
echo "Updating local copies of ${OS}..."
- ! curl -s ${sha_remote} | grep -q ${sha_local} && \
+ ! curl --retry 10 -s ${sha_remote} | grep -q ${sha_local} && \
get_new_vm_files
fi
echo "Verifying integrity of ${OS} files..."