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 system df' results in Error: invalid reference format #7015

Closed
cmurf opened this issue Jul 19, 2020 · 4 comments · Fixed by #7018
Closed

'podman system df' results in Error: invalid reference format #7015

cmurf opened this issue Jul 19, 2020 · 4 comments · Fixed by #7018
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

@cmurf
Copy link

cmurf commented Jul 19, 2020

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

/kind bug

Description

sudo podman system df always reports zero values

Steps to reproduce the issue:

  1. load or obtain an image, e.g. podman load -i /tmp/test.tar

  2. `sudo podman

Describe the results you received:

$ podman images
REPOSITORY                         TAG     IMAGE ID      CREATED       SIZE
registry.fedoraproject.org/fedora  latest  eb7134a03cd6  2 months ago  208 MB

$ sudo podman system df
TYPE           TOTAL   ACTIVE  SIZE    RECLAIMABLE
Images         0       0       0B      0B (0%)
Containers     0       0       0B      0B (0%)
Local Volumes  0       0       0B      0B (0%)

Describe the results you expected:

Seems like there should be some non-zero values reported for podman system df

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

Output of podman version:

podman-2.1.0-0.85.dev.git0bd5181.fc33.x86_64

Output of podman info --debug:

$ podman version
Version:      2.1.0-dev
API Version:  1
Go Version:   go1.14.4
Built:        Wed Dec 31 17:00:00 1969
OS/Arch:      linux/amd64
[chris@localhost ~]$ podman info --debug
host:
  arch: amd64
  buildahVersion: 1.16.0-dev
  cgroupVersion: v2
  conmon:
    package: conmon-2.0.20-0.1.dev.git3c396d4.fc33.x86_64
    path: /usr/bin/conmon
    version: 'conmon version 2.0.20-dev, commit: fd84f1439b1a7dafedfc2de2072fedac9641f264'
  cpus: 3
  distribution:
    distribution: fedora
    version: "33"
  eventLogger: file
  hostname: localhost.localdomain
  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.8.0-0.rc5.20200715gite9919e11e219.1.fc33.x86_64
  linkmode: dynamic
  memFree: 1181343744
  memTotal: 3031236608
  ociRuntime:
    name: crun
    package: crun-0.14-1.fc33.x86_64
    path: /usr/bin/crun
    version: |-
      crun version 0.14
      commit: ebc56fc9bcce4b3208bb0079636c80545122bf58
      spec: 1.0.0
      +SYSTEMD +SELINUX +APPARMOR +CAP +SECCOMP +EBPF +YAJL
  os: linux
  remoteSocket:
    path: /run/user/1000/podman/podman.sock
  rootless: true
  slirp4netns:
    executable: /usr/bin/slirp4netns
    package: slirp4netns-1.1.4-2.dev.git4c6befe.fc33.x86_64
    version: |-
      slirp4netns version 1.1.4+dev
      commit: 4c6befe05c3137232cf06a5c2879daf4c20be6b1
      libslirp: 4.3.1
      SLIRP_CONFIG_VERSION_MAX: 3
  swapFree: 1515188224
  swapTotal: 1515188224
  uptime: 4m 24.6s
registries:
  search:
  - registry.fedoraproject.org
  - registry.access.redhat.com
  - registry.centos.org
  - docker.io
store:
  configFile: /home/chris/.config/containers/storage.conf
  containerStore:
    number: 0
    paused: 0
    running: 0
    stopped: 0
  graphDriverName: overlay
  graphOptions:
    overlay.mount_program:
      Executable: /usr/bin/fuse-overlayfs
      Package: fuse-overlayfs-1.1.0-6.dev.git50ab2c2.fc33.x86_64
      Version: |-
        fusermount3 version: 3.9.2
        fuse-overlayfs: version 1.1.0
        FUSE library version 3.9.2
        using FUSE kernel interface version 7.31
  graphRoot: /home/chris/.local/share/containers/storage
  graphStatus:
    Backing Filesystem: xfs
    Native Overlay Diff: "false"
    Supports d_type: "true"
    Using metacopy: "false"
  imageStore:
    number: 1
  runRoot: /run/user/1000/containers
  volumePath: /home/chris/.local/share/containers/storage/volumes
version:
  APIVersion: 1
  Built: 0
  BuiltTime: Wed Dec 31 17:00:00 1969
  GitCommit: ""
  GoVersion: go1.14.4
  OsArch: linux/amd64
  Version: 2.1.0-dev

$

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

podman-2.1.0-0.85.dev.git0bd5181.fc33.x86_64

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

Reproduces on baremetal and VM. Fedora 32 and Rawhide. Btrfs and XFS.

@openshift-ci-robot openshift-ci-robot added the kind/bug Categorizes issue or PR as related to a bug. label Jul 19, 2020
@Luap99
Copy link
Member

Luap99 commented Jul 19, 2020

It looks like you are using rootful and rootless podman here.
If you use podman rootless than you have to use podman system df also as your user and not with sudo.

@cmurf
Copy link
Author

cmurf commented Jul 19, 2020

What brought me to using sudo is that it doesn't work without it.

$ podman system df
Error: invalid reference format

I get that on a Fedora 32 baremetal and clean installed Fedora 33 VM. But a different F32 baremetal system, it works. I'm not sure what's different among them.

@Luap99
Copy link
Member

Luap99 commented Jul 19, 2020

OK, that is the bug.
I could reproduce this on 2 of my machines. I noticed that the problem only occurs when I had an untagged image on my system.

Can you confirm that you have an untagged image on your system?
run podman images it should contain a line where REPOSITORY and TAG is none like this.

REPOSITORY                       TAG     IMAGE ID      CREATED       SIZE
<none>                           <none>  3a9e1a01ad12  2 months ago  137 MB

Luap99 pushed a commit to Luap99/libpod that referenced this issue Jul 19, 2020
When an image has no name/tag system df will
error because it tries to parse an empty name.

This commit makes sure we only parse non
empty names and set the repository and tag
to "<none>" otherwise.

Closes containers#7015

Signed-off-by: Paul Holzinger <paul.holzinger@web.de>
@cmurf
Copy link
Author

cmurf commented Jul 19, 2020

Can you confirm that you have an untagged image on your system?

Confirmed.

@cmurf cmurf changed the title 'podman system df' shows zero values 'podman system df' results in Error: invalid reference format Jul 19, 2020
mheon pushed a commit to mheon/libpod that referenced this issue Jul 22, 2020
When an image has no name/tag system df will
error because it tries to parse an empty name.

This commit makes sure we only parse non
empty names and set the repository and tag
to "<none>" otherwise.

Closes containers#7015

Signed-off-by: Paul Holzinger <paul.holzinger@web.de>
@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
Development

Successfully merging a pull request may close this issue.

4 participants