Skip to content

Commit c98c50e

Browse files
committed
libpod/pod_api.go: Remove Cgroups v1
Signed-off-by: Lokesh Mandvekar <[email protected]>
1 parent 06bc277 commit c98c50e

File tree

1 file changed

+0
-12
lines changed

1 file changed

+0
-12
lines changed

libpod/pod_api.go

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,8 @@ import (
1010
"github.com/containers/podman/v6/libpod/define"
1111
"github.com/containers/podman/v6/libpod/events"
1212
"github.com/containers/podman/v6/pkg/parallel"
13-
"github.com/containers/podman/v6/pkg/rootless"
1413
"github.com/opencontainers/runtime-spec/specs-go"
1514
"github.com/sirupsen/logrus"
16-
"go.podman.io/common/pkg/cgroups"
1715
)
1816

1917
// startInitContainers starts a pod's init containers.
@@ -341,16 +339,6 @@ func (p *Pod) Pause(ctx context.Context) (map[string]error, error) {
341339
return nil, define.ErrPodRemoved
342340
}
343341

344-
if rootless.IsRootless() {
345-
cgroupv2, err := cgroups.IsCgroup2UnifiedMode()
346-
if err != nil {
347-
return nil, fmt.Errorf("failed to determine cgroupversion: %w", err)
348-
}
349-
if !cgroupv2 {
350-
return nil, fmt.Errorf("can not pause pods containing rootless containers with cgroup V1: %w", define.ErrNoCgroups)
351-
}
352-
}
353-
354342
allCtrs, err := p.runtime.state.PodContainers(p)
355343
if err != nil {
356344
return nil, err

0 commit comments

Comments
 (0)