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

cgroup2: do not parse /proc/cgroups #2160

Merged
merged 1 commit into from
Oct 29, 2019

Conversation

AkihiroSuda
Copy link
Member

@AkihiroSuda AkihiroSuda commented Oct 27, 2019

/proc/cgroups is meaningless for v2 and should be ignored.

https://github.com/torvalds/linux/blob/v5.3/Documentation/admin-guide/cgroup-v2.rst#deprecated-v1-core-features

  • Now GetAllSubsystems() parses /sys/fs/cgroup/cgroup.controller, not /proc/cgroups.
    The function result also contains "pseudo" controllers: {"devices", "freezer"}.
    As it is hard to detect availability of pseudo controllers, pseudo controllers are always assumed to be available.

  • Now IOGroupV2.Name() returns "io", not "blkio".

Fix #2155 #2156

Signed-off-by: Akihiro Suda akihiro.suda.cz@hco.ntt.co.jp

/proc/cgroups is meaningless for v2 and should be ignored.

https://github.com/torvalds/linux/blob/v5.3/Documentation/admin-guide/cgroup-v2.rst#deprecated-v1-core-features

* Now GetAllSubsystems() parses /sys/fs/cgroup/cgroup.controller, not /proc/cgroups.
  The function result also contains "pseudo" controllers: {"devices", "freezer"}.
  As it is hard to detect availability of pseudo controllers, pseudo controllers
  are always assumed to be available.

* Now IOGroupV2.Name() returns "io", not "blkio"

Fix opencontainers#2155 opencontainers#2156

Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
@crosbymichael
Copy link
Member

crosbymichael commented Oct 28, 2019

LGTM

Approved with PullApprove

1 similar comment
@mrunalp
Copy link
Contributor

mrunalp commented Oct 29, 2019

LGTM

Approved with PullApprove

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.

cgroup2: IOGroupV2.Name() should return "io" rather than "blkio"?
3 participants