mirror of
https://github.com/containers/podman.git
synced 2025-12-23 22:28:30 -05:00
libpod/runtime_linux.go: Remove Cgroups v1
Signed-off-by: Lokesh Mandvekar <lsm5@redhat.com>
This commit is contained in:
@@ -12,21 +12,10 @@ import (
|
||||
"github.com/containers/podman/v6/pkg/rootless"
|
||||
"github.com/containers/podman/v6/pkg/systemd"
|
||||
"github.com/sirupsen/logrus"
|
||||
"go.podman.io/common/pkg/cgroups"
|
||||
)
|
||||
|
||||
func checkCgroups2UnifiedMode(runtime *Runtime) {
|
||||
unified, _ := cgroups.IsCgroup2UnifiedMode()
|
||||
// DELETE ON RHEL9
|
||||
if !unified {
|
||||
_, ok := os.LookupEnv("PODMAN_IGNORE_CGROUPSV1_WARNING")
|
||||
if !ok {
|
||||
logrus.Warn("Using cgroups-v1 which is deprecated in favor of cgroups-v2 with Podman v5 and will be removed in a future version. Set environment variable `PODMAN_IGNORE_CGROUPSV1_WARNING` to hide this warning.")
|
||||
}
|
||||
}
|
||||
// DELETE ON RHEL9
|
||||
|
||||
if unified && rootless.IsRootless() && !systemd.IsSystemdSessionValid(rootless.GetRootlessUID()) {
|
||||
if rootless.IsRootless() && !systemd.IsSystemdSessionValid(rootless.GetRootlessUID()) {
|
||||
// If user is rootless and XDG_RUNTIME_DIR is found, podman will not proceed with /tmp directory
|
||||
// it will try to use existing XDG_RUNTIME_DIR
|
||||
// if current user has no write access to XDG_RUNTIME_DIR we will fail later
|
||||
|
||||
Reference in New Issue
Block a user