From 8e8c55a323344c62b5a849f809c3d7f019c4363a Mon Sep 17 00:00:00 2001 From: Mike Danese Date: Wed, 13 Apr 2016 12:23:47 -0700 Subject: [PATCH] add a timeout for a single retry in download-or-bust This only applies to gce kube-up. 60 seconds of open connection should be sufficient for anything that we should be downloading. The release tar is currently 255M. --- cluster/gce/configure-vm.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cluster/gce/configure-vm.sh b/cluster/gce/configure-vm.sh index cd88eb16e3557..4b178e3eb9664 100755 --- a/cluster/gce/configure-vm.sh +++ b/cluster/gce/configure-vm.sh @@ -154,7 +154,7 @@ download-or-bust() { for url in "${urls[@]}"; do local file="${url##*/}" rm -f "${file}" - if ! curl -f --ipv4 -Lo "${file}" --connect-timeout 20 --retry 6 --retry-delay 10 "${url}"; then + if ! curl -f --ipv4 -Lo "${file}" --connect-timeout 20 --max-time 80 --retry 6 --retry-delay 10 "${url}"; then echo "== Failed to download ${url}. Retrying. ==" elif [[ -n "${hash}" ]] && ! validate-hash "${file}" "${hash}"; then echo "== Hash validation of ${url} failed. Retrying. =="