-
Notifications
You must be signed in to change notification settings - Fork 15
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
Fix tests/cgroup on cgroup2 #299
Conversation
After merging this we will get test regressions on older LXD versions (when run on cgroup2-enabled hosts). But really those are not regressions and we should update LXCFS to v6.0.2 or backport lxc/lxcfs#617 |
2108767
to
af02993
Compare
|
yeah, I'm on it ;-) |
Sigh... lxc/lxcfs#661 |
on latest/edge - 24.04 will be fixed by lxc/lxcfs#661
on 5.21/edge - 22.04, 5.0/edge - 22.04, 4.0/edge - 22.04, 5.21/edge - 24.04 should be fixed by lxc/lxcfs#663 |
I don't think that we should backport lxc/lxcfs#663 to LXD LTS releases (which using LXCFS versions 4.0.X and 5.0.X) as it was never working there. But this fix will be included into the next stable 6.0.X LXCFS release, for sure. |
Can we patch it for latest/candidate and latest/edge so we dont have persistent failures on CI and a regression in the next release? |
latest/candidate and latest/edge are using I have also fixed tests to handle this differences properly. But it's not the end of a story yet. I need to figure out one more thing which I found weird in there... |
67105d9
to
6db28b9
Compare
ah, it's the same thing which I fixed by lxc/lxcfs#661 but now it fails on swap checks. Should be fine. Let's wait until latest/edge is rebuilt. |
6db28b9
to
a64c7c9
Compare
Signed-off-by: Alexander Mikhalitsyn <[email protected]>
There is no /sys/fs/cgroup/memory.swap.max file in cgroup tree root we should look for it in a non-root cgroup instead. See also LXCFS fix: lxc/lxcfs@f496e62 Signed-off-by: Alexander Mikhalitsyn <[email protected]>
Older LXCFS versions (4.0.x and 5.0.x branches) do not handle swap accounting on cgroup2 properly. While we are improving cgroup2 tests for a newer LXD versions we don't want to make tests red on the older ones. So, let's check if LXCFS declares support for swap accounting and only in this case make any checks for it. See also: lxc/lxcfs#663 Signed-off-by: Alexander Mikhalitsyn <[email protected]>
a64c7c9
to
49c9c07
Compare
@tomponline I think it is good to go now |
When cgroup2 is used there is a difference between root of cgroupfs tree and sub-cgroups. When we do a cgroup feature checking we should check for
memory.swap.max
file existence in a/sys/fs/cgroup/system.slice/memory.swap.max
instead of/sys/fs/cgroup/memory.swap.max
.See also:
lxc/lxcfs@f496e62