1
0
mirror of https://github.com/containers/podman.git synced 2026-02-05 15:45:08 +01:00

cmd/podman/containers/unpause: Remove cgroupv1 check

This didn't error check for mounted cgroups, only errored for rootless
cgroupsv1 containers. Safe to remove.

Signed-off-by: Lokesh Mandvekar <lsm5@redhat.com>
This commit is contained in:
Lokesh Mandvekar
2025-11-03 14:05:17 -05:00
parent e860773c0d
commit f2c9fcd68f

View File

@@ -2,7 +2,6 @@ package containers
import (
"context"
"errors"
"fmt"
"os"
"strings"
@@ -12,9 +11,7 @@ import (
"github.com/containers/podman/v6/cmd/podman/utils"
"github.com/containers/podman/v6/cmd/podman/validate"
"github.com/containers/podman/v6/pkg/domain/entities"
"github.com/containers/podman/v6/pkg/rootless"
"github.com/spf13/cobra"
"go.podman.io/common/pkg/cgroups"
"go.podman.io/common/pkg/completion"
)
@@ -91,13 +88,6 @@ func unpause(_ *cobra.Command, args []string) error {
var errs utils.OutputErrors
args = utils.RemoveSlash(args)
if rootless.IsRootless() && !registry.IsRemote() {
cgroupv2, _ := cgroups.IsCgroup2UnifiedMode()
if !cgroupv2 {
return errors.New("unpause is not supported for cgroupv1 rootless containers")
}
}
for _, cidFile := range unpauseCidFiles {
content, err := os.ReadFile(cidFile)
if err != nil {