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
Contributor

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
@taharah

This comment has been minimized.

Contributor

taharah commented Apr 12, 2018

/assign @timothysc

@timothysc

This comment has been minimized.

Member

timothysc commented Apr 12, 2018

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

/cc @runcom

@k8s-ci-robot k8s-ci-robot requested a review from runcom Apr 12, 2018

@runcom

runcom approved these changes Apr 13, 2018

Looks ok to me, thanks for taking this one

@timothysc

/lgtm
/approve

@taharah

This comment has been minimized.

Contributor

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 label Apr 13, 2018

@k8s-ci-robot k8s-ci-robot added size/L and removed size/M labels Apr 13, 2018

@taharah

This comment has been minimized.

Contributor

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

This comment has been minimized.

Contributor

taharah commented Apr 13, 2018

/retest

@k8s-ci-robot

This comment has been minimized.

Contributor

k8s-ci-robot commented Apr 13, 2018

@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

This comment has been minimized.

Member

xiangpengzhao commented Apr 14, 2018

/ok-to-test

@xiangpengzhao

This comment has been minimized.

Member

xiangpengzhao commented Apr 14, 2018

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 :)

Trevor Wood Trevor Wood
@taharah

This comment has been minimized.

Contributor

taharah commented Apr 18, 2018

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

@kargakis

This comment has been minimized.

Member

kargakis commented Apr 18, 2018

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm label Apr 18, 2018

@k8s-ci-robot

This comment has been minimized.

Contributor

k8s-ci-robot commented Apr 18, 2018

[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

This comment has been minimized.

Contributor

taharah commented Apr 18, 2018

/retest

@k8s-merge-robot

This comment has been minimized.

Contributor

k8s-merge-robot commented Apr 19, 2018

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.

@k8s-merge-robot k8s-merge-robot merged commit 36bdcfc into kubernetes:master Apr 19, 2018

16 checks passed

Submit Queue Queued to run github e2e tests a second time.
Details
cla/linuxfoundation taharah authorized
Details
pull-kubernetes-bazel-build Job succeeded.
Details
pull-kubernetes-bazel-test Job succeeded.
Details
pull-kubernetes-cross Skipped
pull-kubernetes-e2e-gce Job succeeded.
Details
pull-kubernetes-e2e-gce-device-plugin-gpu Job succeeded.
Details
pull-kubernetes-e2e-gke Skipped
pull-kubernetes-e2e-kops-aws Job succeeded.
Details
pull-kubernetes-integration Job succeeded.
Details
pull-kubernetes-kubemark-e2e-gce Job succeeded.
Details
pull-kubernetes-local-e2e Skipped
pull-kubernetes-local-e2e-containerized Skipped
pull-kubernetes-node-e2e Job succeeded.
Details
pull-kubernetes-typecheck Job succeeded.
Details
pull-kubernetes-verify Job succeeded.
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment