-
Notifications
You must be signed in to change notification settings - Fork 40k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
nodecontroller: Fix log message on successful update #26207
Conversation
cc @kubernetes/sig-node |
Amusingly, on a 1000 node cluster this was easy to see. On a 2000 node, the nodecontroller is in some crazy death spiral. |
@k8s-bot test this, issue #IGNORE (not sure, still looking) |
@@ -375,7 +375,7 @@ func (nc *NodeController) allocateOrOccupyCIDR(obj interface{}) { | |||
glog.V(4).Infof("Assigning node %s CIDR %s", node.Name, podCIDR) | |||
for rep := 0; rep < podCIDRUpdateRetry; rep++ { | |||
node.Spec.PodCIDR = podCIDR.String() | |||
if _, err := nc.kubeClient.Core().Nodes().Update(node); err == nil { | |||
if _, err := nc.kubeClient.Core().Nodes().Update(node); err != nil { | |||
glog.Errorf("Failed while updating Node.Spec.PodCIDR : %v", err) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
hmm, if i run into error on update (like resource version conflict) I'd want to re-get and retry the update till podCIDRUpdateRetry. This will break on first error?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah. The code looks messed up both directions (there's a break below as well). Trying to fix it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actually, the bug here is just the log message, nothing else, I just realized.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
PTAL
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you make it clearer that this isn't an actual failure but one that we might retry? i.e just will retry %d times, (podCIDRUpdateRetry-rep).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done. PTAL.
c44068b
to
70469f8
Compare
Is this the fix for #26211? cc/ @Random-Liu |
@dhen1107: No, it's unrelated log spam I found along the way. I thought there was a bug here and it turned out to just be a bug in the logging of of the update case. |
@k8s-bot e2e test this please github issue: #IGNORE |
@k8s-bot e2e test this, issue #IGNORE |
Can I get an LGTM on this? (Out the next two days.) |
70469f8
to
5876e6d
Compare
@k8s-bot e2e test this, issue #IGNORE (PR builder was being bad) |
5876e6d
to
cb69960
Compare
LGTM, thanks |
GCE e2e build/test passed for commit cb69960. |
Manually merging small PRs while submit queue is struggling |
Seen in logs as: