Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Revisit freezer controller detection for cgroup v2
The cgroup v2 freezer controller is not listed in the cgroup.controllers file and is deliberately not available in the root cgroup. Therefore, k0s sysinfo determines its presence based on the Linux kernel version. This is problematic for old kernels that have many backported features, such as RHEL and consorts. However, it is still possible to detect the freezer controller via the cgroups filesystem in cgroups other than the root group. To provide a more reliable result for all kernels, k0s now tries to detect the controller in its own cgroup. In the unlikely case that k0s is running in the root cgroup, it will try to create an empty, temporary cgroup for the freezer file detection. If it doesn't have sufficient permissions to do so, it simply assumes the presence of the freezer controller. See: 0655941 ("Add pre-flight checks and probes module") Signed-off-by: Tom Wieczorek <[email protected]>
- Loading branch information