From 3e4eede80cb8fad331f819f6fbcad0ccacb87d3f Mon Sep 17 00:00:00 2001 From: Gary Wu Date: Tue, 17 Apr 2018 17:33:07 -0700 Subject: Limit retries waiting for Robot to initialize Change-Id: I8644cbf25bdab760c8f05109aa7f91e96b8d818d Issue-ID: INT-402 Signed-off-by: Gary Wu --- test/ete/scripts/deploy-onap.sh | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'test/ete') diff --git a/test/ete/scripts/deploy-onap.sh b/test/ete/scripts/deploy-onap.sh index 689482c2e..b580351dd 100755 --- a/test/ete/scripts/deploy-onap.sh +++ b/test/ete/scripts/deploy-onap.sh @@ -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 -- cgit 1.2.3-korg