Bug 1013539 - docker: unable to push to another repository
docker: unable to push to another repository
Status: CLOSED CURRENTRELEASE
Product: Fedora
Classification: Fedora
Component: docker-io (Show other bugs)
20
Unspecified Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: Lokesh Mandvekar
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2013-09-30 06:11 EDT by Marek Goldmann
Modified: 2014-07-01 18:59 EDT (History)
6 users (show)

See Also:
Fixed In Version: docker-io-0.7-0.13.dm.fc20
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2013-11-20 03:50:44 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Marek Goldmann 2013-09-30 06:11:18 EDT
The problem is that after I pushed to one repo (goldmann/f20 in the example) I cannot push to another repos. I've created a few images, I tagged them and assigned a different repo (goldmann/sandbox).

I've tried to push them with the docker push goldmann/sandbox command, but it tries to push the image I've pushed to goldmann/f20 repo:

=========================

[root@localhost ~]# docker images
REPOSITORY          TAG                 ID                  CREATED             SIZE
goldmann/sandbox    blah                bbf9eb60ecb5        2 days ago          11.64 MB (virtual 380.9 MB)
goldmann/sandbox    hmm                 970a260d2736        2 days ago          4.096 kB (virtual 1.451 GB)
<none>              <none>              d51bd0ead75f        2 days ago          4.096 kB (virtual 1.451 GB)
<none>              <none>              f1f136485cb0        3 days ago          4.096 kB (virtual 1.451 GB)
<none>              <none>              de0a3accac55        3 days ago          4.096 kB (virtual 1.451 GB)
<none>              <none>              b47b93d1e937        3 days ago          4.096 kB (virtual 1.451 GB)
<none>              <none>              685f4159a8aa        3 days ago          4.096 kB (virtual 1.451 GB)
<none>              <none>              60fdd1fdffbc        3 days ago          4.096 kB (virtual 1.451 GB)
goldmann/f20        latest              5c47c0892695        3 days ago          369.3 MB (virtual 369.3 MB)
<none>              <none>              366ff524eea0        4 days ago          4.096 kB (virtual 1.412 GB)
<none>              <none>              89f3227048c5        4 days ago          4.096 kB (virtual 1.412 GB)
<none>              <none>              453d421a9bdb        4 days ago          166 MB (virtual 539.1 MB)
<none>              <none>              a8ebdc97a85d        5 days ago          4.096 kB (virtual 1.009 GB)
<none>              <none>              d103a432ddd4        5 days ago          15.16 MB (virtual 388.4 MB)
<none>              <none>              d7d3c539a299        5 days ago          166.9 MB (virtual 540.1 MB)
mattdm/fedora       latest              22a514a5aa4c        5 days ago          373.2 MB (virtual 373.2 MB)
<none>              <none>              6893658939cd        5 days ago          38.76 kB (virtual 1.009 GB)
<none>              <none>              f7c607ca8a73        5 days ago          4.096 kB (virtual 1.009 GB)
<none>              <none>              8d778e730826        5 days ago          166.6 MB (virtual 539.8 MB)
<none>              <none>              21e2d383d388        5 days ago          166.6 MB (virtual 539.8 MB)
<none>              <none>              1b91ea216c4c        5 days ago          115.5 MB (virtual 488.7 MB)
<none>              <none>              428c5ea7f10a        5 days ago          115.5 MB (virtual 488.7 MB)
<none>              <none>              4583d3911946        5 days ago          115.5 MB (virtual 488.7 MB)
mattdm/fedora       f19                 50f374c05c2c        11 days ago         371.6 MB (virtual 371.6 MB)
mattdm/fedora       f20rc3.small        97fc5bf7f8d4        12 days ago         220.6 MB (virtual 220.6 MB)
[root@localhost ~]# docker push goldmann/f20
The push refers to a repository [goldmann/f20] (len: 1)
Sending image list
Pushing repository goldmann/f20 (1 tags)
Pushing 5c47c08926951ad84aa164b300f13dc3ebfbb72b626163806415bbe7b3e30d2c
Image 5c47c08926951ad84aa164b300f13dc3ebfbb72b626163806415bbe7b3e30d2c already pushed, skipping
Pushing tags for rev [5c47c08926951ad84aa164b300f13dc3ebfbb72b626163806415bbe7b3e30d2c] on {https://registry-1.docker.io/v1/repositories/goldmann/f20/tags/latest}
[root@localhost ~]# docker push goldmann/sandbox
The push refers to a repository [goldmann/sandbox] (len: 2)
Sending image list
Pushing repository goldmann/sandbox (2 tags)
Pushing 5c47c08926951ad84aa164b300f13dc3ebfbb72b626163806415bbe7b3e30d2c
Image 5c47c08926951ad84aa164b300f13dc3ebfbb72b626163806415bbe7b3e30d2c already pushed, skipping
Pushing tags for rev [5c47c08926951ad84aa164b300f13dc3ebfbb72b626163806415bbe7b3e30d2c] on {https://registry-1.docker.io/v1/repositories/goldmann/sandbox/tags/hmm}

=================================

Please note that the image IDs are the same when pushing to f20 and sandbox repos. The goldmann/sandox repository wasn't created in the docker image registry and no image has been uploaded, but I should have there two images (bbf9eb60ecb5 and 970a260d2736).

Version-Release number of selected component (if applicable):

docker-io-0.6.3-2.devicemapper.fc20.x86_64

This is the 0.6.3-1 release with the patch from RHBZ#1012952.
Comment 1 Marek Goldmann 2013-09-30 09:31:36 EDT
It seems this is central repository issue.
Comment 2 Marek Goldmann 2013-10-01 04:45:44 EDT
Reported upstream: https://github.com/dotcloud/docker/issues/2055
Comment 3 Marek Goldmann 2013-10-03 07:45:57 EDT
After talking with upstream devs (at https://github.com/dotcloud/docker/issues/2055) I've confirmed that this is a Fedora issue.
Comment 4 Lokesh Mandvekar 2013-10-03 12:32:40 EDT
cc'ing Alex for help with the devicemapper patch
Comment 5 Khalid Goudeaux 2013-10-17 17:33:47 EDT
After reading through the linked docker issue I believe I'm encountering the same (or very similar) problem while pushing to a private docker registry. Only the base image and one additional layer are pushed.

Given a simple Dockerfile with two empty context files foo.txt and bar.txt to force the creation of two additional layers:
from mattdm/fedora:f19
ADD foo.txt /etc/foo.txt
ADD bar.txt /etc/bar.txt

we build:
sudo docker build -t vm-newdocker:5000/test .
Uploading context 61440 bytes
Step 1 : FROM mattdm/fedora:f19
 ---> 50f374c05c2c
Step 2 : ADD foo.txt /etc/foo.txt
 ---> 5a29816a5219
Step 3 : ADD bar.txt /etc/bar.txt
 ---> ebf30c70b080
Successfully built ebf30c70b080

Note the last image id prefix, ebf30c70b080. Now we push:

sudo docker push vm-newdocker:5000/test
The push refers to a repository [vm-newdocker:5000/test] (len: 1)
Sending image list
Pushing repository vm-newdocker:5000/test (1 tags)
Pushing tags for rev [50f374c05c2c07d28620824a6f8427d50879d92f5be6b318d3340f4f0f6120a2] on {http://vm-newdocker:5000/v1/repositories/test/tags/latest}
Image 50f374c05c2c07d28620824a6f8427d50879d92f5be6b318d3340f4f0f6120a2 already pushed, skipping
Pushing 5a29816a5219dbc1f3083e7737f1dce92baa5c27bb12e02d6428da82cdb093f0
Pushing tags for rev [5a29816a5219dbc1f3083e7737f1dce92baa5c27bb12e02d6428da82cdb093f0] on {http://vm-newdocker:5000/v1/repositories/test/tags/latest}

Layer ebf30c70b080 is never pushed. The base image and one layer above are checked (50f374c05c2c and 5a29816a5219) but the next is ignored.

For non-trivial dockerfiles the pattern is the same except more layers are ignored.

And as you'd expect, attempting to pull results in a 404 for the layer that wasn't pushed:
sudo docker pull vm-newdocker:5000/test
Pulling repository vm-newdocker:5000/test
50f374c05c2c: Download complete
5a29816a5219: Download complete
d5abdc9c6b5a: Download complete
ebf30c70b080: Error pulling image (latest) from vm-newdocker:5000/test, Internal server error: 404 trying to fetch remote history for ebf30c70b080a6144e15013dc59a138e8ba6b94faf2013/10/17 16:20:24 Internal server error: 404 trying to fetch remote history for test

Using: docker-io-0.6.3-2.devicemapper.fc19.x86_64
Comment 6 Marek Goldmann 2013-11-20 03:50:44 EST
I do not see this issue with docker-io-0.7-0.13.dm.fc20 anymore, I'm closing this ticket. Feel free to reopen in case it shows up again.
Comment 7 Khalid Goudeaux 2013-11-20 12:35:04 EST
I can confirm. docker-io-0.7-0.13.dm.fc19.x86_64 is pushing images correctly.

Note You need to log in before you can comment on or make changes to this bug.