Repository navigation
Closed
Description
Reproducer:
$ docker tag docker.io/hello-world 172.30.104.152:5000/tmp/hello-world:latest
$ docker push 172.30.104.152:5000/tmp/hello-world:latest
The push refers to a repository [172.30.104.152:5000/tmp/hello-world] (len: 1)
0a6ba66e537a: Pushed
b901d36b6f2f: Pushed
latest: digest: sha256:bb5c16ecd58633d4088140acb6ee386c5c3b09a8f03c517a288093415f0c09d1 size: 2748
$ oc tag -n tmp hello-world@sha256:bb5c16ecd58633d4088140acb6ee386c5c3b09a8f03c517a288093415f0c09d1 mybase:latest
Tag mybase:latest set to hello-world@sha256:bb5c16ecd58633d4088140acb6ee386c5c3b09a8f03c517a288093415f0c09d1.
*$ oc describe -n tmp istag
Name: sha256:bb5c16ecd58633d4088140acb6ee386c5c3b09a8f03c517a288093415f0c09d1
Created: 2 minutes ago
Labels: <none>
Annotations: openshift.io/image.managed=true
Docker Image: 172.30.104.152:5000/tmp/hello-world@sha256:bb5c16ecd58633d4088140acb6ee386c5c3b09a8f03c517a288093415f0c09d1
Image Name: sha256:bb5c16ecd58633d4088140acb6ee386c5c3b09a8f03c517a288093415f0c09d1
Image Size: 633 B (first layer 601 B, last binary layer 32 B)
Image Created: 4 months ago
Author: <none>
Arch: amd64
Command: /hello
Working Dir: <none>
User: <none>
Exposes Ports: <none>
Docker Labels: <none>
Name: sha256:bb5c16ecd58633d4088140acb6ee386c5c3b09a8f03c517a288093415f0c09d1
Created: 2 minutes ago
Labels: <none>
Annotations: openshift.io/image.managed=true
Docker Image: 172.30.104.152:5000/tmp/hello-world@sha256:bb5c16ecd58633d4088140acb6ee386c5c3b09a8f03c517a288093415f0c09d1
Image Name: sha256:bb5c16ecd58633d4088140acb6ee386c5c3b09a8f03c517a288093415f0c09d1
Image Size: 633 B (first layer 601 B, last binary layer 32 B)
Image Created: 4 months ago
Author: <none>
Arch: amd64
Command: /hello
Working Dir: <none>
User: <none>
Exposes Ports: <none>
Docker Labels: <none>
$ # note the first pull is successful because all the blobs are already downloaded in Docker daemon's storage
$ docker pull 172.30.104.152:5000/tmp/mybase:latest
Trying to pull repository 172.30.104.152:5000/tmp/mybase ... latest: Pulling from tmp/mybase
Digest: sha256:bb5c16ecd58633d4088140acb6ee386c5c3b09a8f03c517a288093415f0c09d1
Status: Downloaded newer image for 172.30.104.152:5000/tmp/mybase:latest
$ docker rmi -f 0a6ba66e537a
Untagged: 172.30.104.152:5000/tmp/hello-world:latest
Untagged: 172.30.104.152:5000/tmp/mybase:latest
Untagged: docker.io/hello-world:latest
Deleted: 0a6ba66e537a53a5ea94f7c6a99c534c6adb12e3ed09326d4bf3b38f7c3ba4e7
Deleted: b901d36b6f2fd759c362819c595301ca981622654e7ea8a1aac893fbd2740b4c
$ # the second pull needs to repull all the blobs and fails
$ docker pull 172.30.104.152:5000/tmp/mybase:latest
Trying to pull repository 172.30.104.152:5000/tmp/mybase ... latest: Pulling from tmp/mybase
b901d36b6f2f: Pulling fs layer
0a6ba66e537a: Pulling fs layer
not found
Error: image tmp/mybase:latest not found
Tested with Docker 1.8.2 and 1.9.1. Test to confirm this is in #7790.
See also #7128 (comment) and #7763 (comment) for more background.
Activity
0xmichalis commentedon Mar 10, 2016
Do we want to somehow link the invalid istag location in the registry to the valid one?
miminar commentedon Mar 10, 2016
Update: outdated! , see #7792 (comment)
@legionus can you please verify you can pull with older Docker version (like 1.6)? So we know it's not a regression in the registry but a way, how docker works nowadays. This used to work in past ages.
If this is indeed caused by a change in Docker's behaviour, then it's a hard one. The solution is to create layer links in the repository referenced by IST, ISI or docker image for all the layers referenced in image manifest.
We could either:
namespace/namedoesn't match requestedIn all three cases we'd have to annotate the tag references to avoid subsequent reads of registry storage. My favorite is 3.
Update: I didn't mention the most obvious solution to this - resolve the repository in
pullthroughblobstoreif not found locally. We'd have to list all the ISTs, ISIs and DockerImages of the is corresponding to the repository to see what where else do we point to and redirect the request to the right blobstore. But this would be an efficiency killer.legionus commentedon Mar 14, 2016
@miminar It seems to regression. Take a look at the screencast:
https://gist.github.com/legionus/47b5ff3435a5daa16bb9
miminar commentedon Mar 15, 2016
@legionus Commented on the gist. It's necessary to remove all the references to the image you're about to pull from the ist.
legionus commentedon Mar 15, 2016
@miminar I've tested origin (v1.1.4-12-g77757b8) with docker (9d26a07/1.6.0, e949a81/1.10.3). Both are unable to pull from istag referencing image.
0xmichalis commentedon Mar 16, 2016
Talked with @legionus offline and we realized a possible solution would be that when our registry detects a "not found" response, it could query the apiserver for the missing image (oc get is), look into its tags, find the real link, and serve that. @miminar WDYT?
32 remaining items
UPSTREAM: docker/distribution: <carry>: Remove links creation
pweil- commentedon Mar 24, 2016
Summary of today's conversations:
pweil- commentedon Apr 11, 2016
@miminar @legionus - please make sure this gets a "known issues" mention in the release notes since we are not merging this for 3.2.
Document cross-repo pull issue
legionus commentedon Jun 26, 2016
Since the #8938 is merged this issue must be solved.
smarterclayton commentedon Jun 26, 2016
Can we create an extended test to verify this continues to work? Or add it
to e2e?
On Jun 26, 2016, at 5:04 PM, Alexey Gladkov [email protected]
wrote:
Since the #8938 #8938 is merged
this issue must be solved.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
#7792 (comment),
or mute the thread
https://github.com/notifications/unsubscribe/ABG_p_-2NU_A20acLg5qtfMQ7UET3pfCks5qPulzgaJpZM4HpVm0
.
legionus commentedon Jun 26, 2016
@smarterclayton Yes. In fact @soltysh already did it. I will create PR on Monday.
legionus commentedon Jun 26, 2016
https://github.com/openshift/origin/pull/8326/commits
soltysh commentedon Jun 27, 2016
Yeah, just copy that one commit and open a PR and we'll be good :)
pweil- commentedon Jul 6, 2016
bump, is the test for this merged? Can we close?
legionus commentedon Jul 6, 2016
I think yes
pweil- commentedon Jul 6, 2016
tests are submitted in #9580, the root issue has been merged. Closing.