summaryrefslogtreecommitdiffstats
path: root/ci
diff options
context:
space:
mode:
authorMartin Kulhavy <martin.kulhavy@nokia.com>2017-08-06 21:46:42 +0300
committerMartin Kulhavy <martin.kulhavy@nokia.com>2017-08-07 15:14:39 +0300
commitd3cbe9919d34d6d26783aa8c01974ece3ae47249 (patch)
treec7766a4bf455a80d5e088eb23de7dcbbf58ead70 /ci
parentcc1297789f961b9e45a9381d35e9e97e5d1e551a (diff)
Check that nodes have not failed commissioning
If any of the nodes have failed during the commissioning phase, it makes no sense to proceed with the deployment (it will fail when trying to update the interfaces of the nodes). Change-Id: Idc9f202820555d08aa2b07d8296b79b7fea0337a Signed-off-by: Martin Kulhavy <martin.kulhavy@nokia.com>
Diffstat (limited to 'ci')
-rwxr-xr-xci/03-maasdeploy.sh14
1 files changed, 11 insertions, 3 deletions
diff --git a/ci/03-maasdeploy.sh b/ci/03-maasdeploy.sh
index d2dde1d4..835e3f71 100755
--- a/ci/03-maasdeploy.sh
+++ b/ci/03-maasdeploy.sh
@@ -458,10 +458,18 @@ addnodes(){
maas $PROFILE pods create type=virsh power_address="$VIRSHURL" power_user=$USER
- # make sure nodes are added into MAAS and none of them is in commisoning state
- while [ "$(maas $PROFILE nodes read | grep Commissioning )" ];
+ # Make sure nodes are added into MAAS and none of them is in commissioning state
+ while [ "$(maas $PROFILE nodes read | grep Commissioning )" ];
do
sleep 60
+
+ # Make sure that no nodes have failed commissioning
+ if [ "$(maas $PROFILE nodes read | grep 'Failed commissioning' )" ];
+ then
+ echo "Error: Some nodes have failed commissioning" 1>&2
+ exit 1
+ fi
+
done
}
@@ -480,7 +488,7 @@ setupspacenetwork
sudo ./maas-reconfigure-region.sh $MAAS_IP
sleep 120
-#lets add the nodes now. Currently works only for virtual deploymnet.
+# Let's add the nodes now. Currently works only for virtual deployment.
addnodes
echo "... Deployment of maas finish ...."