From 16ba89f9f243b2e2b15d3312e9c3148a86403ff5 Mon Sep 17 00:00:00 2001 From: Thomas Herve Date: Fri, 27 Oct 2017 13:56:19 +0200 Subject: [PATCH] Fail on curl error when setting up repo If the repo raises an error, there is no reason to be silent, setup will fail later on. Let's fail explicitely when curl is called. Change-Id: Ief5b319082a90b45b912ae3efcfbe2d2e77906e0 --- scripts/tripleo.sh | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/scripts/tripleo.sh b/scripts/tripleo.sh index 3fc548a40..809568b6c 100755 --- a/scripts/tripleo.sh +++ b/scripts/tripleo.sh @@ -324,7 +324,7 @@ EOF" log "Stable release: $STABLE_RELEASE" if [ -z "$STABLE_RELEASE" ]; then # Enable the Delorean Deps repository - sudo curl -Lvo $REPO_PREFIX/delorean-deps.repo https://trunk.rdoproject.org/centos7/delorean-deps.repo + sudo curl -fLvo $REPO_PREFIX/delorean-deps.repo https://trunk.rdoproject.org/centos7/delorean-deps.repo sudo sed -i -e 's%priority=.*%priority=30%' $REPO_PREFIX/delorean-deps.repo sudo sed -i -e "s~http://mirror.centos.org/centos~$NODEPOOL_CENTOS_MIRROR~" $REPO_PREFIX/delorean-deps.repo sudo sed -i -e "s~https://buildlogs.centos.org~$NODEPOOL_BUILDLOGS_CENTOS_PROXY~" $REPO_PREFIX/delorean-deps.repo @@ -332,14 +332,14 @@ EOF" cat $REPO_PREFIX/delorean-deps.repo # Enable last known good RDO Trunk Delorean repository - sudo curl -Lvo $REPO_PREFIX/delorean.repo $DELOREAN_REPO_URL/$DELOREAN_REPO_FILE + sudo curl -fLvo $REPO_PREFIX/delorean.repo $DELOREAN_REPO_URL/$DELOREAN_REPO_FILE sudo sed -i -e 's%priority=.*%priority=20%' $REPO_PREFIX/delorean.repo sudo sed -i -e "s~https://trunk.rdoproject.org~$NODEPOOL_RDO_PROXY~" $REPO_PREFIX/delorean.repo cat $REPO_PREFIX/delorean.repo # Enable latest RDO Trunk Delorean repository if not promotion job if [[ $CACHEUPLOAD != 1 ]]; then - sudo curl -Lvo $REPO_PREFIX/delorean-current.repo https://trunk.rdoproject.org/centos7/current/delorean.repo + sudo curl -fLvo $REPO_PREFIX/delorean-current.repo https://trunk.rdoproject.org/centos7/current/delorean.repo sudo sed -i -e 's%priority=.*%priority=10%' $REPO_PREFIX/delorean-current.repo sudo sed -i 's/\[delorean\]/\[delorean-current\]/' $REPO_PREFIX/delorean-current.repo sudo sed -i -e "s~https://trunk.rdoproject.org~$NODEPOOL_RDO_PROXY~" $REPO_PREFIX/delorean-current.repo @@ -354,14 +354,14 @@ EOF" cat $REPO_PREFIX/delorean-current.repo else # Enable the Delorean Deps repository - sudo curl -Lvo $REPO_PREFIX/delorean-deps.repo https://trunk.rdoproject.org/centos7-$STABLE_RELEASE/delorean-deps.repo + sudo curl -fLvo $REPO_PREFIX/delorean-deps.repo https://trunk.rdoproject.org/centos7-$STABLE_RELEASE/delorean-deps.repo sudo sed -i -e 's%priority=.*%priority=30%' $REPO_PREFIX/delorean-deps.repo sudo sed -i -e "s~http://mirror.centos.org/centos~$NODEPOOL_CENTOS_MIRROR~" $REPO_PREFIX/delorean-deps.repo sudo sed -i -e "s~https://buildlogs.centos.org~$NODEPOOL_BUILDLOGS_CENTOS_PROXY~" $REPO_PREFIX/delorean-deps.repo cat $REPO_PREFIX/delorean-deps.repo # Enable delorean current for the stable version - sudo curl -Lvo $REPO_PREFIX/delorean.repo $DELOREAN_STABLE_REPO_URL/$DELOREAN_REPO_FILE + sudo curl -fLvo $REPO_PREFIX/delorean.repo $DELOREAN_STABLE_REPO_URL/$DELOREAN_REPO_FILE sudo sed -i -e 's%priority=.*%priority=20%' $REPO_PREFIX/delorean.repo sudo sed -i -e "s~https://trunk.rdoproject.org~$NODEPOOL_RDO_PROXY~" $REPO_PREFIX/delorean.repo cat $REPO_PREFIX/delorean.repo @@ -1135,9 +1135,9 @@ function overcloud_pingtest { KERNEL_PATH=$OVERCLOUD_IMAGES_PATH/cirros.kernel if [ ! -e $IMAGE_PATH -o ! -e $INITRAMFS_PATH -o ! -e $KERNEL_PATH ]; then log "Overcloud pingtest, trying to download Cirros image" - curl -L -o $IMAGE_PATH http://download.cirros-cloud.net/0.3.4/cirros-0.3.4-x86_64-disk.img - curl -L -o $INITRAMFS_PATH http://download.cirros-cloud.net/0.3.4/cirros-0.3.4-x86_64-initramfs - curl -L -o $KERNEL_PATH http://download.cirros-cloud.net/0.3.4/cirros-0.3.4-x86_64-kernel + curl -fLo $IMAGE_PATH http://download.cirros-cloud.net/0.3.4/cirros-0.3.4-x86_64-disk.img + curl -fLo $INITRAMFS_PATH http://download.cirros-cloud.net/0.3.4/cirros-0.3.4-x86_64-initramfs + curl -fLo $KERNEL_PATH http://download.cirros-cloud.net/0.3.4/cirros-0.3.4-x86_64-kernel fi log "Overcloud pingtest, uploading demo tenant image to glance" ramdisk_id=$(openstack image create pingtest_initramfs --public --container-format ari --disk-format ari --file $INITRAMFS_PATH | grep ' id ' | awk '{print $4}')