1
0
mirror of https://github.com/containers/buildah.git synced 2026-02-05 09:45:38 +01:00

info.go: Remove Cgroups v1 logic

Signed-off-by: Lokesh Mandvekar <lsm5@redhat.com>
This commit is contained in:
Lokesh Mandvekar
2025-10-27 15:34:32 -04:00
parent 6716a3da06
commit a1e9fc4b0c

View File

@@ -51,16 +51,11 @@ func hostInfo() map[string]any {
info["cpus"] = runtime.NumCPU()
info["rootless"] = unshare.IsRootless()
unified, err := cgroups.IsCgroup2UnifiedMode()
_, err := cgroups.IsCgroup2UnifiedMode()
if err != nil {
logrus.Error(err, "err reading cgroups mode")
}
cgroupVersion := "v1"
ociruntime := util.Runtime()
if unified {
cgroupVersion = "v2"
}
info["CgroupVersion"] = cgroupVersion
info["OCIRuntime"] = ociruntime
mi, err := system.ReadMemInfo()