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 pull prints the extra image ID when set additionalimagestores #18647

Closed
sstosh opened this issue May 22, 2023 · 1 comment · Fixed by containers/common#1477
Closed
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

@sstosh
Copy link
Contributor

sstosh commented May 22, 2023

Issue Description

podman pull prints the extra image ID when set additionalimagestores.

Steps to reproduce the issue

Steps to reproduce the issue

  1. Pull images
# podman pull ubi9
.. snip ...
e7236a3e070f267713ad79c451b8628166abc0bc9c855f624619e099ec3faa99

# podman images
REPOSITORY                       TAG         IMAGE ID      CREATED      SIZE
registry.access.redhat.com/ubi9  latest      e7236a3e070f  2 weeks ago  217 MB
  1. Pull images to additionalimagestores directory
# podman pull --root /var/lib/share-images ubi9
... snip ...
e7236a3e070f267713ad79c451b8628166abc0bc9c855f624619e099ec3faa99

# grep additionalimagestores -A 2 /etc/containers/storage.conf
additionalimagestores = [
        "/var/lib/share-images",
]
# podman images
REPOSITORY                       TAG         IMAGE ID      CREATED      SIZE        R/O
registry.access.redhat.com/ubi9  latest      e7236a3e070f  2 weeks ago  217 MB      false
registry.access.redhat.com/ubi9  latest      e7236a3e070f  2 weeks ago  217 MB      true
  1. Pull images again
# podman pull ubi9

Describe the results you received

# podman pull ubi9
... snip ...
e7236a3e070f267713ad79c451b8628166abc0bc9c855f624619e099ec3faa99
e7236a3e070f267713ad79c451b8628166abc0bc9c855f624619e099ec3faa99

Describe the results you expected

# podman pull ubi9
... snip ...
e7236a3e070f267713ad79c451b8628166abc0bc9c855f624619e099ec3faa99

podman info output

host:
  arch: amd64
  buildahVersion: 1.31.0-dev
  cgroupControllers:
  - cpuset
  - cpu
  - io
  - memory
  - hugetlb
  - pids
  - misc
  cgroupManager: systemd
  cgroupVersion: v2
  conmon:
    package: conmon-2.1.7-2.fc37.x86_64
    path: /usr/bin/conmon
    version: 'conmon version 2.1.7, commit: '
  cpuUtilization:
    idlePercent: 99.99
    systemPercent: 0
    userPercent: 0.01
  cpus: 12
  databaseBackend: boltdb
  distribution:
    distribution: fedora
    variant: server
    version: "37"
  eventLogger: journald
  hostname: fedora37
  idMappings:
    gidmap: null
    uidmap: null
  kernel: 6.0.7-301.fc37.x86_64
  linkmode: dynamic
  logDriver: journald
  memFree: 1308758016
  memTotal: 8327139328
  networkBackend: netavark
  ociRuntime:
    name: crun
    package: crun-1.8-1.fc37.x86_64
    path: /usr/bin/crun
    version: |-
      crun version 1.8
      commit: 0356bf4aff9a133d655dc13b1d9ac9424706cac4
      rundir: /run/user/0/crun
      spec: 1.0.0
      +SYSTEMD +SELINUX +APPARMOR +CAP +SECCOMP +EBPF +CRIU +LIBKRUN +WASM:wasmedge +YAJL
  os: linux
  remoteSocket:
    path: /run/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: false
    seccompEnabled: true
    seccompProfilePath: /usr/share/containers/seccomp.json
    selinuxEnabled: true
  serviceIsRemote: false
  slirp4netns:
    executable: /usr/bin/slirp4netns
    package: slirp4netns-1.2.0-8.fc37.x86_64
    version: |-
      slirp4netns version 1.2.0
      commit: 656041d45cfca7a4176f6b7eed9e4fe6c11e8383
      libslirp: 4.7.0
      SLIRP_CONFIG_VERSION_MAX: 4
      libseccomp: 2.5.3
  swapFree: 8326737920
  swapTotal: 8326737920
  uptime: 98h 2m 40.00s (Approximately 4.08 days)
plugins:
  authorization: null
  log:
  - k8s-file
  - none
  - passthrough
  - journald
  network:
  - bridge
  - macvlan
  - ipvlan
  volume:
  - local
registries:
  search:
  - registry.fedoraproject.org
  - registry.access.redhat.com
  - docker.io
  - quay.io
