Trusty: Add retry in curl commands

pull/6/head
Andy Zheng 2016-04-25 12:54:12 -07:00
parent daf6be1a66
commit 72f3cb664f
3 changed files with 3 additions and 3 deletions

View File

@ -24,7 +24,7 @@ download_kube_env() {
# Fetch kube-env from GCE metadata server. # Fetch kube-env from GCE metadata server.
readonly tmp_install_dir="/var/cache/kubernetes-install" readonly tmp_install_dir="/var/cache/kubernetes-install"
mkdir -p "${tmp_install_dir}" mkdir -p "${tmp_install_dir}"
curl --fail --silent --show-error \ curl --fail --retry 5 --retry-delay 3 --silent --show-error \
-H "X-Google-Metadata-Request: True" \ -H "X-Google-Metadata-Request: True" \
-o "${tmp_install_dir}/kube_env.yaml" \ -o "${tmp_install_dir}/kube_env.yaml" \
http://metadata.google.internal/computeMetadata/v1/instance/attributes/kube-env http://metadata.google.internal/computeMetadata/v1/instance/attributes/kube-env

View File

@ -19,7 +19,7 @@ script
set -o nounset set -o nounset
# Fetch the script for installing master binary and configuration files. # Fetch the script for installing master binary and configuration files.
curl --fail --silent --show-error \ curl --fail --retry 5 --retry-delay 3 --silent --show-error \
-H "X-Google-Metadata-Request: True" \ -H "X-Google-Metadata-Request: True" \
-o /etc/kube-configure.sh \ -o /etc/kube-configure.sh \
http://metadata.google.internal/computeMetadata/v1/instance/attributes/configure-sh http://metadata.google.internal/computeMetadata/v1/instance/attributes/configure-sh

View File

@ -19,7 +19,7 @@ script
set -o nounset set -o nounset
# Fetch the script for installing nodes binary and configuration files. # Fetch the script for installing nodes binary and configuration files.
curl --fail --silent --show-error \ curl --fail --retry 5 --retry-delay 3 --silent --show-error \
-H "X-Google-Metadata-Request: True" \ -H "X-Google-Metadata-Request: True" \
-o /etc/kube-configure.sh \ -o /etc/kube-configure.sh \
http://metadata.google.internal/computeMetadata/v1/instance/attributes/configure-sh http://metadata.google.internal/computeMetadata/v1/instance/attributes/configure-sh