From 7c45f43a46b149bfbef0c8762245a8cda4962810 Mon Sep 17 00:00:00 2001 From: Lokesh Mandvekar Date: Wed, 5 Nov 2025 08:39:29 -0500 Subject: [PATCH] libpod/info_linux.go: Remove Cgroups v1 Signed-off-by: Lokesh Mandvekar --- libpod/info_linux.go | 16 ++++------------ 1 file changed, 4 insertions(+), 12 deletions(-) diff --git a/libpod/info_linux.go b/libpod/info_linux.go index c6ca56d81a..67f1000d36 100644 --- a/libpod/info_linux.go +++ b/libpod/info_linux.go @@ -30,14 +30,10 @@ func (r *Runtime) setPlatformHostInfo(info *define.HostInfo) error { return fmt.Errorf("getting Seccomp profile path: %w", err) } - // Cgroups version - unified, err := cgroups.IsCgroup2UnifiedMode() - if err != nil { - return fmt.Errorf("reading cgroups mode: %w", err) - } - // Get Map of all available controllers - availableControllers, err := cgroups.AvailableControllers(nil, unified) + // FIXME: AvailableControllers should be further simplified once CGv1 removal + // in container-libs is complete. + availableControllers, err := cgroups.AvailableControllers(nil, true) if err != nil { return fmt.Errorf("getting available cgroup controllers: %w", err) } @@ -55,11 +51,7 @@ func (r *Runtime) setPlatformHostInfo(info *define.HostInfo) error { } info.Slirp4NetNS = define.SlirpInfo{} - cgroupVersion := "v1" - if unified { - cgroupVersion = "v2" - } - info.CgroupsVersion = cgroupVersion + info.CgroupsVersion = "v2" slirp4netnsPath := r.config.Engine.NetworkCmdPath if slirp4netnsPath == "" {