From 263c54c42401dd3d0538bcc445d1982370fe1cb0 Mon Sep 17 00:00:00 2001 From: Michael Taufen Date: Mon, 10 Oct 2016 10:54:19 -0700 Subject: [PATCH] Fix upgrade.sh image setup The original fix (#33147) sourced the correct `node-helper.sh` but set `node_os_distribution` instead of `NODE_OS_DISTRIBUTION`. The `set-node-image` function is imported indirectly via `source "${KUBE_ROOT}/cluster/kube-util.sh"`, which in turn (in the GCE case) sources `cluster/gce/util.sh`. Since the `set-node-image` function relies on the `NODE_OS_DISTRIBUTION` variable, the original fix did not have the entire intended effect. I have confirmed that cherry-picking #33147 into the `release-1.4` branch and layering this commit on top of it make for a successful upgrade from a GCI based K8s 1.3 cluster to a GCI based K8s 1.4 cluster. --- cluster/gce/upgrade.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cluster/gce/upgrade.sh b/cluster/gce/upgrade.sh index 5e705f2f739..0ead0adaec8 100755 --- a/cluster/gce/upgrade.sh +++ b/cluster/gce/upgrade.sh @@ -179,8 +179,8 @@ function upgrade-nodes() { function setup-base-image() { if [[ "${env_os_distro}" == "false" ]]; then echo "== Ensuring that new Node base OS image matched the existing Node base OS image" - node_os_distribution=$(get-node-os "${NODE_NAMES[0]}") - source "${KUBE_ROOT}/cluster/gce/${node_os_distribution}/node-helper.sh" + NODE_OS_DISTRIBUTION=$(get-node-os "${NODE_NAMES[0]}") + source "${KUBE_ROOT}/cluster/gce/${NODE_OS_DISTRIBUTION}/node-helper.sh" # Reset the node image based on current os distro set-node-image fi