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
This commit is contained in:
Jimmy McCrory 2017-02-23 15:19:32 -08:00
parent 72ef877b93
commit ed717932c0
2 changed files with 3 additions and 2 deletions

View File

@ -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"

View File

@ -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}"