GKE: Fix unbound variable when pd.sh fails

In the other providers, MINION_NAMES is bound early and detect_minions
is actually only used to detect the IPs of the minions, which is why I
didn't expect to need to call it. Move the initialization to
config-common.sh in GKE as well.

This follows the pattern of cluster/gce/config-{default,test}.sh
This commit is contained in:
Zach Loafman
2015-01-14 12:17:12 -08:00
parent 21e81de190
commit 8cf93288fa
2 changed files with 2 additions and 6 deletions

View File

@@ -188,14 +188,9 @@ function detect-master() {
# NUM_MINIONS
# CLUSTER_NAME
# Vars set:
# MINION_NAMES (array)
# (none)
function detect-minions() {
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).