From eb0a11717f7a0bb0f1d6b619a1dddc0eb0d932e3 Mon Sep 17 00:00:00 2001 From: Steve Reed Date: Mon, 15 Dec 2014 14:38:30 -0800 Subject: [PATCH] Look up master node IP address in a loop --- cluster/rackspace/util.sh | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/cluster/rackspace/util.sh b/cluster/rackspace/util.sh index e7b1180b6b1..cbbaeef669c 100644 --- a/cluster/rackspace/util.sh +++ b/cluster/rackspace/util.sh @@ -238,7 +238,20 @@ detect-minions() { detect-master() { KUBE_MASTER=${MASTER_NAME} + echo "Waiting for ${MASTER_NAME} IP Address." + echo + echo " This will continually check to see if the master node has an IP address." + echo + KUBE_MASTER_IP=$(nova show $KUBE_MASTER --minimal | grep accessIPv4 | awk '{print $4}') + + while [ "${KUBE_MASTER_IP-|}" == "|" ]; do + KUBE_MASTER_IP=$(nova show $KUBE_MASTER --minimal | grep accessIPv4 | awk '{print $4}') + printf "." + sleep 2 + done + + echo "${KUBE_MASTER} IP Address is ${KUBE_MASTER_IP}" } # $1 should be the network you would like to get an IP address for