-
-
Notifications
You must be signed in to change notification settings - Fork 3.7k
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
test-oomd-util fails in container #20593
Comments
|
Oh I think I mis-tested, this probably is a "hybrid outside" / "unified inside" thing (maybe it fails with a unified hierarchy on the outside too with an old enough kernel?) |
|
Yes, so with kernel 5.4 the test fails even with unified cgroups on the host. With 5.11 or 5.13 it only fails with a hybrid cgroups on the host. |
|
/cc @anitazha |
|
which systemd version is used inside the container? does it fail if you compile current git of systemd and run the testuite from that? "meson build && ninja -C build test" |
|
didn't I fix this with commit 1354002 |
|
Oh yes probably, argh. |
|
Okay, so after playing around with this a bit more, I'd say this definitely is a "hybrid outside" / "unified inside" issue and ddstreet's commit does not fix the issue. 1354002 fixed the situation for Therefore I think this issue should be re-opened. @anitazha I can reproduce it on an Ubuntu Impish host (kernel 5.11.0-31-generic, systemd 248.3-1ubuntu3), running an Ubuntu Impish container (kernel 5.11.0-31-generic, systemd 249.743.g8fd4d27f3c+21.10.20210909132725 – daily upstream build from ppa:ubuntu-support-team/systemd) – or basically any container that uses the unified cgroups hierarchy (like Fedora 34, as mentioned before). Interestingly, in other places that try to read On a host using the hybrid hierarchy I can only see => Tests are skipped ("test-oomd-util: cgroups are not running in unified mode, skipping tests.") On a host using the unified hierarchy I can only see => Tests pass as expected. BUT: Inside a unified container on a hybrid host, I can see neither: => This is a problem. The test fails, because it cannot access |
|
Already opened another issue #20655, and seems duplicate of this. From the logs in the issue, |
|
At least #20705 can hide the issue. But I am not sure it is a correct way to fix. |
the container cgroup2 won't have any controllers, because they are all in use by the host cgroup1 setup. The host's hybrid cgroup1/cgroup2 setup means that all the subsystem controllers are explicitly mounted (and thus in use by cgroup1), while the cgroup2 mounted at /sys/fs/cgroup/unified/ lacks any controllers. Since the memory controller is what provides memory.current, it won't appear in a container where only cgroup2 is mounted. This means, unfortunately, a container attempting to use only cgroup2 on a host where cgroup1 is in use won't work; the container will have to use cgroup1 or hybrid. That is quite different from what 1354002 was fixing, as the memory controller can be present but the kernel might be configured without support for memory.swap.* |
When running in a container where the host is using cgroup1, we can't use unified cgroup, since the host kernel has the cgroup controllers in use by cgroup1. Fixes: systemd#20593 Fixes: systemd#20655
When running in a container where the host is using cgroup1, we can't use unified cgroup, since the host kernel has the cgroup controllers in use by cgroup1. Fixes: systemd#20593 Fixes: systemd#20655
When running in a container where the host is using cgroup1, we can't use unified cgroup, since the host kernel has the cgroup controllers in use by cgroup1. Fixes: systemd#20593 Fixes: systemd#20655
When running in a container where the host is using cgroup1, we can't use unified cgroup, since the host kernel has the cgroup controllers in use by cgroup1. Fixes: systemd#20593 Fixes: systemd#20655
When running in a container where the host is using cgroup1, we can't use unified cgroup, since the host kernel has the cgroup controllers in use by cgroup1. Fixes: systemd#20593 Fixes: systemd#20655
Fixes systemd#20593 and systemd#20655. (cherry picked from commit 8b2e225)
systemd version the issue has been seen with
Used distribution
Linux kernel version used (
uname -a)CPU architecture issue was seen on
Expected behaviour you didn't see
Unexpected behaviour you saw
Steps to reproduce the problem
Additional program output to the terminal or log subsystem illustrating the issue
The text was updated successfully, but these errors were encountered: