From 3011039e5e6308a88c28aa912de22f05355e5678 Mon Sep 17 00:00:00 2001 From: Dan Radez Date: Wed, 16 Dec 2015 13:29:42 -0500 Subject: build_updates - forcing wget for centos artifacts - extra checking for undercloud ip Change-Id: I79d1919f86d83fbf6a5d284bd3257fd40f9c7018 --- build/instack.sh | 28 +++++++++++++++++++++------- 1 file changed, 21 insertions(+), 7 deletions(-) diff --git a/build/instack.sh b/build/instack.sh index 522ff8de..69fec702 100755 --- a/build/instack.sh +++ b/build/instack.sh @@ -99,6 +99,20 @@ sleep 5 # get the undercloud ip address UNDERCLOUD=$(grep instack /var/lib/libvirt/dnsmasq/default.leases | awk '{print $3}' | head -n 1) +if [ -z "$UNDERCLOUD" ]; then + #if not found then dnsmasq may be using leasefile-ro + instack_mac=$(ssh -T ${SSH_OPTIONS[@]} stack@localhost "virsh domiflist instack" | grep default | \ + grep -Eo "[0-9a-f\]+:[0-9a-f\]+:[0-9a-f\]+:[0-9a-f\]+:[0-9a-f\]+:[0-9a-f\]+") + UNDERCLOUD=$(arp -e | grep ${instack_mac} | awk {'print $1'}) + + if [ -z "$UNDERCLOUD" ]; then + echo "\n\nNever got IP for Instack. Can Not Continue." + exit 1 + fi +else + echo -e "${blue}\rInstack VM has IP $UNDERCLOUD${reset}" +fi + # ensure that we can ssh to the undercloud CNT=10 @@ -178,13 +192,13 @@ IMAGES+=" undercloud.qcow2" for i in $IMAGES; do # download prebuilt images from RDO Project if [ "$(curl -L $rdo_images_uri/${i}.md5 | awk {'print $1'})" != "$(md5sum stack/$i | awk {'print $1'})" ] ; then - if [ $i == "undercloud.qcow2" ]; then - # there's a problem with the Content-Length reported by the centos artifacts - # server so using wget for it until a resolution is figured out. - wget -nv -O stack/$i $rdo_images_uri/$i - else - curl $rdo_images_uri/$i -o stack/$i --verbose --silent --location - fi + #if [ $i == "undercloud.qcow2" ]; then + ### there's a problem with the Content-Length reported by the centos artifacts + ### server so using wget for it until a resolution is figured out. + wget -nv -O stack/$i $rdo_images_uri/$i + #else + # curl $rdo_images_uri/$i -o stack/$i --verbose --silent --location + #fi fi # only untar the tar files if [ "${i##*.}" == "tar" ]; then tar -xf stack/$i -C stack/; fi -- cgit 1.2.3-korg