diff options
author | Yao Lu <lu.yao135@zte.com.cn> | 2016-11-29 22:39:37 +0800 |
---|---|---|
committer | zhouya <zhou.ya@zte.com.cn> | 2016-12-20 15:27:28 +0800 |
commit | 0b57e3be28f1b42d7cea436feb04fbcdf83e8484 (patch) | |
tree | 900413e47a5994aa36b00d2b7db0e14ca4e1815c /deploy/check_openstack_progress.sh | |
parent | a5e3706c114f43224056fa222276491445ddcf55 (diff) |
implement deploy on virthal pod
Change-Id: I600e21f0d36f37c75cac4ace5f7225e32ab93d56
Signed-off-by: Yao Lu <lu.yao135@zte.com.cn>
Diffstat (limited to 'deploy/check_openstack_progress.sh')
-rwxr-xr-x | deploy/check_openstack_progress.sh | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/deploy/check_openstack_progress.sh b/deploy/check_openstack_progress.sh new file mode 100755 index 00000000..c1c88eb8 --- /dev/null +++ b/deploy/check_openstack_progress.sh @@ -0,0 +1,20 @@ +#!/bin/bash +source /root/daisyrc_admin +echo "check openstack installing progress..." +cluster_id=`daisy cluster-list | awk -F "|" '{print $2}' | sed -n '4p'` +while true; do + 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 + echo "openstack installing successful ..." + break + elif [ $openstack_install_failed -gt 0 ]; then + echo "openstack installing have failed..." + tail -n 200 /var/log/daisy/kolla_$cluster_id* + exit 1 + else + progress=`daisy host-list --cluster-id $cluster_id |grep DISCOVERY_SUCCESSFUL |awk -F "|" '{print $11}'|sed s/[[:space:]]//g` + echo " openstack in installing , progress is $progress%" + sleep 30 + fi +done |