Commit bba02839 authored by David Johnson's avatar David Johnson

Check nova list error status. Also fixup some nits.

parent 77de1b96
Pipeline #1878 passed with stage
in 2 seconds
......@@ -100,17 +100,17 @@ sleep 5
nova boot --image hadoop --flavor m1.large --nic net-id=$NETWORKID master
if [ ! $? -eq 0 ]; then
print "ERROR: failed to create master VM; aborting!"
echo "ERROR: failed to create master VM; aborting!"
exit 1
fi
nova boot --image hadoop --flavor m1.medium --nic net-id=$NETWORKID resourcemanager
if [ ! $? -eq 0 ]; then
print "ERROR: failed to create resourcemanager VM; aborting!"
echo "ERROR: failed to create resourcemanager VM; aborting!"
exit 1
fi
nova boot --image hadoop --flavor m1.medium --nic net-id=$NETWORKID --min-count $NSLAVES slave
if [ ! $? -eq 0 ]; then
print "ERROR: failed to create slave VMs; aborting!"
echo "ERROR: failed to create slave VMs; aborting!"
exit 1
fi
......@@ -119,9 +119,13 @@ fi
#
allrunning=0
while [ $allrunning -eq 0 ]; do
print "*** Still waiting for nodes to reach Running state ..."
echo "*** Still waiting for nodes to reach Running state ..."
sleep 5
vsl=`nova list --limit -1 | awk ' / [0-9a-fA-F]*-[0-9a-fA-F-]* / { print $10 }' | xargs`
if [ ! $? -eq 0 ]; then
echo "Error listing nova VMs; will try again!"
continue
fi
allrunning=1
for status in $vsl ; do
if [ ! "x$status" = "xRunning" ]; then
......@@ -134,7 +138,7 @@ done
#
# Hedge our bets and hope all have booted to network by this point :)
#
print "*** Sleeping 16 seconds to let all VMs come online, hopefully ..."
echo "*** Sleeping 16 seconds to let all VMs come online, hopefully ..."
sleep 16
#
......@@ -157,7 +161,7 @@ neutron capnet-wfagent-create --tenant-id $UTENANTID --name $UTENANTWFANAME \
--master --wfapp-path /usr/bin/capnet-wfagent-user-tenant-hadoop-membrane \
$NETWORK
if [ ! $? -eq 0 ]; then
print "ERROR: creating user wfa; aborting!"
echo "ERROR: creating user wfa; aborting!"
exit 1
fi
while [ 1 -eq 1 ]; do
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment