From ed717932c051f9c977e541a8b5d38cb861682130 Mon Sep 17 00:00:00 2001 From: Jimmy McCrory Date: Thu, 23 Feb 2017 15:19:32 -0800 Subject: [PATCH] Fix downloading of pre-created leap release venvs Precreated bundled venvs for OpenStack-Ansible have been created, update the default VENV_URL with the path to them. Also fix the wget command used to download them so that it returns a 0 on success and deletes a failed download allowing the local build function to continue on. Change-Id: Ic4ae115384015dd7159da4e5850452bb5db181be --- leap-upgrades/lib/functions.sh | 3 ++- leap-upgrades/lib/vars.sh | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/leap-upgrades/lib/functions.sh b/leap-upgrades/lib/functions.sh index e56edad0..d5b875d0 100644 --- a/leap-upgrades/lib/functions.sh +++ b/leap-upgrades/lib/functions.sh @@ -299,7 +299,8 @@ EOC) function get_venv { # Attempt to prefetch a venv archive before building it. - if ! wget "${VENV_URL}/openstack-ansible-$1.tgz" "/opt/leap42/venvs/openstack-ansible-$1.tgz" > /dev/null; then + if ! wget "${VENV_URL}/openstack-ansible-$1.tgz" -O "/opt/leap42/venvs/openstack-ansible-$1.tgz"; then + rm "/opt/leap42/venvs/openstack-ansible-$1.tgz" build_venv "$1" else run_venv_prep "$1" diff --git a/leap-upgrades/lib/vars.sh b/leap-upgrades/lib/vars.sh index 13ac6ef3..2f7fda0e 100644 --- a/leap-upgrades/lib/vars.sh +++ b/leap-upgrades/lib/vars.sh @@ -30,4 +30,4 @@ export UPGRADE_UTILS="${UPGRADE_UTILS:-${SYSTEM_PATH}/upgrade-utilities}" # set the "VENV_URL" environment variable to the path where the venvs are kept. When running stage1 # this URL will be used to download the release built VENVS in the following format. # ${VENV_URL}/openstack-ansible-RELEASE_VERSION.tgz -export VENV_URL="${VENV_URL:-https://mirror.rackspace.com/rackspaceprivatecloud}" +export VENV_URL="${VENV_URL:-https://mirror.rackspace.com/rackspaceprivatecloud/venvs/leap-bundles}"