mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-28 14:07:14 +00:00
Merge pull request #89602 from kvaps/fix-rejoin
Kubeadm: fix Ready condition check
This commit is contained in:
commit
9cbb46e39f
@ -148,7 +148,7 @@ func runKubeletStartJoinPhase(c workflow.RunData) (returnErr error) {
|
|||||||
return errors.Wrapf(err, "cannot get Node %q", nodeName)
|
return errors.Wrapf(err, "cannot get Node %q", nodeName)
|
||||||
}
|
}
|
||||||
for _, cond := range node.Status.Conditions {
|
for _, cond := range node.Status.Conditions {
|
||||||
if cond.Type == v1.NodeReady {
|
if cond.Type == v1.NodeReady && cond.Status == v1.ConditionTrue {
|
||||||
return errors.Errorf("a Node with name %q and status %q already exists in the cluster. "+
|
return errors.Errorf("a Node with name %q and status %q already exists in the cluster. "+
|
||||||
"You must delete the existing Node or change the name of this new joining Node", nodeName, v1.NodeReady)
|
"You must delete the existing Node or change the name of this new joining Node", nodeName, v1.NodeReady)
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user