Skip to content

cgroupv2: don't try to set kmem for systemd case#2270

Merged
mrunalp merged 1 commit intoopencontainers:masterfrom
kolyshkin:systemd-no-kmem
Mar 26, 2020
Merged

cgroupv2: don't try to set kmem for systemd case#2270
mrunalp merged 1 commit intoopencontainers:masterfrom
kolyshkin:systemd-no-kmem

Conversation

@kolyshkin
Copy link
Contributor

To the best of my knowledge, it has been decided to drop the kernel
memory controller from the cgroupv2 hierarchy, so "kernel memory limits"
do not exist if we're using v2 unified.

So, we need to ignore kernel memory setting. This was already done in
non-systemd case (see commit 88e8350), let's do the same for systemd.

This fixes the following error:

container_linux.go:349: starting container process caused "process_linux.go:306: applying cgroup configuration for process caused "open /sys/fs/cgroup/machine.slice/runc-cgroups-integration-test.scope/tasks: no such file or directory""

@AkihiroSuda @mrunalp PTAL

To the best of my knowledge, it has been decided to drop the kernel
memory controller from the cgroupv2 hierarchy, so "kernel memory limits"
do not exist if we're using v2 unified.

So, we need to ignore kernel memory setting. This was already done in
non-systemd case (see commit 88e8350), let's do the same for systemd.

This fixes the following error:

> container_linux.go:349: starting container process caused "process_linux.go:306: applying cgroup configuration for process caused \"open /sys/fs/cgroup/machine.slice/runc-cgroups-integration-test.scope/tasks: no such file or directory\""

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
@kolyshkin
Copy link
Contributor Author

This PR does not come with a test case as I am currently working on updating our existing cgroup integration tests (those in tests/integration/update.bats) for v2, and will do a separate PR once it's ready for review.

@AkihiroSuda
Copy link
Member

AkihiroSuda commented Mar 26, 2020

LGTM, thanks

Approved with PullApprove

@mrunalp
Copy link
Contributor

mrunalp commented Mar 26, 2020

LGTM

Approved with PullApprove

@mrunalp mrunalp merged commit 96596cb into opencontainers:master Mar 26, 2020
@kolyshkin kolyshkin deleted the systemd-no-kmem branch March 30, 2020 15:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants