Page MenuHomeSolus

Support cgroups v2
Open, HighPublic

Description

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.

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:

  1. Setting default-hierarchy as legacy: R2999:da4676bf605f: Force legacy cgroup hierarchy. See T8609.
  2. Setting the supplemental, but required kernel command line flag in our cmdline for linux-lts and linux-current: systemd.unified_cgroup_hierarchy=0
  3. 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.

Event Timeline

JoshStrobl triaged this task as High priority.Jan 16 2020, 4:39 PM
JoshStrobl created this task.
JoshStrobl moved this task from Backlog to System and Configuration Fixes on the Software board.
JoshStrobl updated the task description. (Show Details)Jan 16 2020, 4:48 PM
JoshStrobl updated the task description. (Show Details)Jan 16 2020, 7:30 PM
Okra added a subscriber: Okra.Jan 19 2020, 3:12 AM
Justin added a subscriber: Justin.Apr 28 2020, 4:11 AM
JoshStrobl updated the task description. (Show Details)Apr 28 2020, 1:32 PM
livingsilver94 added a comment.EditedOct 27 2020, 6:03 PM

cgroups v2 support landed in containerd in 1.4.0. Were're at 1.4.1: https://github.com/containerd/containerd/blob/v1.4.1/releases/v1.4.0.toml#L27
cgroups v2 support landed in runc in 1.0-rc91 Were're at 1.0-rc92: https://github.com/opencontainers/runc/issues/2315

Can we then enable cgroups v2 now? :)

No. Docker wants a different version of runc and containerd. There's a reason I haven't updated either of them, I even stated such in R555:05828f82abd1: Update to 1.3.7

containerd is always updated to align with Docker. Docker 19.03.13 specifically updates to 1.3.7 (instead of 1.4.x series).

I have it handled and I'm tracking it.

brent added a subscriber: brent.Tue, Jan 19, 12:05 AM