Merge pull request #31294 from mml/federated-oops

Automatic merge from submit-queue

Fix e2e logic when FEDERATION=false.

Also add debugging output to GCE detect-master.

Fixes #31285.
pull/6/head
Kubernetes Submit Queue 2016-09-05 13:01:12 -07:00 committed by GitHub
commit 09e5fa62b5
2 changed files with 6 additions and 3 deletions

View File

@ -367,15 +367,18 @@ function detect-nodes() {
function detect-master() {
detect-project
KUBE_MASTER=${MASTER_NAME}
echo "Trying to find master named '${MASTER_NAME}'" >&2
if [[ -z "${KUBE_MASTER_IP-}" ]]; then
KUBE_MASTER_IP=$(gcloud compute addresses describe "${MASTER_NAME}-ip" \
local master_address_name="${MASTER_NAME}-ip"
echo "Looking for address '${master_address_name}'" >&2
KUBE_MASTER_IP=$(gcloud compute addresses describe "${master_address_name}" \
--project "${PROJECT}" --region "${REGION}" -q --format='value(address)')
fi
if [[ -z "${KUBE_MASTER_IP-}" ]]; then
echo "Could not detect Kubernetes master node. Make sure you've launched a cluster with 'kube-up.sh'" >&2
exit 1
fi
echo "Using master: $KUBE_MASTER (external IP: $KUBE_MASTER_IP)"
echo "Using master: $KUBE_MASTER (external IP: $KUBE_MASTER_IP)" >&2
}
# Reads kube-env metadata from master

View File

@ -428,7 +428,7 @@ func Test() bool {
}
// TODO(fejta): add a --federated or something similar
if os.Getenv("FEDERATION") == "" {
if os.Getenv("FEDERATION") != "true" {
if *checkNodeCount {
ValidateClusterSize()
}