Is it time to deprecate cgroup v1 support?


I’m a kubernetes developer and we were trying to start the process of deprecating cgroupv1 support in Kubernetes. The ask from that community was to find formal announcements from distributions that cgroupv1 will be going out of support or being deprecated [1].

It has also come to my attention that systemd is aiming to drop support for cgroup v1 [2].

I know that fedora defaults to cgroupv2 since F31. I wanted to know if this community should consider a change request to deprecate cgroupv1.

  1. Deprecate cgroup v1 support by harche · Pull Request #4572 · kubernetes/enhancements · GitHub
  2. core: refuse cgroupv1 unless SYSTEMD_CGROUP_ENABLE_LEGACY_FORCE by YHNdnzj · Pull Request #31442 · systemd/systemd · GitHub

I think a change to do that would be welcome. We definitely want to provide time for people who specifically went back to v1 to do so.

Does docker/moby finally use v2? I think thats something that caused some users to opt back to v1 in the distant past.


I think so. Reading change logs It seems that support has been there.

This is also relevant. Proposal: synchronize cgroupv1 deprecation announcements · Issue #1251 · opencontainers/runtime-spec · GitHub

Are we actually talking about deprecating or disabling cgroup v1 support?

In Kubernetes, the hope would be to put cgroup v1 in maintenance mode. We don’t want to add features to it.

Our hope was to drop support eventually but too many LTS OS still use cgroupv1 so we are stuck.

In the runtime-spec issue, there was an interest on giving a timeline when we will drop support for cgroup v1.

So you are asking for us to disable CGroup V1 then. We already effectively deprecated it when we switched to CGroup v2 in Fedora 31.

We know that systemd will be ripping out cgroup v1 support soon, so beating them to the punch at the distro level can be a useful signal to get the ecosystem to care (especially the Kubernetes world, which does not generally care or pay attention to the Linux world).

1 Like

Do you think that is possible or likely to happen?

I was going through Fedora Linux 40 Changes today, and I also noticed that Podman is removing support for cgroups v1 in Podman 5. Seems like a major nail in the coffin for cgroups v1, given how much we encourage Podman as the default container runtime in Fedora Linux.