diff options
author | OpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com> | 2020-12-04 13:33:36 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-12-04 13:33:36 -0500 |
commit | 0f496e4b81aadbc6e38cc02af67ddc58f1f3ef79 (patch) | |
tree | dd41dec0bb4216ab56013b76644a08ad41a5bd12 /cmd | |
parent | f01630acf35a11aecdbfb9b77b249dcec85e67b5 (diff) | |
parent | ccbca0b4abfe5daec59b3193a6bff077d817fd18 (diff) | |
download | podman-0f496e4b81aadbc6e38cc02af67ddc58f1f3ef79.tar.gz podman-0f496e4b81aadbc6e38cc02af67ddc58f1f3ef79.tar.bz2 podman-0f496e4b81aadbc6e38cc02af67ddc58f1f3ef79.zip |
Merge pull request #8570 from vrothberg/run-950
rewrite container copy
Diffstat (limited to 'cmd')
-rw-r--r-- | cmd/podman/containers/cp.go | 19 |
1 files changed, 2 insertions, 17 deletions
diff --git a/cmd/podman/containers/cp.go b/cmd/podman/containers/cp.go index a74ea89d2..fd3aa7680 100644 --- a/cmd/podman/containers/cp.go +++ b/cmd/podman/containers/cp.go @@ -3,10 +3,7 @@ package containers import ( "github.com/containers/podman/v2/cmd/podman/common" "github.com/containers/podman/v2/cmd/podman/registry" - "github.com/containers/podman/v2/pkg/cgroups" "github.com/containers/podman/v2/pkg/domain/entities" - "github.com/containers/podman/v2/pkg/rootless" - "github.com/sirupsen/logrus" "github.com/spf13/cobra" ) @@ -43,7 +40,7 @@ var ( func cpFlags(cmd *cobra.Command) { flags := cmd.Flags() flags.BoolVar(&cpOpts.Extract, "extract", false, "Extract the tar file into the destination directory.") - flags.BoolVar(&cpOpts.Pause, "pause", copyPause(), "Pause the container while copying") + flags.BoolVar(&cpOpts.Pause, "pause", true, "Pause the container while copying") } func init() { @@ -62,17 +59,5 @@ func init() { } func cp(cmd *cobra.Command, args []string) error { - _, err := registry.ContainerEngine().ContainerCp(registry.GetContext(), args[0], args[1], cpOpts) - return err -} - -func copyPause() bool { - if rootless.IsRootless() { - cgroupv2, _ := cgroups.IsCgroup2UnifiedMode() - if !cgroupv2 { - logrus.Debugf("defaulting to pause==false on rootless cp in cgroupv1 systems") - return false - } - } - return true + return registry.ContainerEngine().ContainerCp(registry.GetContext(), args[0], args[1], cpOpts) } |