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

Move containerd process into docker cgroup for versions >= v1.11 #26391

Merged
merged 1 commit into from
May 28, 2016

Conversation

timstclair
Copy link

Addresses #23397 (comment)

/cc @vishh @kubernetes/sig-node

type process struct{ name, file string }
dockerProcs := []process{{dockerProcessName, dockerPidFile}}
if dockerVersion.GTE(containerdVersion) {
dockerProcs = append(dockerProcs, process{containerdProcessName, ""})
Copy link
Contributor

Choose a reason for hiding this comment

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

Is there a pid-file for containerd?

Copy link
Author

Choose a reason for hiding this comment

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

I decided to try one more search, and found it! /run/docker/libcontainerd/docker-containerd.pid I can't find any documentation of that though...

Copy link
Contributor

Choose a reason for hiding this comment

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

I'm not surprised about the lack of documentation. Let's add it.

Copy link
Author

Choose a reason for hiding this comment

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

Oops, sorry! Forgot to update this to the new constant.

@vishh
Copy link
Contributor

vishh commented May 27, 2016

LGTM. Thanks for the cleanup @timstclair !

@k8s-github-robot k8s-github-robot added size/M Denotes a PR that changes 30-99 lines, ignoring generated files. release-note-label-needed labels May 27, 2016
@timstclair timstclair assigned vishh and unassigned dchen1107 May 27, 2016
@timstclair timstclair added release-note-none Denotes a PR that doesn't merit a release note. and removed release-note-label-needed labels May 27, 2016
@timstclair
Copy link
Author

Fixed. Thanks!

dockerProcessName = "docker"
dockerPidFile = "/var/run/docker.pid"
containerdProcessName = "docker-containerd"
containerdPidFile = "/run/docker/libcontainerd/docker-containerd.pid"
Copy link
Contributor

Choose a reason for hiding this comment

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

Was this /var/run or /run? Just checking..

Copy link
Author

Choose a reason for hiding this comment

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

/run is right (it has more docker information than /var/run)

Copy link
Contributor

Choose a reason for hiding this comment

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

Is using this pid file documented and stable? We should probably ask the Docker team to do that if not.

Copy link
Author

Choose a reason for hiding this comment

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

I can't find any documentation around this path, but we do have a fallback (pidof) if the file isn't found. I'll follow up with a docker issue to check the stability.

@vishh vishh added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label May 27, 2016
@vishh
Copy link
Contributor

vishh commented May 27, 2016

@timstclair If there is a PR that is switching docker versions to v1.11, then I'd suggest marking this PR as a pre-req for that PR.

@timstclair
Copy link
Author

Thanks, done.

@k8s-github-robot k8s-github-robot removed the lgtm "Looks good to me", indicates that a PR is ready to be merged. label May 27, 2016
@timstclair
Copy link
Author

Reapplying LGTM after trivial fix (addressing @vishh's comment)

@timstclair timstclair added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label May 27, 2016
@timstclair
Copy link
Author

@k8s-bot node e2e test this, issue #26385

@dchen1107 dchen1107 added the priority/critical-urgent Highest priority. Must be actively worked on as someone's top priority right now. label May 27, 2016
@dchen1107
Copy link
Member

According to the perfdash, cpu usage of docker drops 50% after introducing docker 1.11.1, but that is not the truth since this pr is not merged, and part of resource overhead is not accounting to docker cgroup. :-( Bumping the priority to p0 so that we can have a better resource overhead monitoring for 1.3.

@timstclair
Copy link
Author

@k8s-bot e2e test this, issue #26324

@k8s-bot
Copy link

k8s-bot commented May 28, 2016

GCE e2e build/test passed for commit e4d8dea.

@k8s-github-robot
Copy link

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

@k8s-bot
Copy link

k8s-bot commented May 28, 2016

GCE e2e build/test passed for commit e4d8dea.

@k8s-github-robot
Copy link

Automatic merge from submit-queue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/docker lgtm "Looks good to me", indicates that a PR is ready to be merged. priority/critical-urgent Highest priority. Must be actively worked on as someone's top priority right now. release-note-none Denotes a PR that doesn't merit a release note. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants