mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-04 01:40:07 +00:00
Retry downloading tars in case of unpack failure
This commit is contained in:
parent
567519c78a
commit
4fc38849ea
@ -437,15 +437,22 @@ 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).
|
||||||
|
|
||||||
echo "Downloading binary release tar ($SERVER_BINARY_TAR_URL)"
|
# In case of failure of unpacking Salt tree (the last command in the
|
||||||
download-or-bust "$SERVER_BINARY_TAR_URL"
|
# "until" block) retry downloading both release and Salt tars.
|
||||||
|
until
|
||||||
|
echo "Downloading binary release tar ($SERVER_BINARY_TAR_URL)"
|
||||||
|
download-or-bust "$SERVER_BINARY_TAR_URL"
|
||||||
|
|
||||||
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"
|
||||||
rm -rf kubernetes
|
rm -rf kubernetes
|
||||||
tar xzf "${SALT_TAR_URL##*/}"
|
tar xzf "${SALT_TAR_URL##*/}"
|
||||||
|
do
|
||||||
|
sleep 15
|
||||||
|
echo "Couldn't unpack Salt tree. Retrying..."
|
||||||
|
done
|
||||||
|
|
||||||
echo "Running release install script"
|
echo "Running release install script"
|
||||||
sudo kubernetes/saltbase/install.sh "${SERVER_BINARY_TAR_URL##*/}"
|
sudo kubernetes/saltbase/install.sh "${SERVER_BINARY_TAR_URL##*/}"
|
||||||
|
Loading…
Reference in New Issue
Block a user