Merge pull request #8998 from wojtek-t/retry_downloading

Retry downloading tars in case of unpack failure
This commit is contained in:
Filip Grzadkowski 2015-05-29 04:27:48 -07:00
commit 17f6f86be6

View File

@ -437,6 +437,9 @@ function download-release() {
# store it when we download, and then when it's different infer that
# a push occurred (otherwise it's a simple reboot).
# In case of failure of unpacking Salt tree (the last command in the
# "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"
@ -446,6 +449,10 @@ function download-release() {
echo "Unpacking Salt tree"
rm -rf kubernetes
tar xzf "${SALT_TAR_URL##*/}"
do
sleep 15
echo "Couldn't unpack Salt tree. Retrying..."
done
echo "Running release install script"
sudo kubernetes/saltbase/install.sh "${SERVER_BINARY_TAR_URL##*/}"