-
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
kubeadm: Fix issue when kubeadm reset isn't working and the docker service is disabled #43951
kubeadm: Fix issue when kubeadm reset isn't working and the docker service is disabled #43951
Conversation
c59da86
to
f047ce0
Compare
Removing label |
cmd/kubeadm/app/preflight/checks.go
Outdated
@@ -81,16 +81,17 @@ type ServiceCheck struct { | |||
} | |||
|
|||
func (sc ServiceCheck) Check() (warnings, errors []error) { | |||
warnings, errors = []error{}, []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.
Use var so you will continue to return nil from this method
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.
Yes, better to return nil if no data. Maybe it is enough to just remove this line.
f047ce0
to
b4912dc
Compare
ping @mikedanese @jbeda |
I assume dockerCheck returns an error if the docker service is not running? Also this doesn't compile. /lgtm |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: luxas, mikedanese
Needs approval from an approver in each of these OWNERS Files:
You can indicate your approval by writing |
b4912dc
to
2339540
Compare
@mikedanese An error is returned when the docker service is not active. |
@k8s-bot test this [submit-queue is verifying that this PR is safe to merge] |
@k8s-bot non-cri node e2e test this |
yeah, looks like docker checked out or something. |
Automatic merge from submit-queue (batch tested with PRs 43951, 43386) |
Commit found in the "release-1.6" branch appears to be this PR. Removing the "cherrypick-candidate" label. If this is an error find help to get your PR picked. |
…of-#43951-upstream-release-1.6 Automatic merge from submit-queue Automated cherry pick of kubernetes#43951 Cherry pick of kubernetes#43951 on release-1.6. kubernetes#43951: Don't fail on warnings from the docker activeness check
What this PR does / why we need it:
If the docker service is disabled, the preflight check lib will return a warning.
That warning should not matter when deciding whether to reset docker state or not.
The current code skips the docker reset if the docker service is disabled, which is a bug.
Also,
Check()
must not return anil
slice.It should be added that I really don't like what we have at the moment, I'd love to discuss with the node team to add something to CRI that basically says, "remove everything on this node" so we can stop doing this. Basically, kubeadm could talk to the specified socket (by default dockershim.sock), and call the CRI interface and say that everything should be cleaned up. This would then be cross-CRI-implementation at the same time and would work if you're using rkt, cri-o or whatever.
Which issue this PR fixes (optional, in
fixes #<issue number>(, fixes #<issue_number>, ...)
format, will close that issue when PR gets merged):helps in #43950
Special notes for your reviewer:
Release note:
@mikedanese @jbeda @dmmcquay @pipejakob @yujuhong @freehan