mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-29 14:37:00 +00:00
Merge pull request #9115 from fgrzadkowski/fix_startup
Retry downloading binary tars in case of unpack failure
This commit is contained in:
commit
74b688dc0e
@ -437,8 +437,9 @@ function download-release() {
|
|||||||
# store it when we download, and then when it's different infer that
|
# store it when we download, and then when it's different infer that
|
||||||
# a push occurred (otherwise it's a simple reboot).
|
# a push occurred (otherwise it's a simple reboot).
|
||||||
|
|
||||||
# In case of failure of unpacking Salt tree (the last command in the
|
# In case of failure of unpacking Salt tree or checking integrity of
|
||||||
# "until" block) retry downloading both release and Salt tars.
|
# binary release tar (the last command in the "until" block) retry
|
||||||
|
# downloading both release and Salt tars.
|
||||||
until
|
until
|
||||||
echo "Downloading binary release tar ($SERVER_BINARY_TAR_URL)"
|
echo "Downloading binary release tar ($SERVER_BINARY_TAR_URL)"
|
||||||
download-or-bust "$SERVER_BINARY_TAR_URL"
|
download-or-bust "$SERVER_BINARY_TAR_URL"
|
||||||
@ -446,9 +447,9 @@ function download-release() {
|
|||||||
echo "Downloading Salt tar ($SALT_TAR_URL)"
|
echo "Downloading Salt tar ($SALT_TAR_URL)"
|
||||||
download-or-bust "$SALT_TAR_URL"
|
download-or-bust "$SALT_TAR_URL"
|
||||||
|
|
||||||
echo "Unpacking Salt tree"
|
echo "Unpacking Salt tree and checking integrity of binary release tar"
|
||||||
rm -rf kubernetes
|
rm -rf kubernetes
|
||||||
tar xzf "${SALT_TAR_URL##*/}"
|
tar xzf "${SALT_TAR_URL##*/}" && tar tzf "${SERVER_BINARY_TAR_URL##*/}" > /dev/null
|
||||||
do
|
do
|
||||||
sleep 15
|
sleep 15
|
||||||
echo "Couldn't unpack Salt tree. Retrying..."
|
echo "Couldn't unpack Salt tree. Retrying..."
|
||||||
|
Loading…
Reference in New Issue
Block a user