Bug 1254959 - Cannot push images to version 1 repository
Summary: Cannot push images to version 1 repository
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: docker
Version: 22
Hardware: x86_64
OS: Linux
unspecified
high
Target Milestone: ---
Assignee: Michal Minar
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-08-19 10:33 UTC by Guy Attrill
Modified: 2016-02-16 19:55 UTC (History)
12 users (show)

Fixed In Version: docker-1.8.2-7.gitcb216be.fc22
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-02-16 19:55:35 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Guy Attrill 2015-08-19 10:33:35 UTC
Description of problem:
I create an image on my fedora 22 with docker 1.7.1.fc22
when I try and push it to my private repository I get a 500 error


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

private docker repo
registry:0.7.3    


How reproducible:
Always reproducable

Steps to Reproduce:
1.create image
2.push to private repo
3.

Actual results:
1877478ea105: Pushing [==================================================>]   280 MB/280 MB
Received HTTP code 500 while uploading layer: "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 3.2 Final//EN\">\n<title>500 Internal Server Error</title>\n<h1>Internal Server Error</h1>\n<p>The server encountered an internal error and was unable to complete your request.  Either the server is overloaded or there is an error in the application.</p>\n"



private repository server throws this


2015-08-19 09:55:54,231 ERROR: Exception on /v1/images/1877478ea1057de4e372aa4298b4a025807252a6d34aab3c8380d046efe7e0f9/layer [PUT]
Traceback (most recent call last):
  File "/usr/local/lib/python2.7/dist-packages/flask/app.py", line 1817, in wsgi_app
    response = self.full_dispatch_request()
  File "/usr/local/lib/python2.7/dist-packages/flask/app.py", line 1477, in full_dispatch_request
    rv = self.handle_user_exception(e)
  File "/usr/local/lib/python2.7/dist-packages/flask/app.py", line 1381, in handle_user_exception
    reraise(exc_type, exc_value, tb)
  File "/usr/local/lib/python2.7/dist-packages/flask/app.py", line 1475, in full_dispatch_request
    rv = self.dispatch_request()
  File "/usr/local/lib/python2.7/dist-packages/flask/app.py", line 1461, in dispatch_request
    return self.view_functions[rule.endpoint](**req.view_args)
  File "/usr/local/lib/python2.7/dist-packages/docker_registry/toolkit.py", line 264, in wrapper
    return f(*args, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/docker_registry/images.py", line 231, in put_image_layer
    if toolkit.DockerVersion() < '0.10':
  File "/usr/local/lib/python2.7/dist-packages/docker_registry/toolkit.py", line 38, in __init__
    distutils.version.StrictVersion.__init__(self, version)
  File "/usr/lib/python2.7/distutils/version.py", line 40, in __init__
    self.parse(vstring)
  File "/usr/lib/python2.7/distutils/version.py", line 107, in parse
    raise ValueError, "invalid version number '%s'" % vstring
ValueError: invalid version number '1.7.1.fc22'




Expected results:

1877478ea105: Image successfully pushed


Additional info:
I believe its to do with the docker version having .fc22 on the end and the old version of docker registry not liking it my colleague uses ubuntu and  docker 1.7.1 can push to that 

this is his docker version
docker --version
Docker version 1.7.1, build 786b29d

this is mine on fedora
docker --version
Docker version 1.7.1.fc22, build b6416b7/1.7.1



workaround downgraded to 1.6.0

docker --version 
Docker version 1.6.0, build 9d26a07/1.6.0

Comment 1 Daniel Walsh 2015-08-21 04:25:29 UTC
Could you check if this issue is fixed in docker-1.8.1-1.git9281dc3.fc22

Comment 2 Guy Attrill 2015-08-21 09:33:19 UTC
unfortunately I dont have access to 1.8.1
can I ask what result you get when you do docker --version on 1.8.1
if it is 1.8.1.fc22 i think it would fail

Comment 3 Tomas Edwardsson 2015-08-26 12:01:31 UTC
docker-1.8.1-2.git3c1d7c8.fc22.x86_64 confirmed has the same problem.

Comment 4 Daniel Walsh 2015-09-29 14:53:09 UTC
Does docker-1.8.2?  

Might be a problem with docker upstream.  Not sure if this is our patches causing the problem or docker itself has dropped support for docker V1 registry.

Comment 5 Guy Attrill 2015-09-30 07:55:25 UTC
no docker is fine i have removed fedora docker and installed from docker itself and it works
it is down to the version having fc22 tagged on the end

Comment 6 Daniel Walsh 2015-10-28 17:35:42 UTC
Michal any update on this?

Comment 7 Michal Minar 2015-11-11 14:04:16 UTC
Seems to be fixed in recent docker build. I can push to 0.7.3 registry just fine. Registry reports docker version "docker/1.8.2-fc22" (there is a dash instead of dot).


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