mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-30 06:54:01 +00:00
Merge pull request #24749 from andyzheng0831/enhance
Automatic merge from submit-queue Trusty: Add retry in curl commands This fix is for improving robustness in fetch critical metadata files when the metadata server is temporarily unreachable. @roberthbailey @zmerlynn @dchen1107 please review it. cc/ @fabioy @wonderfly FYI.
This commit is contained in:
commit
773bb777f4
@ -24,7 +24,7 @@ download_kube_env() {
|
||||
# Fetch kube-env from GCE metadata server.
|
||||
readonly tmp_install_dir="/var/cache/kubernetes-install"
|
||||
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" \
|
||||
-o "${tmp_install_dir}/kube_env.yaml" \
|
||||
http://metadata.google.internal/computeMetadata/v1/instance/attributes/kube-env
|
||||
|
@ -19,7 +19,7 @@ script
|
||||
set -o nounset
|
||||
|
||||
# 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" \
|
||||
-o /etc/kube-configure.sh \
|
||||
http://metadata.google.internal/computeMetadata/v1/instance/attributes/configure-sh
|
||||
|
@ -19,7 +19,7 @@ script
|
||||
set -o nounset
|
||||
|
||||
# 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" \
|
||||
-o /etc/kube-configure.sh \
|
||||
http://metadata.google.internal/computeMetadata/v1/instance/attributes/configure-sh
|
||||
|
Loading…
Reference in New Issue
Block a user