|
...
|
...
|
@@ -91,14 +91,18 @@ nova show $NAME | grep status | grep -q ACTIVE
|
|
91
|
91
|
# get the IP of the server
|
|
92
|
92
|
IP=`nova show $NAME | grep "private network" | cut -d"|" -f3`
|
|
93
|
93
|
|
|
94
|
|
-# ping it once (timeout of a second)
|
|
95
|
|
-ping -c1 -w1 $IP || true
|
|
|
94
|
+# for single node deployments, we can ping private ips
|
|
|
95
|
+MULTI_HOST=${MULTI_HOST:-0}
|
|
|
96
|
+if [ "$MULTI_HOST" = "0"]; then
|
|
|
97
|
+ # ping it once (timeout of a second)
|
|
|
98
|
+ ping -c1 -w1 $IP || true
|
|
96
|
99
|
|
|
97
|
|
-# sometimes the first ping fails (10 seconds isn't enough time for the VM's
|
|
98
|
|
-# network to respond?), so let's wait 5 seconds and really test ping
|
|
99
|
|
-sleep 5
|
|
|
100
|
+ # sometimes the first ping fails (10 seconds isn't enough time for the VM's
|
|
|
101
|
+ # network to respond?), so let's wait 5 seconds and really test ping
|
|
|
102
|
+ sleep 5
|
|
100
|
103
|
|
|
101
|
|
-ping -c1 -w1 $IP
|
|
|
104
|
+ ping -c1 -w1 $IP
|
|
|
105
|
+fi
|
|
102
|
106
|
|
|
103
|
107
|
# Security Groups & Floating IPs
|
|
104
|
108
|
# ------------------------------
|