summaryrefslogtreecommitdiffstats
path: root/deploy/check_openstack_progress.sh
diff options
context:
space:
mode:
authorZhijiang Hu <hu.zhijiang@zte.com.cn>2017-03-03 09:03:20 +0000
committerGerrit Code Review <gerrit@opnfv.org>2017-03-03 09:03:20 +0000
commit35b6ee18ef8a4c3ee2b51c7447942d79941b06d1 (patch)
tree700a69fdf3f2d754cb854503d2b60df590866165 /deploy/check_openstack_progress.sh
parent955030c520dc78c7da6b1d056e6e1ff64188df5e (diff)
parent6aa0d065c6d8f341a7307cf69e6afec2e2bdc682 (diff)
Merge "End deployment when timeout"
Diffstat (limited to 'deploy/check_openstack_progress.sh')
-rwxr-xr-xdeploy/check_openstack_progress.sh10
1 files changed, 10 insertions, 0 deletions
diff --git a/deploy/check_openstack_progress.sh b/deploy/check_openstack_progress.sh
index c1c88eb8..bbd631b6 100755
--- a/deploy/check_openstack_progress.sh
+++ b/deploy/check_openstack_progress.sh
@@ -2,7 +2,17 @@
source /root/daisyrc_admin
echo "check openstack installing progress..."
cluster_id=`daisy cluster-list | awk -F "|" '{print $2}' | sed -n '4p'`
+
+maxcount=180
+count=0
+
while true; do
+ if [ $count -gt $maxcount ]; then
+ echo "It took too long to install openstack, exit 1."
+ exit 1
+ fi
+ count=$[count + 1]
+
openstack_install_active=`daisy host-list --cluster-id $cluster_id | awk -F "|" '{print $12}' | grep -c "active" `
openstack_install_failed=`daisy host-list --cluster-id $cluster_id | awk -F "|" '{print $12}' | grep -c "install-failed" `
if [ $openstack_install_active -eq 1 ]; then