From 6ae0eb88063a09b974e823f28db958b84077b21e Mon Sep 17 00:00:00 2001 From: Shyam Jeedigunta Date: Wed, 13 Sep 2017 14:03:03 +0200 Subject: [PATCH] Fix bug with gke in logdump --- cluster/log-dump/log-dump.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/cluster/log-dump/log-dump.sh b/cluster/log-dump/log-dump.sh index c8d0a9e34c3..62357ae5a5c 100755 --- a/cluster/log-dump/log-dump.sh +++ b/cluster/log-dump/log-dump.sh @@ -68,7 +68,10 @@ function setup() { elif [[ "${KUBERNETES_PROVIDER}" == "gke" ]]; then echo "Using 'use_custom_instance_list' with gke, skipping check for LOG_DUMP_SSH_KEY and LOG_DUMP_SSH_USER" # Source the below script for the ssh-to-node utility function. + # Hack to save and restore the value of the ZONE env as the script overwrites it. + local gke_zone="${ZONE:-}" source "${KUBE_ROOT}/cluster/gce/util.sh" + ZONE="${gke_zone}" elif [[ -z "${LOG_DUMP_SSH_KEY:-}" ]]; then echo "LOG_DUMP_SSH_KEY not set, but required when using log_dump_custom_get_instances" exit 1