aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorQiLiang <liangqi1@huawei.com>2016-10-28 12:52:39 +0800
committerqi liang <liangqi1@huawei.com>2016-11-24 08:44:18 +0000
commit513fcd64b3c8a69d95fef292015178b93f671205 (patch)
treee6f32caa7273bf1e44281db40e21e9a1ced03afc
parent168672fc169cac866f9689260c105cf141a567ad (diff)
Workaround for random wait compass boot timeout
JIRA: - Sometimes compass-core already boot successfully, but wait_ok function retry to ssh login to compass-core vm failed. Add two more times retry before exit the deployment. Change-Id: I1ae7795b2196e9a24c24c2368402e560aba68339 Signed-off-by: QiLiang <liangqi1@huawei.com> (cherry picked from commit 12880abb62fdb46afdcfa929e3fdb251b1e73814)
-rwxr-xr-xdeploy/compass_vm.sh11
1 files changed, 10 insertions, 1 deletions
diff --git a/deploy/compass_vm.sh b/deploy/compass_vm.sh
index dc391acc..0c213e31 100755
--- a/deploy/compass_vm.sh
+++ b/deploy/compass_vm.sh
@@ -59,7 +59,16 @@ function wait_ok() {
sleep 1
let retry+=1
if [[ $retry -ge $1 ]];then
- timeout 1s ssh $ssh_args root@$MGMT_IP "exit"
+ # first try
+ ssh $ssh_args root@$MGMT_IP "exit"
+ # second try
+ ssh $ssh_args root@$MGMT_IP "exit"
+ exit_status=$?
+ if [[ $exit_status == 0 ]]; then
+ log_warn "final ssh login compass success !!!"
+ break
+ fi
+ log_error "final ssh retry failed with status: " $exit_status
log_error "os install time out"
exit 1
fi