Skip to content

Commit a12b3e9

Browse files
committed
libpod/runtime.go: Remove Cgroups v1
Signed-off-by: Lokesh Mandvekar <[email protected]>
1 parent faa551a commit a12b3e9

File tree

1 file changed

+2
-8
lines changed

1 file changed

+2
-8
lines changed

libpod/runtime.go

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,6 @@ import (
3434
"go.podman.io/common/libimage"
3535
"go.podman.io/common/libnetwork/network"
3636
nettypes "go.podman.io/common/libnetwork/types"
37-
"go.podman.io/common/pkg/cgroups"
3837
"go.podman.io/common/pkg/config"
3938
artStore "go.podman.io/common/pkg/libartifact/store"
4039
"go.podman.io/common/pkg/secrets"
@@ -179,11 +178,7 @@ func newRuntimeFromConfig(ctx context.Context, conf *config.Config, options ...R
179178
runtime := new(Runtime)
180179

181180
if conf.Engine.OCIRuntime == "" {
182-
conf.Engine.OCIRuntime = "runc"
183-
// If we're running on cgroups v2, default to using crun.
184-
if onCgroupsv2, _ := cgroups.IsCgroup2UnifiedMode(); onCgroupsv2 {
185-
conf.Engine.OCIRuntime = "crun"
186-
}
181+
conf.Engine.OCIRuntime = "crun"
187182
}
188183

189184
runtime.config = conf
@@ -543,8 +538,7 @@ func makeRuntime(ctx context.Context, runtime *Runtime) (retErr error) {
543538
// and no valid systemd session is present
544539
// warn only whenever new namespace is created
545540
if runtime.config.Engine.CgroupManager == config.SystemdCgroupsManager {
546-
unified, _ := cgroups.IsCgroup2UnifiedMode()
547-
if unified && rootless.IsRootless() && !systemd.IsSystemdSessionValid(rootless.GetRootlessUID()) {
541+
if rootless.IsRootless() && !systemd.IsSystemdSessionValid(rootless.GetRootlessUID()) {
548542
logrus.Debug("Invalid systemd user session for current user")
549543
}
550544
}

0 commit comments

Comments
 (0)