Files
podman/cmd/podman/root_cgroups_linux.go
Lokesh Mandvekar e860773c0d cmd/podman.persistentRunE(): Fatal linux check if no Cgroups v2
Will log and proceed on non-linux env.

Signed-off-by: Lokesh Mandvekar <lsm5@redhat.com>
2025-11-12 15:15:32 -05:00

19 lines
322 B
Go

//go:build linux
package main
import (
"github.com/sirupsen/logrus"
"go.podman.io/common/pkg/cgroups"
)
func checkSupportedCgroups() {
unified, err := cgroups.IsCgroup2UnifiedMode()
if err != nil {
logrus.Fatalf("Error determining cgroups mode")
}
if !unified {
logrus.Fatalf("Cgroups v1 not supported")
}
}