Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

podman cp can create an extra directory level #6596

Closed
Jamstah opened this issue Jun 13, 2020 · 1 comment · Fixed by #6601
Closed

podman cp can create an extra directory level #6596

Jamstah opened this issue Jun 13, 2020 · 1 comment · Fixed by #6601
Labels
kind/bug Categorizes issue or PR as related to a bug. locked - please file new issue/PR Assist humans wanting to comment on an old issue or PR with locked comments.

Comments

@Jamstah
Copy link

Jamstah commented Jun 13, 2020

Is this a BUG REPORT or FEATURE REQUEST? (leave only one on its own line)

/kind bug

Description

When copying files from a container to an existing dir, a merged folder is created.

With docker, the files appear in the output directory the same regardless of the target folder existing.

Steps to reproduce the issue:

[jammy@ibm007470 podman-test]$ podman build -t podman-test:1.0.0 .
STEP 1: FROM scratch
STEP 2: COPY Dockerfile /
STEP 3: COMMIT podman-test:1.0.0
--> 839962c7269
839962c7269777d5f50d68428d5def260b6842f7c0607978b8567668f2a8c067
[jammy@ibm007470 podman-test]$ podman create 839962c7269777d5f50d68428d5def260b6842f7c0607978b8567668f2a8c067 dummy
53914c7a1191e96b7fee0fcb9b152480640c392321edadfe657c10afda1431a2
[jammy@ibm007470 podman-test]$ podman cp 53914c7a1191e96b7fee0fcb9b152480640c392321edadfe657c10afda1431a2:/ podman1
[jammy@ibm007470 podman-test]$ mkdir podman2
[jammy@ibm007470 podman-test]$ podman cp 53914c7a1191e96b7fee0fcb9b152480640c392321edadfe657c10afda1431a2:/ podman2
[jammy@ibm007470 podman-test]$ rm -rf copy^C
[jammy@ibm007470 podman-test]$ find
.
./podman2
./podman2/merged
./podman2/merged/Dockerfile
./Dockerfile
./podman1
./podman1/Dockerfile

Describe the results you received:
merged folder in output directory

Describe the results you expected:
Files to appear directly in output directory

Additional information you deem important (e.g. issue happens only occasionally):

This can be worked around by copying from <image>:/. instead of just <image>:/

Output of podman version:

[jammy@ibm007470 podman-test]$ podman version
Version:            1.9.3
RemoteAPI Version:  1
Go Version:         go1.14.2
OS/Arch:            linux/amd64

(Also tested 2.0.0-rc4

Output of podman info --debug:

podman info --debug ``` [jammy@ibm007470 podman-test]$ podman info --debug debug: compiler: gc gitCommit: "" goVersion: go1.14.2 podmanVersion: 1.9.3 host: arch: amd64 buildahVersion: 1.14.9 cgroupVersion: v1 conmon: package: conmon-2.0.17-1.fc32.x86_64 path: /usr/bin/conmon version: 'conmon version 2.0.17, commit: bb8e273f5925c1a51737644637ef65d094a67ab1' cpus: 12 distribution: distribution: fedora version: "32" eventLogger: file hostname: ibm007470 idMappings: gidmap: - container_id: 0 host_id: 1000 size: 1 - container_id: 1 host_id: 100000 size: 65536 uidmap: - container_id: 0 host_id: 1000 size: 1 - container_id: 1 host_id: 100000 size: 65536 kernel: 5.6.16-300.fc32.x86_64 memFree: 11292192768 memTotal: 67040837632 ociRuntime: name: runc package: containerd.io-1.2.13-3.2.fc31.x86_64 path: /usr/bin/runc version: |- runc version 1.0.0-rc10 commit: dc9208a3303feef5b3839f4323d9beb36df0a9dd spec: 1.0.1-dev os: linux rootless: true slirp4netns: executable: /usr/bin/slirp4netns package: slirp4netns-1.0.0-1.fc32.x86_64 version: |- slirp4netns version 1.0.0 commit: a3be729152a33e692cd28b52f664defbf2e7810a libslirp: 4.2.0 swapFree: 33625731072 swapTotal: 33625731072 uptime: 23h 9m 55.99s (Approximately 0.96 days) registries: cp.icr.io/cp: Blocked: false Insecure: false Location: cp.icr.io/cp MirrorByDigestOnly: true Mirrors: - Insecure: false Location: cp.stg.icr.io/cp Prefix: cp.icr.io/cp docker.io/ibmcom: Blocked: false Insecure: false Location: docker.io/ibmcom MirrorByDigestOnly: true Mirrors: - Insecure: false Location: cp.stg.icr.io/cp Prefix: docker.io/ibmcom search: - registry.access.redhat.com - docker.io store: configFile: /home/jammy/.config/containers/storage.conf containerStore: number: 6 paused: 0 running: 0 stopped: 6 graphDriverName: overlay graphOptions: overlay.mount_program: Executable: /usr/bin/fuse-overlayfs Package: fuse-overlayfs-1.0.0-1.fc32.x86_64 Version: |- fusermount3 version: 3.9.1 fuse-overlayfs: version 1.0.0 FUSE library version 3.9.1 using FUSE kernel interface version 7.31 graphRoot: /home/jammy/.local/share/containers/storage graphStatus: Backing Filesystem: extfs Native Overlay Diff: "false" Supports d_type: "true" Using metacopy: "false" imageStore: number: 70 runRoot: /run/user/1000/containers volumePath: /home/jammy/.local/share/containers/storage/volumes ```

Package info (e.g. output of rpm -q podman or apt list podman):

[jammy@ibm007470 podman-test]$ rpm -q podman
podman-1.9.3-1.fc32.x86_64

Additional environment details (AWS, VirtualBox, physical, etc.):

Fedora laptop

@openshift-ci-robot openshift-ci-robot added the kind/bug Categorizes issue or PR as related to a bug. label Jun 13, 2020
Jamstah added a commit to Jamstah/operator-registry that referenced this issue Jun 13, 2020
@zhangguanzhang
Copy link
Collaborator

This problem I have found the reason, I will submit the repair pull behind the request

Jamstah added a commit to Jamstah/operator-registry that referenced this issue Jun 13, 2020
ankitathomas pushed a commit to ankitathomas/operator-framework-olm that referenced this issue Apr 6, 2021
Workaround for containers/podman#6596

(upstream operator-registry commit: 44860f7215f300480caf8d65fd4c1b72eb973159)
openshift-merge-robot pushed a commit to openshift/operator-framework-olm that referenced this issue Jul 14, 2021
Workaround for containers/podman#6596

Upstream-repository: operator-registry
Upstream-commit: 44860f7215f300480caf8d65fd4c1b72eb973159
@github-actions github-actions bot added the locked - please file new issue/PR Assist humans wanting to comment on an old issue or PR with locked comments. label Sep 23, 2023
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 23, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
kind/bug Categorizes issue or PR as related to a bug. locked - please file new issue/PR Assist humans wanting to comment on an old issue or PR with locked comments.
Projects
None yet
3 participants