Merge pull request #3473 from zmerlynn/fix_pd_sh

GKE: Fix unbound variable when pd.sh fails
This commit is contained in:
Daniel Smith 2015-01-14 13:43:54 -08:00
commit 4e539001df
2 changed files with 2 additions and 6 deletions

View File

@ -21,6 +21,7 @@
MASTER_NAME="k8s-${CLUSTER_NAME}-master" MASTER_NAME="k8s-${CLUSTER_NAME}-master"
ZONE="${ZONE:-us-central1-f}" ZONE="${ZONE:-us-central1-f}"
NUM_MINIONS="${NUM_MINIONS:-2}" NUM_MINIONS="${NUM_MINIONS:-2}"
MINION_NAMES=($(eval echo "k8s-${CLUSTER_NAME}-node-{1..${NUM_MINIONS}}"))
CLUSTER_API_VERSION="${CLUSTER_API_VERSION:-}" CLUSTER_API_VERSION="${CLUSTER_API_VERSION:-}"
# TODO(mbforbes): Actually plumb this through; this currently only works # TODO(mbforbes): Actually plumb this through; this currently only works
# because we use the 'default' network by default. # because we use the 'default' network by default.

View File

@ -188,14 +188,9 @@ function detect-master() {
# NUM_MINIONS # NUM_MINIONS
# CLUSTER_NAME # CLUSTER_NAME
# Vars set: # Vars set:
# MINION_NAMES (array) # (none)
function detect-minions() { function detect-minions() {
echo "... in detect-minions()" >&2 echo "... in detect-minions()" >&2
# Just get the minion names.
MINION_NAMES=()
for (( i=1; i<=${NUM_MINIONS}; i++)); do
MINION_NAMES+=("k8s-${CLUSTER_NAME}-node-${i}")
done
} }
# SSH to a node by name ($1) and run a command ($2). # SSH to a node by name ($1) and run a command ($2).