diff options
author | 2016-12-20 07:29:16 +0000 | |
---|---|---|
committer | 2016-12-20 07:29:16 +0000 | |
commit | d5df56b8ef5d5967e471db482d09fac36afc449a (patch) | |
tree | ffda79a1f00c54ef81f854b38037f18cec4d5dc9 /deploy/check_openstack_progress.sh | |
parent | 3dce9ea92689ace8b88c3996b28adc09d3ab8197 (diff) | |
parent | 0b57e3be28f1b42d7cea436feb04fbcdf83e8484 (diff) |
Merge "implement deploy on virthal pod"
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 |