Skip to content
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

Merged
merged 1 commit into from
Apr 7, 2017

Conversation

luxas
Copy link
Member

@luxas luxas commented Apr 1, 2017

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 a nil 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:

kubeadm: Make `kubeadm reset` tolerant of a disabled docker service.

@mikedanese @jbeda @dmmcquay @pipejakob @yujuhong @freehan

@luxas luxas added this to the v1.6.1 milestone Apr 1, 2017
@k8s-ci-robot k8s-ci-robot added the cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. label Apr 1, 2017
@k8s-reviewable
Copy link

This change is Reviewable

@k8s-github-robot k8s-github-robot added approved Indicates a PR has been approved by an approver from all required OWNERS files. size/S Denotes a PR that changes 10-29 lines, ignoring generated files. release-note Denotes a PR that will be considered when it comes time to generate release notes. labels Apr 1, 2017
@k8s-cherrypick-bot
Copy link

Removing label cherrypick-candidate because no release milestone was set. This is an invalid state and thus this PR is not being considered for cherry-pick to any release branch. Please add an appropriate release milestone and then re-add the label.

@luxas luxas modified the milestones: v1.6, v1.6.1 Apr 1, 2017
@@ -81,16 +81,17 @@ type ServiceCheck struct {
}

func (sc ServiceCheck) Check() (warnings, errors []error) {
warnings, errors = []error{}, []error{}
Copy link
Contributor

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

Copy link
Contributor

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.

@luxas
Copy link
Member Author

luxas commented Apr 6, 2017

ping @mikedanese @jbeda

@k8s-github-robot k8s-github-robot added size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. and removed size/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels Apr 6, 2017
@mikedanese
Copy link
Member

I assume dockerCheck returns an error if the docker service is not running? Also this doesn't compile.

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Apr 6, 2017
@k8s-github-robot
Copy link

[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 /approve in a comment
You can cancel your approval by writing /approve cancel in a comment

@k8s-github-robot k8s-github-robot removed the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Apr 7, 2017
@luxas luxas added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Apr 7, 2017
@luxas
Copy link
Member Author

luxas commented Apr 7, 2017

@mikedanese An error is returned when the docker service is not active.
A warning is returned if the service is not active; which we should not care about when resetting things

@k8s-github-robot
Copy link

@k8s-bot test this [submit-queue is verifying that this PR is safe to merge]

@luxas
Copy link
Member Author

luxas commented Apr 7, 2017

@k8s-bot non-cri node e2e test this

@luxas
Copy link
Member Author

luxas commented Apr 7, 2017

@k8s-bot verify test this

@ixdy I think this build timed out

@ixdy
Copy link
Member

ixdy commented Apr 7, 2017

yeah, looks like docker checked out or something.

@k8s-github-robot
Copy link

Automatic merge from submit-queue (batch tested with PRs 43951, 43386)

@k8s-github-robot k8s-github-robot merged commit e6dc134 into kubernetes:master Apr 7, 2017
k8s-github-robot pushed a commit that referenced this pull request Apr 10, 2017
…upstream-release-1.6

Automatic merge from submit-queue

Automated cherry pick of #43951

Cherry pick of #43951 on release-1.6.

#43951: Don't fail on warnings from the docker activeness check
@k8s-cherrypick-bot
Copy link

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.

mintzhao pushed a commit to mintzhao/kubernetes that referenced this pull request Jun 1, 2017
…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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. lgtm "Looks good to me", indicates that a PR is ready to be merged. release-note Denotes a PR that will be considered when it comes time to generate release notes. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

10 participants