-
Notifications
You must be signed in to change notification settings - Fork 39.8k
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
Remove setInitError. #59020
Remove setInitError. #59020
Conversation
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.
LGTM
/lgtm |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: brendandburns, yujuhong The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these OWNERS Files:
You can indicate your approval by writing |
/test all [submit-queue is verifying that this PR is safe to merge] |
Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions here. |
Removing label |
Commit found in the "release-1.9" branch appears to be this PR. Removing the "cherrypick-candidate" label. If this is an error find help to get your PR picked. |
What this PR does / why we need it:
Removes setInitError, it's not sure it was ever really used, and it causes the kubelet to hang and get wedged.
Which issue(s) this PR fixes
Fixes #46086
Special notes for your reviewer:
If
initializeModules()
inkubelet.go
encounters an error, it callsruntimeState.setInitError(...)
kubernetes/pkg/kubelet/kubelet.go
Line 1339 in 47d61ef
The trouble with this is that
initError
is never cleared, which means thatruntimeState.runtimeErrors()
always returns thisinitError
, and thus pods never start sync-ing.In normal operation, this is expected and desired because eventually the runtime is expected to become healthy, but in this case,
initError
is never updated, and so the system just gets wedged.kubernetes/pkg/kubelet/kubelet.go
Line 1751 in 47d61ef
We could add some retry to
initializeModules()
but that seems unnecessary, as eventually we'd want to just die anyway. Instead, just log fatal and die, a supervisor will restart us.Note, I'm happy to add some retry here too, if that makes reviewers happier.
Release note:
@feiskyer @dchen1107 @janetkuo
@kubernetes/sig-node-bugs