From 053e882622190fdbed6de8420d2c5fcbb4366a45 Mon Sep 17 00:00:00 2001 From: gmarek Date: Mon, 22 Feb 2016 13:05:34 +0100 Subject: [PATCH] kube-down looks for instance templates even if instance group does not exists --- cluster/gce/util.sh | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/cluster/gce/util.sh b/cluster/gce/util.sh index d299ba1f18f..aa808b0cd13 100755 --- a/cluster/gce/util.sh +++ b/cluster/gce/util.sh @@ -824,7 +824,7 @@ function kube-down { # Get the name of the managed instance group template before we delete the # managed instance group. (The name of the managed instance group template may # change during a cluster upgrade.) - local template=$(get-template "${PROJECT}" "${ZONE}" "${NODE_INSTANCE_PREFIX}-group") + local template=$(get-template "${PROJECT}") # The gcloud APIs don't return machine parseable error codes/retry information. Therefore the best we can # do is parse the output and special case particular responses we are interested in. @@ -956,18 +956,18 @@ function kube-down { set -e } -# Gets the instance template for the managed instance group with the provided -# project, zone, and group name. It echos the template name so that the function +# Gets the instance template for given NODE_INSTANCE_PREFIX. It echos the template name so that the function # output can be used. +# Assumed vars: +# NODE_INSTANCE_PREFIX # # $1: project # $2: zone -# $3: managed instance group name function get-template { - # url is set to https://www.googleapis.com/compute/v1/projects/$1/global/instanceTemplates/