Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Look up master node IP address in a loop #2950

Merged
merged 1 commit into from
Dec 15, 2014
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
13 changes: 13 additions & 0 deletions cluster/rackspace/util.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down