summaryrefslogtreecommitdiffstats
path: root/deploy/check_os_progress.sh
diff options
context:
space:
mode:
authorAlex Yang <yangyang1@zte.com.cn>2017-03-02 20:08:35 +0800
committerAlex Yang <yangyang1@zte.com.cn>2017-03-02 20:08:35 +0800
commit6aa0d065c6d8f341a7307cf69e6afec2e2bdc682 (patch)
tree7f481e082c29393b91ff2c5fc7066dad27a39ef6 /deploy/check_os_progress.sh
parentf6a8df558e69139779cd7823b676f8856d358aa6 (diff)
End deployment when timeout
Change-Id: Iaae02bfc69450d6138b7b187ec23e4ed2eef6138 Signed-off-by: Alex Yang <yangyang1@zte.com.cn>
Diffstat (limited to 'deploy/check_os_progress.sh')
-rwxr-xr-xdeploy/check_os_progress.sh10
1 files changed, 9 insertions, 1 deletions
diff --git a/deploy/check_os_progress.sh b/deploy/check_os_progress.sh
index abbd7e5a..c631a713 100755
--- a/deploy/check_os_progress.sh
+++ b/deploy/check_os_progress.sh
@@ -45,7 +45,15 @@ echo "run daisy install command"
daisy install $cluster_id --skip-pxe-ipmi $skip
echo "check os installing progress..."
+maxcount=180
+count=0
while true; do
+ if [ $count -gt $maxcount ]; then
+ echo "It took too long to install the os, exit 1."
+ exit 1
+ fi
+ count=$[count + 1]
+
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 $hosts_num ]; then
@@ -57,7 +65,7 @@ while true; do
else
progress=`daisy host-list --cluster-id $cluster_id |grep DISCOVERY_SUCCESSFUL |awk -F "|" '{print $7}'|sed s/[[:space:]]//g|sed ':a;N;$ s/\n/ /g;ba'`
echo "os in installing, the progress of each node is $progress%"
- sleep 10
+ sleep 30
fi
done
systemctl disable dhcpd