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

Place containerd inside cgroup #1443

Merged
merged 1 commit into from Aug 30, 2017

Conversation

crosbymichael
Copy link
Member

This adds a config option to place the containerd daemon process into
a cgroup so that proper resource usage and accounting can be applied.

It defaults to not being place inside a cgroup and will create a new
cgroup if the path does not exist in the config or join an existing
path if it already exists.

[cgroup]
    path = "/containerd"

Signed-off-by: Michael Crosby crosbymichael@gmail.com

This adds a config option to place the `containerd` daemon process into
a cgroup so that proper resource usage and accounting can be applied.

It defaults to not being place inside a cgroup and will create a new
cgroup if the `path` does not exist in the config or join an existing
`path` if it already exists.

```toml
[cgroup]
    path = "/containerd"
```

Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
@crosbymichael
Copy link
Member Author

@Random-Liu

This should help with the container manager for making sure containerd and its shims are placed inside a cgroup together.

ref: containerd/cri#62

@codecov-io
Copy link

Codecov Report

Merging #1443 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@          Coverage Diff           @@
##           master   #1443   +/-   ##
======================================
  Coverage    40.8%   40.8%           
======================================
  Files          23      23           
  Lines        2924    2924           
======================================
  Hits         1193    1193           
  Misses       1453    1453           
  Partials      278     278

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update c3711c3...932246b. Read the comment docs.

@Random-Liu
Copy link
Member

Random-Liu commented Aug 29, 2017

@crosbymichael This is cooooool!

I thought we had to do it ourselves. :)

@Random-Liu
Copy link
Member

I discussed this with @yujuhong.

We'll do the same in cri-containerd. For now it will be users' responsibility to properly configure the node, to make sure containerd, cri-containerd are in runtime cgroup; and tell kubelet where the cgroup is.

LGTM

Copy link
Member

@estesp estesp left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Contributor

@mlaventure mlaventure left a comment

Choose a reason for hiding this comment

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

LGTM

@mlaventure mlaventure merged commit 49e3d43 into containerd:master Aug 30, 2017
mauriciovasquezbernal pushed a commit to kinvolk/containerd that referenced this pull request Nov 13, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants