At the moment, cgroups v2 is being set as the default option in systemd per default-hierarchy as unified. Unfortunately, cgroup v2 breaks a bunch of software which does not yet support it, e.g.
- Anything using runc, see https://github.com/opencontainers/runc/issues/2315
- Anything using containerd, see https://github.com/containerd/containerd/issues/3726
This breakage isn't really acceptable, so what we're going to be doing (or have done, depending on when you're reading this) is:
- Setting default-hierarchy as legacy: R2999:da4676bf605f: Force legacy cgroup hierarchy. See T8609.
- Setting the supplemental, but required kernel command line flag in our cmdline for linux-lts and linux-current: systemd.unified_cgroup_hierarchy=0
- Keeping snapd at 2.39 until all above items (runc and containerd, explicitly podman and Docker as well) support cgroups v2. We can't upgrade snapd because newer releases only support cgroups v2: R3609:2a38b0dfdab6: Revert to 2.39.x to support cgroups v1 again. See T8609.
This task is being left open to effectively track what items still need to gain support before we can move on from cgroups v1.
P.S. I know we have lxc and that also has partial support for cgroups v2 (at time of posting), but that is not a high priority item given likely nobody uses it and it should realistically just be dropped from the repo.