only attempt to ping private ip for single node deployments

This commit is contained in:
Anthony Young 2011-10-24 22:58:14 -07:00
parent e959d83325
commit 8ecd2948ad

View file

@ -91,6 +91,9 @@ nova show $NAME | grep status | grep -q ACTIVE
# get the IP of the server # get the IP of the server
IP=`nova show $NAME | grep "private network" | cut -d"|" -f3` IP=`nova show $NAME | grep "private network" | cut -d"|" -f3`
# for single node deployments, we can ping private ips
MULTI_HOST=${MULTI_HOST:-0}
if [ "$MULTI_HOST" = "0"]; then
# ping it once (timeout of a second) # ping it once (timeout of a second)
ping -c1 -w1 $IP || true ping -c1 -w1 $IP || true
@ -99,6 +102,7 @@ ping -c1 -w1 $IP || true
sleep 5 sleep 5
ping -c1 -w1 $IP ping -c1 -w1 $IP
fi
# Security Groups & Floating IPs # Security Groups & Floating IPs
# ------------------------------ # ------------------------------