From 00a470b032fc94b7d340770928ed003099e41a31 Mon Sep 17 00:00:00 2001 From: Bryan Sullivan Date: Sun, 10 Dec 2017 12:10:31 -0800 Subject: AIO and centos deploy support JIRA: MODELS-2 serial worker deploy ceph not yet working for multi-node centos Change-Id: Id46e3eb10486fd96b4acab45c87be8475a1a7163 Signed-off-by: Bryan Sullivan --- tools/maas/deploy.sh | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'tools/maas/deploy.sh') diff --git a/tools/maas/deploy.sh b/tools/maas/deploy.sh index 484a389..bf6b01f 100644 --- a/tools/maas/deploy.sh +++ b/tools/maas/deploy.sh @@ -28,6 +28,11 @@ #. : space separated list of hostnames managed by MAAS #. : optional name and parameters of script for extra setup functions +function fail() { + log "$1" + exit 1 +} + function log() { f=$(caller 0 | awk '{print $2}') l=$(caller 0 | awk '{print $1}') @@ -38,6 +43,9 @@ function wait_node_status() { status=$(maas opnfv machines read hostname=$1 | jq -r ".[0].status_name") while [[ "x$status" != "x$2" ]]; do log "$1 status is $status ... waiting for it to be $2" + if [[ "$2" == "Deployed" && "$status" == "Failed deployment" ]]; then + fail "$1 deployment failed" + fi sleep 30 status=$(maas opnfv machines read hostname=$1 | jq -r ".[0].status_name") done -- cgit 1.2.3-korg