mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-29 06:27:05 +00:00
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.
This commit is contained in:
parent
e72f26a3ff
commit
263c54c424
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user