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 preflight: check CRI socket path if defined or docker service otherwise #62481

Merged
merged 1 commit into from
Apr 19, 2018

Conversation

taharah
Copy link

@taharah taharah commented Apr 12, 2018

What this PR does / why we need it:

Currently, running kubeadm init without Docker installed will cause the Service-Docker preflight check to fail even when another CRI is installed and the CRI socket specified. This changes the preflight checks to check the CRI socket if specified, and falling back to checking the Docker service otherwise. Additionally, this deduplicates common checks between kubeadm init and kubeadm join to ensure that similar preflight checks stay in-sync going forward.

Which issue(s) this PR fixes (optional, in fixes #<issue number>(, fixes #<issue_number>, ...) format, will close the issue(s) when PR gets merged):
Fixes # kubernetes/kubeadm#657 - it still has the same behavior on joins
Fixes # kubernetes/kubeadm#749 - will check the CRI socket if specified and skip the Docker service check

Special notes for your reviewer:

Release note:

kubeadm preflight: check CRI socket path if defined, otherwise check for Docker

@k8s-ci-robot k8s-ci-robot added size/M Denotes a PR that changes 30-99 lines, ignoring generated files. release-note Denotes a PR that will be considered when it comes time to generate release notes. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Apr 12, 2018
@k8s-ci-robot k8s-ci-robot added area/kubeadm sig/cluster-lifecycle Categorizes an issue or PR as relevant to SIG Cluster Lifecycle. labels Apr 12, 2018
@taharah
Copy link
Author

taharah commented Apr 12, 2018

/assign @timothysc

@timothysc
Copy link
Member

I'll do a pass, but I would also like feedback from

/cc @runcom

Copy link
Contributor

@runcom runcom left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks ok to me, thanks for taking this one

@timothysc timothysc removed the needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. label Apr 13, 2018
Copy link
Member

@timothysc timothysc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/lgtm
/approve

@k8s-ci-robot k8s-ci-robot added lgtm "Looks good to me", indicates that a PR is ready to be merged. approved Indicates a PR has been approved by an approver from all required OWNERS files. labels Apr 13, 2018
@taharah
Copy link
Author

taharah commented Apr 13, 2018

Thinking about this a little more, I am currently checking if the socket is defined at all, which it will always be since it will take the default of /var/run/dockershim.sock if it's not defined. Thus, I am going to amend the commit to check that the socket defined is not equal to the default rather than defined at all.

@timothysc timothysc removed the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Apr 13, 2018
@k8s-ci-robot k8s-ci-robot added size/L Denotes a PR that changes 100-499 lines, ignoring generated files. and removed size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Apr 13, 2018
@taharah
Copy link
Author

taharah commented Apr 13, 2018

@timothysc and @runcom I added some additional deduplication of the checks that were common for both the kubeadm init and kubeadm join commands as well as changed to checking if the CRISocket defined is the default or not rather than simply checking if it has been defined at all.

@taharah
Copy link
Author

taharah commented Apr 13, 2018

/retest

@k8s-ci-robot
Copy link
Contributor

@taharah: you can't request testing unless you are a kubernetes member.

In response to this:

/retest

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@xiangpengzhao
Copy link
Contributor

/ok-to-test

@xiangpengzhao
Copy link
Contributor

Hi @timothysc , I notice that you manually removed needs-ok-to-test label in this PR and others. However, manually remove this label doesn't make the PR trusted. (A trusted PR in test-infra means that it can be retested when author push new changes to the PR.) Only commenting /ok-to-test can make a PR trusted (and remove the label) so I suggest you remove the label by commenting :)

@taharah
Copy link
Author

taharah commented Apr 18, 2018

@timothysc or @xiangpengzhao this PR should be good to be merged now.

@0xmichalis
Copy link
Contributor

/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 18, 2018
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: kargakis, taharah, timothysc

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@taharah
Copy link
Author

taharah commented Apr 18, 2018

/retest

@k8s-github-robot
Copy link

Automatic merge from submit-queue (batch tested with PRs 62481, 62643, 61877, 62515). If you want to cherry-pick this change to another branch, please follow the instructions here.

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. area/kubeadm 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. sig/cluster-lifecycle Categorizes an issue or PR as relevant to SIG Cluster Lifecycle. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

7 participants