Limit retries waiting for Robot to initialize 49/43449/1
authorGary Wu <gary.i.wu@huawei.com>
Wed, 18 Apr 2018 00:33:07 +0000 (17:33 -0700)
committerGary Wu <gary.i.wu@huawei.com>
Wed, 18 Apr 2018 00:33:07 +0000 (17:33 -0700)
Change-Id: I8644cbf25bdab760c8f05109aa7f91e96b8d818d
Issue-ID: INT-402
Signed-off-by: Gary Wu <gary.i.wu@huawei.com>
test/ete/scripts/deploy-onap.sh

index 689482c..b580351 100755 (executable)
@@ -87,7 +87,11 @@ ssh-keygen -R ${ROBOT_IP}
 
 SSH_KEY=~/.ssh/onap_key
 
-until ssh -o StrictHostKeychecking=no -i ${SSH_KEY} ubuntu@${ROBOT_IP} "sudo docker ps" | grep openecompete_container
-do
-      sleep 2m
+for n in $(seq 1 10); do
+    ssh -o StrictHostKeychecking=no -i ${SSH_KEY} ubuntu@${ROBOT_IP} "sudo docker ps" | grep openecompete_container
+    RESULT=$?
+    if [ $RESULT -eq 0 ]; then
+      break
+    fi
+    sleep 2m
 done