Browse code

update the ping to ping, wait 5 second, really ping

Jesse Andrews authored on 2011/10/16 12:14:07
Showing 1 changed files
... ...
@@ -106,7 +106,13 @@ nova show $NAME | grep status | grep -q ACTIVE
106 106
 IP=`nova show $NAME | grep "private network" | cut -d"|" -f3`
107 107
 
108 108
 # ping it once (timeout of a second)
109
-ping -c1 -w1 $IP
109
+ping -c1 -w1 $IP || true
110
+
111
+# sometimes the first ping fails (10 seconds isn't enough time for the VM's 
112
+# network to respond?), so let's wait 5 seconds and really test ping
113
+sleep 5
114
+
115
+ping -c1 -w1 $IP 
110 116
 
111 117
 # shutdown the server
112 118
 nova delete $NAME