Project

General

Profile

action #137198

Updated by ph03nix 9 months ago

In 15-SP6 we will have cgroups v2, previously we only had cgroups v1. Once released we need to test the container engines on both. 

 We should introduce a new setting, e.g. `CGROUPS_VERSION` that allows us to control which version a single test run is using. We don't need to support multiple cgroup versions per test run, one is enough. 

 This setting should make sure the appropriate cgroups settings are set in the kernel parameters (`GRUB_CMDLINE_LINUX_DEFAULT` in `/etc/default/grub`). To enable v2, the `systemd.unified_cgroup_hierarchy=1` setting should be set there. 

 Alternatively we can also use `mount` to check if cgroup2 is present in `/sys/fs/cgroup`. 

 ~~~ 
 # mount -l | grep cgroup 
 cgroup2 on /sys/fs/cgroup type cgroup2 (rw,nosuid,nodev,noexec,relatime,seclabel,nsdelegate) 
 ~~~ 

 We need to do this at least for `podman` and `docker`, and if possible for all other container engines as well. 

 ## Acceptance criteria 

 * Introduce a new setting e.g. `CGROUPS_VERSION` that allows us to define the cgroups version to container engine test runs 
 * Check if this can be applied on Tumbleweed (if there are still cgroups v1 possible) as testing ground because we cannot use cgroupsv2 on SLES15-SP5 and older 
 * Schedule container engine tests using both cgroups versions, if possible on Tumbleweed 

 ## Related links 

 * https://progress.opensuse.org/issues/137015 
 * https://jira.suse.com/browse/PED-5849 
 * https://www.kernel.org/doc/html/latest/admin-guide/cgroup-v2.html

Back