diff options
author | Toshiki Sonoda <sonoda.toshiki@fujitsu.com> | 2022-07-19 10:00:53 +0900 |
---|---|---|
committer | Toshiki Sonoda <sonoda.toshiki@fujitsu.com> | 2022-07-19 10:00:53 +0900 |
commit | 26ae055a244d23f6396d96ea0f727bbc4d868c9b (patch) | |
tree | 21b5142175df6510d5160cc8d1076da4561c8da5 | |
parent | eef39b69ee2ae6f70d4fcb7def29dff827d439e8 (diff) | |
download | podman-26ae055a244d23f6396d96ea0f727bbc4d868c9b.tar.gz podman-26ae055a244d23f6396d96ea0f727bbc4d868c9b.tar.bz2 podman-26ae055a244d23f6396d96ea0f727bbc4d868c9b.zip |
Remove return error from "containers.pause"
When we pause `rootless cgroups v1 container`, podman returns error from `libpod.(*Container).pause`.
Podman does not need to return error from `containers.pause` because of duplicate.
[NO NEW TESTS NEEDED]
Signed-off-by: Toshiki Sonoda <sonoda.toshiki@fujitsu.com>
-rw-r--r-- | cmd/podman/containers/pause.go | 8 |
1 files changed, 0 insertions, 8 deletions
diff --git a/cmd/podman/containers/pause.go b/cmd/podman/containers/pause.go index 3c26fd5c8..af6f740f2 100644 --- a/cmd/podman/containers/pause.go +++ b/cmd/podman/containers/pause.go @@ -5,12 +5,10 @@ import ( "errors" "fmt" - "github.com/containers/common/pkg/cgroups" "github.com/containers/podman/v4/cmd/podman/common" "github.com/containers/podman/v4/cmd/podman/registry" "github.com/containers/podman/v4/cmd/podman/utils" "github.com/containers/podman/v4/pkg/domain/entities" - "github.com/containers/podman/v4/pkg/rootless" "github.com/spf13/cobra" "github.com/spf13/pflag" ) @@ -65,12 +63,6 @@ func pause(cmd *cobra.Command, args []string) error { var ( errs utils.OutputErrors ) - if rootless.IsRootless() && !registry.IsRemote() { - cgroupv2, _ := cgroups.IsCgroup2UnifiedMode() - if !cgroupv2 { - return errors.New("pause is not supported for cgroupv1 rootless containers") - } - } if len(args) < 1 && !pauseOpts.All { return errors.New("you must provide at least one container name or id") |