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

Falling back to v1 when image can't be found. #26142

Closed
rmb938 opened this issue Aug 30, 2016 · 4 comments
Closed

Falling back to v1 when image can't be found. #26142

rmb938 opened this issue Aug 30, 2016 · 4 comments
Labels
area/distribution kind/enhancement Enhancements are not bugs or new features but can improve usability or performance. version/1.12

Comments

@rmb938
Copy link
Contributor

rmb938 commented Aug 30, 2016

Output of docker version:

Client:
 Version:      1.12.0
 API version:  1.24
 Go version:   go1.6.3
 Git commit:   8eab29e
 Built:        Thu Jul 28 21:15:28 2016
 OS/Arch:      darwin/amd64

Server:
 Version:      1.12.1
 API version:  1.24
 Go version:   go1.6.3
 Git commit:   23cf638
 Built:        Thu Aug 18 17:52:38 2016
 OS/Arch:      linux/amd64

Output of docker info:

Containers: 0
 Running: 0
 Paused: 0
 Stopped: 0
Images: 28
Server Version: 1.12.1
Storage Driver: aufs
 Root Dir: /mnt/sda1/var/lib/docker/aufs
 Backing Filesystem: extfs
 Dirs: 193
 Dirperm1 Supported: true
Logging Driver: json-file
Cgroup Driver: cgroupfs
Plugins:
 Volume: local
 Network: null overlay bridge host
Swarm: inactive
Runtimes: runc
Default Runtime: runc
Security Options: seccomp
Kernel Version: 4.4.17-boot2docker
Operating System: Boot2Docker 1.12.1 (TCL 7.2); HEAD : ef7d0b4 - Thu Aug 18 21:18:06 UTC 2016
OSType: linux
Architecture: x86_64
CPUs: 4
Total Memory: 3.858 GiB
Name: bats
ID: LCGK:BYEJ:EYJH:W3OJ:KEUV:U4SR:AQE5:K4UA:WR3M:7OOF:ZOAN:G34K
Docker Root Dir: /mnt/sda1/var/lib/docker
Debug Mode (client): false
Debug Mode (server): true
 File Descriptors: 14
 Goroutines: 24
 System Time: 2016-08-30T14:34:12.459579276Z
 EventsListeners: 0
Registry: https://index.docker.io/v1/
Labels:
 provider=virtualbox
Insecure Registries:
 127.0.0.0/8

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

Docker Machine and the same issue happens in Docker for Mac. Possibly happens outide of these environments as well but I haven't tested yet.

Steps to reproduce the issue:

  1. Login to a private v2 repo
  2. Try to pull an image that doesn't exist.
  3. Docker tries from v2, fails, and falls back to v1 and fails with a weird error.

Describe the results you received:

Docker Client:

docker pull myprivaterepo.com/team/image
Using default tag: latest
Pulling repository myprivaterepo.com/team/image
Error: Status 400 trying to pull repository team/image: "{\n  \"errors\" : [ {\n    \"status\" : 400,\n    \"message\" : \"Unsupported docker v1 repository request for 'myprivaterepo'\"\n  } ]\n}"

Docker Daemon Logs:

time="2016-08-30T14:25:07.047115550Z" level=debug msg="Calling POST /v1.24/images/create?fromImage=myprivaterepo.com%2Fteam%2Fimage&tag=0.0.1"
time="2016-08-30T14:25:07.047168891Z" level=debug msg="Client and server don't have the same version (client: 1.12.0, server: 1.12.1)"
time="2016-08-30T14:25:07.111103877Z" level=debug msg="hostDir: /etc/docker/certs.d/myprivaterepo.com"
time="2016-08-30T14:25:07.127364932Z" level=debug msg="hostDir: /etc/docker/certs.d/myprivaterepo.com"
time="2016-08-30T14:25:07.127468960Z" level=debug msg="Trying to pull myprivaterepo.com/team/image from https://myprivaterepo.com v2"
time="2016-08-30T14:25:07.535073005Z" level=error msg="Attempting next endpoint for pull after error: manifest unknown: The named manifest is not known to the registry."
time="2016-08-30T14:25:07.535232986Z" level=debug msg="Trying to pull myprivaterepo.com/team/image from https://myprivaterepo.com v1"
time="2016-08-30T14:25:07.554323335Z" level=debug msg="hostDir: /etc/docker/certs.d/cmyprivaterepo.com"
time="2016-08-30T14:25:07.554478645Z" level=debug msg="attempting v1 ping for registry endpoint https://myprivaterepo.com/v1/"
time="2016-08-30T14:25:07.661466205Z" level=debug msg="PingResult.Version: \"\""
time="2016-08-30T14:25:07.665454974Z" level=debug msg="Registry standalone header: ''"
time="2016-08-30T14:25:07.665523217Z" level=debug msg="PingResult.Standalone: true"
time="2016-08-30T14:25:07.665540950Z" level=debug msg="Endpoint https://myprivaterepo.com/v1/ is eligible for private registry. Enabling decorator."
time="2016-08-30T14:25:07.665616984Z" level=debug msg="[registry] Calling GET https://myprivaterepo.com/v1/repositories/team/image/images"
time="2016-08-30T14:25:32.614110410Z" level=error msg="Not continuing with pull after error: Error: Status 400 trying to pull repository team/image: \"{\\n  \\\"errors\\\" : [ {\\n    \\\"status\\\" : 400,\\n    \\\"message\\\" : \\\"Unsupported docker v1 repository request for 'myprivaterepo'\\\"\\n  } ]\\n}\""

Describe the results you expected:

Return "Unknown Image" or something along those lines.

@thaJeztah thaJeztah added area/distribution kind/enhancement Enhancements are not bugs or new features but can improve usability or performance. labels Sep 27, 2016
@Veske
Copy link

Veske commented Jan 11, 2017

This issue is indeed annoying.

@thaJeztah
Copy link
Member

Docker 1.9 and up have a --disable-legacy-registry daemon option that allows you to disable the fallback to V1 registries. In future, this will be the default; see Interacting with V1 registries.

Does that solve your issue?

@Veske
Copy link

Veske commented Jan 11, 2017

Yes, this solves it. Thanks!

@thaJeztah
Copy link
Member

--disable-legacy-registry is now the default for docker 17.06 and up (see the rebase notes); https://github.com/docker/docker-ce/releases/tag/v17.06.0-ce, and the pull request: #33629)

I think that resolves the issue, so I'll close this one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/distribution kind/enhancement Enhancements are not bugs or new features but can improve usability or performance. version/1.12
Projects
None yet
Development

No branches or pull requests

4 participants