mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-05 18:24:07 +00:00
Merge pull request #63718 from krousey/node-upgrade
Automatic merge from submit-queue (batch tested with PRs 63367, 63718, 63446, 63723, 63720). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>. Move uncordon to after the node is ready **What this PR does / why we need it**: It is possible that the node API object doesn't exist in a brief window between recreation and registering. By moving the uncordon until after the node is ready, we can be sure the API object exists. **Which issue(s) this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close the issue(s) when PR gets merged)*: Fixes #63506 #63499 **Release note**: ```release-note NONE ```
This commit is contained in:
commit
59a04e18cc
@ -342,16 +342,6 @@ function do-single-node-upgrade() {
|
|||||||
sleep 1
|
sleep 1
|
||||||
done
|
done
|
||||||
|
|
||||||
# Uncordon the node.
|
|
||||||
echo "== Uncordon ${instance}. == " >&2
|
|
||||||
local uncordon_rc
|
|
||||||
"${KUBE_ROOT}/cluster/kubectl.sh" uncordon "${instance}" \
|
|
||||||
&& uncordon_rc=$? || uncordon_rc=$?
|
|
||||||
if [[ "${uncordon_rc}" != 0 ]]; then
|
|
||||||
echo "== FAILED to uncordon ${instance} =="
|
|
||||||
return ${uncordon_rc}
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Wait for the node to have Ready=True.
|
# Wait for the node to have Ready=True.
|
||||||
echo "== Waiting for ${instance} to become ready. ==" >&2
|
echo "== Waiting for ${instance} to become ready. ==" >&2
|
||||||
while true; do
|
while true; do
|
||||||
@ -364,6 +354,16 @@ function do-single-node-upgrade() {
|
|||||||
fi
|
fi
|
||||||
sleep 1
|
sleep 1
|
||||||
done
|
done
|
||||||
|
|
||||||
|
# Uncordon the node.
|
||||||
|
echo "== Uncordon ${instance}. == " >&2
|
||||||
|
local uncordon_rc
|
||||||
|
"${KUBE_ROOT}/cluster/kubectl.sh" uncordon "${instance}" \
|
||||||
|
&& uncordon_rc=$? || uncordon_rc=$?
|
||||||
|
if [[ "${uncordon_rc}" != 0 ]]; then
|
||||||
|
echo "== FAILED to uncordon ${instance} =="
|
||||||
|
return ${uncordon_rc}
|
||||||
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
# Prereqs:
|
# Prereqs:
|
||||||
|
Loading…
Reference in New Issue
Block a user