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 Volume Import does not work after performing Podman Volume Export #14411

Closed
benblasco opened this issue May 29, 2022 · 4 comments · Fixed by #14419
Closed

Podman Volume Import does not work after performing Podman Volume Export #14411

benblasco opened this issue May 29, 2022 · 4 comments · Fixed by #14419
Assignees
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

@benblasco
Copy link

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

/kind bug

Description

Steps to reproduce the issue:

  1. Run a container as a regular or root user, e.g.
podman run \
  --name jenkins-blueocean \
  --rm \
  --detach \
  --publish 18080:8080 \
  --publish 50000:50000 \
  --volume jenkins-data:/var/jenkins_home \
  --volume jenkins-docker-certs:/certs/client:ro \
  --tz=local \
  docker.io/jenkinsci/blueocean:latest

Image pulls and runs successfully

  1. Export a volume (doesn't seem to matter whether the container is running or not), which should be successful
podman volume export jenkins-data -o=jenkins-data.tar
  1. Try to import the created tarball as a new volume (which will fail)
[bblasco@nuc ~]$ podman volume import jenkins-data-restored jenkins-data.tar
Error: no volume data found
  1. Try to export/import in one line as per instructions here: https://docs.podman.io/en/latest/markdown/podman-volume-import.1.html
[bblasco@nuc ~]$ podman volume export jenkins-data | podman volume import jenkins-data-restored - 
Error: no volume data found

Describe the results you received:

podman volume import fails as follows

[bblasco@bblasco-t490s tmp]$ podman volume import somedata jenkins-data.tar
Error: no volume data found

Describe the results you expected:

Volume should have imported successfully and a new volume visible in podman volume ls

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

Always happens on both podman 3.4.7 and 4.1.0

Output of podman version:

On Fedora 36

[bblasco@nuc ~]$ podman version
Client:       Podman Engine
Version:      4.1.0
API Version:  4.1.0
Go Version:   go1.18
Built:        Sat May  7 02:15:54 2022
OS/Arch:      linux/amd64

On Fedora 35:

[bblasco@bblasco-t490s tmp]$ podman version
Version:      3.4.7
API Version:  3.4.7
Go Version:   go1.16.15
Built:        Thu Apr 21 23:14:26 2022
OS/Arch:      linux/amd64

Output of podman info --debug:

On Fedora 36

[bblasco@nuc ~]$ podman info --debug                                
host:                      
  arch: amd64                                                       
  buildahVersion: 1.26.1   
  cgroupControllers:                                                
  - memory                 
  - pids                   
  cgroupManager: systemd                                            
  cgroupVersion: v2  
  conmon:                 
    package: conmon-2.1.0-2.fc36.x86_64                                                                                                 
    path: /usr/bin/conmon                                           
    version: 'conmon version 2.1.0, commit: '                       
  cpuUtilization:       
    idlePercent: 98.24                                              
    systemPercent: 0.99                                             
    userPercent: 0.77     
  cpus: 8          
  distribution:                                                     
    distribution: fedora                                            
    variant: server    
    version: "36"                                                   
  eventLogger: journald   
  hostname: nuc.lan                                                                                                             [75/105]
  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.17.11-300.fc36.x86_64
  linkmode: dynamic
  logDriver: journald
  memFree: 32822419456
  memTotal: 33521385472
  networkBackend: netavark
  ociRuntime:
    name: crun
    package: crun-1.4.5-1.fc36.x86_64
    path: /usr/bin/crun
    version: |-
      crun version 1.4.5
      commit: c381048530aa750495cf502ddb7181f2ded5b400
      spec: 1.0.0
      +SYSTEMD +SELINUX +APPARMOR +CAP +SECCOMP +EBPF +CRIU +YAJL                                                               [45/105]
  os: linux
  remoteSocket:
    path: /run/user/1000/podman/podman.sock
  security:
    apparmorEnabled: false
    capabilities: CAP_CHOWN,CAP_DAC_OVERRIDE,CAP_FOWNER,CAP_FSETID,CAP_KILL,CAP_NET_BIND_SERVICE,CAP_SETFCAP,CAP_SETGID,CAP_SETPCAP,CAP_
SETUID,CAP_SYS_CHROOT
    rootless: true
    seccompEnabled: true
    seccompProfilePath: /usr/share/containers/seccomp.json
    selinuxEnabled: true
  serviceIsRemote: false
  slirp4netns:
    executable: /usr/bin/slirp4netns
    package: slirp4netns-1.2.0-0.2.beta.0.fc36.x86_64
    version: |-
      slirp4netns version 1.2.0-beta.0
      commit: 477db14a24ff1a3de3a705e51ca2c4c1fe3dda64
      libslirp: 4.6.1
      SLIRP_CONFIG_VERSION_MAX: 3
      libseccomp: 2.5.3
  swapFree: 8589930496
  swapTotal: 8589930496
  uptime: 2m 27.74s
plugins:
  log:
  - k8s-file
  - none
  - passthrough
  - journald                                                                                                                    [15/105]
  network:
  - bridge
  - macvlan
  volume:
  - local
registries:
  search:
  - registry.fedoraproject.org
  - registry.access.redhat.com
  - docker.io
  - quay.io
store:
  configFile: /home/bblasco/.config/containers/storage.conf
  containerStore:
    number: 0
    paused: 0
    running: 0
    stopped: 0
  graphDriverName: overlay
  graphOptions: {}
  graphRoot: /home/bblasco/.local/share/containers/storage
  graphRootAllocated: 16095641600
  graphRootUsed: 4544729088
  graphStatus:
    Backing Filesystem: xfs
    Native Overlay Diff: "true"
    Supports d_type: "true"
    Using metacopy: "false"
  imageCopyTmpDir: /var/tmp
  imageStore:
    number: 0
  runRoot: /run/user/1000/containers
  volumePath: /home/bblasco/.local/share/containers/storage/volumes
version:
  APIVersion: 4.1.0
  Built: 1651853754
  BuiltTime: Sat May  7 02:15:54 2022
  GitCommit: ""
  GoVersion: go1.18
  Os: linux
  OsArch: linux/amd64
  Version: 4.1.0

[bblasco@nuc ~]$                                                     
                                                                                                           

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

[bblasco@nuc ~]$ rpm -q podman
podman-4.1.0-1.fc36.x86_64

Have you tested with the latest version of Podman and have you checked the Podman Troubleshooting Guide? (https://github.com/containers/podman/blob/main/troubleshooting.md)

Yes

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

Baremetal deployment on Fedora 36 on an Intel NUC.

@openshift-ci openshift-ci bot added the kind/bug Categorizes issue or PR as related to a bug. label May 29, 2022
@Luap99
Copy link
Member

Luap99 commented May 30, 2022

It looks like the volume is empty and thus export is creating an empty tar, however import is refusing to restore an empty tar for some reason. Should be a simple fix.

@Luap99
Copy link
Member

Luap99 commented May 30, 2022

Nevermind. Podman volume import does not create a new volume. It can only be used to restore into an existing volume.

@Luap99 Luap99 self-assigned this May 30, 2022
Luap99 added a commit to Luap99/libpod that referenced this issue May 30, 2022
When the volume does not exist we should output an error stating so and
not some generic one.

Fixes containers#14411

Signed-off-by: Paul Holzinger <[email protected]>
@benblasco
Copy link
Author

Thank you @Luap99 for quickly identifying the issue. I came here to ask if I could help with documentation updates, but you have already taken care of that via your commits! Great stuff. Will this also end up reflected in docs.podman.io and in the Red Hat docs? Not sure if the Red Hat docs are at all relevant in this context.

@Luap99
Copy link
Member

Luap99 commented May 31, 2022

docs.podman.io will be updated automatically, are you referring to any special Red Hat docs? The shipped man pages are updated with the podman version.

@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 20, 2023
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 20, 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
Development

Successfully merging a pull request may close this issue.

2 participants