| ... | ... |
@@ -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 |