From da89268c9272e5e649d7d2332c86bf2fe68f57ee Mon Sep 17 00:00:00 2001 From: Jesse Andrews Date: Sat, 15 Oct 2011 20:14:07 -0700 Subject: [PATCH] update the ping to ping, wait 5 second, really ping --- exercise.sh | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/exercise.sh b/exercise.sh index 84679f23ab..dc8163f1ab 100755 --- a/exercise.sh +++ b/exercise.sh @@ -106,7 +106,13 @@ nova show $NAME | grep status | grep -q ACTIVE IP=`nova show $NAME | grep "private network" | cut -d"|" -f3` # ping it once (timeout of a second) -ping -c1 -w1 $IP +ping -c1 -w1 $IP || true + +# sometimes the first ping fails (10 seconds isn't enough time for the VM's +# network to respond?), so let's wait 5 seconds and really test ping +sleep 5 + +ping -c1 -w1 $IP # shutdown the server nova delete $NAME