store:
  configFile: /etc/containers/storage.conf
  containerStore:
    number: 0
    paused: 0
    running: 0
    stopped: 0
  graphDriverName: overlay
  graphOptions:
    overlay.imagestore: /var/lib/share-images2
    overlay.mountopt: nodev
  graphRoot: /var/lib/containers/storage
  graphRootAllocated: 106229137408
  graphRootUsed: 32347078656
  graphStatus:
    Backing Filesystem: xfs
    Native Overlay Diff: "true"
    Supports d_type: "true"
    Using metacopy: "false"
  imageCopyTmpDir: /var/tmp
  imageStore:
    number: 3
  runRoot: /run/containers/storage
  transientStore: false
  volumePath: /var/lib/containers/storage/volumes
version:
  APIVersion: 4.6.0-dev
  Built: 1684740237
  BuiltTime: Mon May 22 16:23:57 2023
  GitCommit: 44807eabf1790076c071270fc9b3d0958f280bb9
  GoVersion: go1.19.5
  Os: linux
  OsArch: linux/amd64
  Version: 4.6.0-dev

Podman in a container

No

Privileged Or Rootless

None

Upstream Latest Release

Yes

Additional environment details

Additional environment details

Additional information

If additionalimagestore is added, the extra image ID is also printed additionally.

# podman pull --root /var/lib/share-images2 ubi9
... snip ...
e7236a3e070f267713ad79c451b8628166abc0bc9c855f624619e099ec3faa99

# grep additionalimagestores -A 3 /etc/containers/storage.conf
additionalimagestores = [
        "/var/lib/share-images",
        "/var/lib/share-images2",
]

# podman images
REPOSITORY                       TAG         IMAGE ID      CREATED      SIZE        R/O
registry.access.redhat.com/ubi9  latest      e7236a3e070f  2 weeks ago  217 MB      false
registry.access.redhat.com/ubi9  latest      e7236a3e070f  2 weeks ago  217 MB      true
registry.access.redhat.com/ubi9  latest      e7236a3e070f  2 weeks ago  217 MB      true

# podman pull ubi9
... snip ...
e7236a3e070f267713ad79c451b8628166abc0bc9c855f624619e099ec3faa99
e7236a3e070f267713ad79c451b8628166abc0bc9c855f624619e099ec3faa99
e7236a3e070f267713ad79c451b8628166abc0bc9c855f624619e099ec3faa99
@sstosh sstosh added the kind/bug Categorizes issue or PR as related to a bug. label May 22, 2023
rhatdan added a commit to rhatdan/common that referenced this issue May 26, 2023
Currently if you setup additional stores and pull the same
image that exists in additionalstore, podman ends up reporting
the ID twice.

Fixes: containers/podman#18647

Signed-off-by: Daniel J Walsh <[email protected]>
rhatdan added a commit to rhatdan/common that referenced this issue Jun 12, 2023
Currently if you setup additional stores and pull the same
image that exists in additionalstore, podman ends up reporting
the ID twice.

Fixes: containers/podman#18647

Signed-off-by: Daniel J Walsh <[email protected]>
@edsantiago
Copy link
Member

edsantiago commented Jun 13, 2023

@rhatdan one way to test this in podman might be:

@test ...
    local imstore=$PODMAN_TMPDIR/imagestore
    local sconf=$PODMAN_TMPDIR/storage.conf
    cat >$sconf <<EOF
[storage]
driver="overlay"

[storage.options]
additionalimagestores = [ "$imstore" ]
EOF

    # Or maybe save/load, to avoid network flakes?
    run_podman pull -q --root $imstore $IMAGE

    env CONTAINERS_STORAGE_CONF=$sconf run_podman images -a
    # FIXME: confirming that it includes two copies of $IMAGE, one R/O false & one true, left as exercise for the reader

    env CONTAINERS_STORAGE_CONF=$sconf podman pull -q $IMAGE
    # FIXME: output should be exactly one line, only one line
}

rhatdan added a commit to rhatdan/podman that referenced this issue Jun 14, 2023
@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 12, 2023
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 12, 2023
rhatdan added a commit to rhatdan/common that referenced this issue Feb 5, 2024
Currently if you setup additional stores and pull the same
image that exists in additionalstore, podman ends up reporting
the ID twice.

Fixes: containers/podman#18647

Signed-off-by: Daniel J Walsh <[email protected]>
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