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

[Part 1] Remove docker dep in kubelet startup #54405

Merged
merged 1 commit into from
Nov 13, 2017

Conversation

resouer
Copy link
Contributor

@resouer resouer commented Oct 23, 2017

What this PR does / why we need it:

Remove dependency of docker during kubelet start up.

Which issue this PR fixes (optional, in fixes #<issue number>(, fixes #<issue_number>, ...) format, will close that issue when PR gets merged):

Part 1 of #54090

Special notes for your reviewer:
Changes include:

  1. Move docker client initialization into dockershim pkg.
  2. Pass a docker ClientConfig from kubelet to dockershim
  3. Pass parameters needed by FakeDockerClient thru ClientConfig to dockershim

(TODO, the second part) Make dockershim tolerate when dockerd is down, otherwise it will still fail kubelet

Please note after this PR, kubelet will still fail if dockerd is down, this will be fixed in the subsequent PR by making dockershim tolerate dockerd failure (initializing docker client in a separate goroutine), and refactoring cgroup and log driver detection.

Release note:

Remove docker dependency during kubelet start up 

@resouer resouer added this to the v1.9 milestone Oct 23, 2017
@k8s-ci-robot k8s-ci-robot added release-note Denotes a PR that will be considered when it comes time to generate release notes. size/L Denotes a PR that changes 100-499 lines, ignoring generated files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. labels Oct 23, 2017
func NewDockerClientFromConfig(config *ClientConfig) libdocker.Interface {
if config != nil {
if config.IsFakeClient {
// Create fake docker client.
Copy link
Member

Choose a reason for hiding this comment

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

This feels wrong ... (mixing code used during testing)

Copy link
Contributor Author

@resouer resouer Oct 23, 2017

Choose a reason for hiding this comment

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

@dims Yes, I agree it's smelly.

It's basically caused by I am trying to put docker client init to dockershim to fix the original issue, but hollow_node also relies on a fake docker client. This is tricky to avoid as dockershim is currently part of kubelet ... cc @yujuhong any thoughts?

@resouer resouer changed the title Remove docker dep in kubelet startup [WIP] Remove docker dep in kubelet startup Oct 24, 2017
@k8s-ci-robot k8s-ci-robot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Oct 24, 2017
@resouer resouer force-pushed the clean-docker-dep branch 3 times, most recently from a2b9db5 to 9bc478c Compare October 24, 2017 16:09
@resouer resouer changed the title [WIP] Remove docker dep in kubelet startup [Part 1] Remove docker dep in kubelet startup Oct 26, 2017
@k8s-ci-robot k8s-ci-robot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Oct 26, 2017
@resouer resouer removed the request for review from dashpole October 26, 2017 06:37
@k8s-github-robot k8s-github-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Oct 31, 2017
@k8s-github-robot k8s-github-robot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Nov 1, 2017
@resouer
Copy link
Contributor Author

resouer commented Nov 2, 2017

Yuju is kind of overload ... ping @kubernetes/sig-node-pr-reviews for first round review, then will kindly ask @yujuhong for final pass.

@k8s-ci-robot k8s-ci-robot added the sig/node Categorizes an issue or PR as relevant to SIG Node. label Nov 2, 2017
@derekwaynecarr
Copy link
Member

@resouer - this lgtm.

/lgtm
/approve

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Nov 8, 2017
@derekwaynecarr
Copy link
Member

fyi @sjenning -- it would be good to track this work.

@resouer
Copy link
Contributor Author

resouer commented Nov 12, 2017

Kindly ping @shyamjvs @wojtek-t , take a look at the kubemark part? It's a minor change.

@resouer
Copy link
Contributor Author

resouer commented Nov 12, 2017

/test pull-kubernetes-unit

@shyamjvs
Copy link
Member

/approve

@k8s-github-robot
Copy link

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: derekwaynecarr, resouer, shyamjvs

Associated issue: 54090

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

@k8s-github-robot k8s-github-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Nov 13, 2017
@k8s-github-robot
Copy link

/test all [submit-queue is verifying that this PR is safe to merge]

@k8s-github-robot
Copy link

Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions here.

@k8s-github-robot k8s-github-robot merged commit 41fe3ed into kubernetes:master Nov 13, 2017
@resouer resouer deleted the clean-docker-dep branch November 13, 2017 15:25
@deads2k deads2k mentioned this pull request Dec 6, 2017
25 tasks
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. sig/node Categorizes an issue or PR as relevant to SIG Node. 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

8 participants