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 should throw an error if a "docker-daemon:foo" is missing the tag #4434

Closed
larsks opened this issue Nov 3, 2019 · 4 comments · Fixed by #4449
Closed

podman pull should throw an error if a "docker-daemon:foo" is missing the tag #4434

larsks opened this issue Nov 3, 2019 · 4 comments · Fixed by #4449
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

@larsks
Copy link
Contributor

larsks commented Nov 3, 2019

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

/kind bug

Description

podman pull docker-daemon:image should fail with an error, rather than trying to fetch an image from remote registries.

Steps to reproduce the issue:

  1. Attempt to podman pull docker-daemon:foo, neglecting to provide a tag.

Describe the results you received:

podman attempted to find the image docker-daemon:foo from a variety of remote registries:

Trying to pull docker.io/library/docker-daemon:foo...
  denied: requested access to the resource is denied
Trying to pull registry.fedoraproject.org/docker-daemon:foo...
  manifest unknown: manifest unknown
Trying to pull quay.io/docker-daemon:foo...
  error parsing HTTP 404 response body: invalid character '<' looking for beginning of value: "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 3.2 Final//EN\">\n<title>404 Not Found</title>\n<h1>Not Found</h1>\n<p>The requested URL was not found on the server. If you entered the URL manually please check your spelling and try again.</p>\n"
Trying to pull registry.access.redhat.com/docker-daemon:foo...
  name unknown: Repo not found
Trying to pull registry.centos.org/docker-daemon:foo...
  manifest unknown: manifest unknown
Error: error pulling image "docker-daemon:foo": unable to pull docker-daemon:foo: 5 errors occurred:
        * Error initializing source docker://docker-daemon:foo: Error reading manifest foo in docker.io/library/docker-daemon: errors:
denied: requested access to the resource is denied
unauthorized: authentication required

        * Error initializing source docker://registry.fedoraproject.org/docker-daemon:foo: Error reading manifest foo in registry.fedoraproject.org/docker-daemon: manifest unknown: manifest unknown
        * Error initializing source docker://quay.io/docker-daemon:foo: Error reading manifest foo in quay.io/docker-daemon: error parsing HTTP 404 response body: invalid character '<' looking for beginning of value: "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 3.2 Final//EN\">\n<title>404 Not Found</title>\n<h1>Not Found</h1>\n<p>The requested URL was not found on the server. If you entered the URL manually please check your spelling and try again.</p>\n"
        * Error initializing source docker://registry.access.redhat.com/docker-daemon:foo: Error reading manifest foo in registry.access.redhat.com/docker-daemon: name unknown: Repo not found
        * Error initializing source docker://registry.centos.org/docker-daemon:foo: Error reading manifest foo in registry.centos.org/docker-daemon: manifest unknown: manifest unknown

Describe the results you expected:

I would expect podman to treat anything that begins with docker-daemon: as an attempt to pull from the local docker daemon. If a tag is required, it should fail with an error, as in:

$ skopeo inspect docker-daemon:foo
FATA[0000] docker-daemon: reference foo has neither a tag nor a digest

This would (a) be less surprising in general and (b) would be consistent with how skopeo handles the same situation.

Output of podman version:

Version:            1.6.2
RemoteAPI Version:  1
Go Version:         go1.13.1
OS/Arch:            linux/amd64

Output of podman info --debug:

debug:
  compiler: gc
  git commit: ""
  go version: go1.13.1
  podman version: 1.6.2
host:
  BuildahVersion: 1.11.3
  CgroupVersion: v2
  Conmon:
    package: conmon-2.0.2-1.fc31.x86_64
    path: /usr/bin/conmon
    version: 'conmon version 2.0.2, commit: 186a550ba0866ce799d74006dab97969a2107979'
  Distribution:
    distribution: fedora
    version: "31"
  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
  MemFree: 25257238528
  MemTotal: 33580802048
  OCIRuntime:
    name: crun
    package: crun-0.10.2-1.fc31.x86_64
    path: /usr/bin/crun
    version: |-
      crun version 0.10.2
      spec: 1.0.0
      +SYSTEMD +SELINUX +APPARMOR +CAP +SECCOMP +EBPF +YAJL
  SwapFree: 16890458112
  SwapTotal: 16890458112
  arch: amd64
  cpus: 8
  eventlogger: journald
  hostname: madhatter
  kernel: 5.3.7-301.fc31.x86_64
  os: linux
  rootless: true
  slirp4netns:
    Executable: /usr/bin/slirp4netns
    Package: slirp4netns-0.4.0-20.1.dev.gitbbd6f25.fc31.x86_64
    Version: |-
      slirp4netns version 0.4.0-beta.3+dev
      commit: bbd6f25c70d5db2a1cd3bfb0416a8db99a75ed7e
  uptime: 1h 44m 55.69s (Approximately 0.04 days)
registries:
  blocked: null
  insecure: null
  search:
  - docker.io
  - registry.fedoraproject.org
  - quay.io
  - registry.access.redhat.com
  - registry.centos.org
store:
  ConfigFile: /home/lars/.config/containers/storage.conf
  ContainerStore:
    number: 5
  GraphDriverName: overlay
  GraphOptions:
    overlay.mount_program:
      Executable: /usr/bin/fuse-overlayfs
      Package: fuse-overlayfs-0.6.5-2.fc31.x86_64
      Version: |-
        fusermount3 version: 3.6.2
        fuse-overlayfs: version 0.6.5
        FUSE library version 3.6.2
        using FUSE kernel interface version 7.29
  GraphRoot: /home/lars/.local/share/containers/storage
  GraphStatus:
    Backing Filesystem: extfs
    Native Overlay Diff: "false"
    Supports d_type: "true"
    Using metacopy: "false"
  ImageStore:
    number: 5
  RunRoot: /run/user/1000
  VolumePath: /home/lars/.local/share/containers/storage/volumes

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

podman-1.6.2-2.fc31.x86_64

@openshift-ci-robot openshift-ci-robot added the kind/bug Categorizes issue or PR as related to a bug. label Nov 3, 2019
@larsks larsks changed the title podman pull should throw an error if a "docker-daemon:foo podman pull should throw an error if a "docker-daemon:foo" is missing the tag Nov 3, 2019
@rhatdan rhatdan assigned giuseppe and vrothberg and unassigned giuseppe Nov 4, 2019
@rhatdan
Copy link
Member

rhatdan commented Nov 4, 2019

@giuseppe and/or @vrothberg PTAL

@vrothberg
Copy link
Member

I'll take a look

@TomSweeneyRedHat
Copy link
Member

Is it supposed to append :latest if a tag is not provided?

@vrothberg
Copy link
Member

Is it supposed to append :latest if a tag is not provided?

Right on the spot, @TomSweeneyRedHat. That's exactly the problem here. Looks like Podman is jumping back to the docker transport for unqualified images without a tag.

vrothberg added a commit to vrothberg/libpod that referenced this issue Nov 5, 2019
When pulling an unqualified reference (e.g., `fedora`) make sure that
the reference is not using a non-docker transport to avoid iterating
over the search registries and trying to pull from them.

Fixes: containers#4434
Signed-off-by: Valentin Rothberg <[email protected]>
@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.

6 participants