Skip to content

Place containerd inside cgroup#1443

Merged
mlaventure merged 1 commit intocontainerd:masterfrom
crosbymichael:daemon-cgroup
Aug 30, 2017
Merged

Place containerd inside cgroup#1443
mlaventure merged 1 commit intocontainerd:masterfrom
crosbymichael:daemon-cgroup

Conversation

@crosbymichael
Copy link
Copy Markdown
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 [email protected]

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 <[email protected]>
@crosbymichael
Copy link
Copy Markdown
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
Copy Markdown

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
Copy Markdown
Member

Random-Liu commented Aug 29, 2017

@crosbymichael This is cooooool!

I thought we had to do it ourselves. :)

@Random-Liu
Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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.

5 participants