diff options
author | Zhijiang Hu <hu.zhijiang@zte.com.cn> | 2016-12-20 07:29:16 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@opnfv.org> | 2016-12-20 07:29:16 +0000 |
commit | d5df56b8ef5d5967e471db482d09fac36afc449a (patch) | |
tree | ffda79a1f00c54ef81f854b38037f18cec4d5dc9 /deploy/check_os_progress.sh | |
parent | 3dce9ea92689ace8b88c3996b28adc09d3ab8197 (diff) | |
parent | 0b57e3be28f1b42d7cea436feb04fbcdf83e8484 (diff) |
Merge "implement deploy on virthal pod"
Diffstat (limited to 'deploy/check_os_progress.sh')
-rwxr-xr-x | deploy/check_os_progress.sh | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/deploy/check_os_progress.sh b/deploy/check_os_progress.sh new file mode 100755 index 00000000..bf44fe28 --- /dev/null +++ b/deploy/check_os_progress.sh @@ -0,0 +1,22 @@ +#!/bin/bash +source /root/daisyrc_admin +cluster_id=`daisy cluster-list | awk -F "|" '{print $2}' | sed -n '4p'` +daisy install $cluster_id --skip-pxe-ipmi true +echo "check os installing progress..." +while true; do + os_install_active=`daisy host-list --cluster-id $cluster_id | awk -F "|" '{print $8}' | grep -c "active" ` + os_install_failed=`daisy host-list --cluster-id $cluster_id | awk -F "|" '{print $8}' | grep -c "install-failed" ` + if [ $os_install_active -eq 1 ]; then + echo "os installing successful ..." + break + elif [ $os_install_failed -gt 0 ]; then + echo "os installing have failed..." + exit 1 + else + progress=`daisy host-list --cluster-id $cluster_id |grep DISCOVERY_SUCCESSFUL |awk -F "|" '{print $7}'|sed s/[[:space:]]//g` + echo "os in installing, the progress is $progress%" + sleep 10 + fi +done +systemctl disable dhcpd +systemctl stop dhcpd |