Skip to content

Commit

Permalink
[GCE] detect-master and detect-minions api calls should specify the zone
Browse files Browse the repository at this point in the history
Otherwise KUBE_MASTER_IP and KUBE_MINION_IP_ADDRESSES may contain 'external-ip'

    $ detect-master
    Using master: kubernetes-master (external IP: external-ip)'
  • Loading branch information
Carlos Sanchez committed Sep 2, 2014
1 parent 7b44f88 commit 588a428
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions cluster/gce/util.sh
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ function detect-minions () {
KUBE_MINION_IP_ADDRESSES=()
for (( i=0; i<${#MINION_NAMES[@]}; i++)); do
local minion_ip=$(gcutil listinstances --format=csv --sort=external-ip \
--columns=external-ip --filter="name eq ${MINION_NAMES[$i]}" \
--columns=external-ip --zone ${ZONE} --filter="name eq ${MINION_NAMES[$i]}" \
| tail -n 1)
echo "Found ${MINION_NAMES[$i]} at ${minion_ip}"
KUBE_MINION_IP_ADDRESSES+=("${minion_ip}")
Expand All @@ -74,7 +74,7 @@ function detect-master () {
KUBE_MASTER=${MASTER_NAME}
if [ -z "$KUBE_MASTER_IP" ]; then
KUBE_MASTER_IP=$(gcutil listinstances --format=csv --sort=external-ip \
--columns=external-ip --filter="name eq ${MASTER_NAME}" \
--columns=external-ip --zone ${ZONE} --filter="name eq ${MASTER_NAME}" \
| tail -n 1)
fi
if [ -z "$KUBE_MASTER_IP" ]; then
Expand Down

0 comments on commit 588a428

Please sign in to comment.