docker-archive / docker-registry

This is **DEPRECATED**! Please go to https://github.com/docker/distribution
Apache License 2.0
2.88k stars 879 forks source link

500 errors when pushing to swift-backed registry #334

Open matthughes opened 10 years ago

matthughes commented 10 years ago

Running the latest registry with a swift storage, I get 500 when it actually tries to push the images. It accepts the snapshots and I can see them in my swift store, so I know the credentials, connection info is correct.

Client Logs

The push refers to a repository [private-repo:5000/ctos-java] (len: 1)
Sending image list
Pushing repository private-repo:5000/ctos-java (1 tags)
511136ea3c5a: Image already pushed, skipping
7064731afe90: Pushing
2014/05/01 13:39:08 HTTP code 500 while uploading metadata: invalid character '<' looking for beginning of value

Server Logs

2014-05-01 17:38:25 [1] [INFO] Starting gunicorn 18.0
2014-05-01 17:38:25 [1] [INFO] Listening at: http://0.0.0.0:5000 (1)
2014-05-01 17:38:25 [1] [INFO] Using worker: gevent
2014-05-01 17:38:25 [15] [INFO] Booting worker with pid: 15
2014-05-01 17:38:25 [16] [INFO] Booting worker with pid: 16
2014-05-01 17:38:25 [19] [INFO] Booting worker with pid: 19
2014-05-01 17:38:25 [24] [INFO] Booting worker with pid: 24
68.87.97.254 - - [01/May/2014:17:38:32] "GET /v1/_ping HTTP/1.1" 200 4 "-" "Go 1.1 package http"
2014-05-01 17:38:32,789 INFO: 68.87.97.254 - - [01/May/2014:17:38:32] "GET /v1/_ping HTTP/1.1" 200 4 "-" "Go 1.1 package http"
2014-05-01 17:38:32,934 DEBUG: check_session: Session is empty
REQ: curl -i https://keystone:5000/v2.0/tokens -X POST -H "Content-Type: application/json" -H "User-Agent: python-keystoneclient"
2014-05-01 17:38:33,008 DEBUG: REQ: curl -i https://keystone:5000/v2.0/tokens -X POST -H "Content-Type: application/json" -H "User-Agent: python-keystoneclient"
REQ BODY: {"auth": {"tenantName": "tenant", "passwordCredentials": {"username": "username", "password": "."}}}

2014-05-01 17:38:33,009 DEBUG: REQ BODY: {"auth": {"tenantName": "tenant", "passwordCredentials": {"username": "username", "password": "."}}}

Starting new HTTPS connection (1): keystone
2014-05-01 17:38:33,015 INFO: Starting new HTTPS connection (1): keystone
"POST /v2.0/tokens HTTP/1.1" 200 10955
2014-05-01 17:38:33,510 DEBUG: "POST /v2.0/tokens HTTP/1.1" 200 10955
RESP: [200] {'content-length': '10955', 'date': 'Thu, 01 May 2014 17:34:52 GMT', 'content-type': 'application/json', 'vary': 'X-Auth-Token', 'connection': 'close', 'server': 'Apache/2.2.22 (Ubuntu)'}
RESP BODY: ... truncated ...

2014-05-01 17:38:33,535 DEBUG: RESP: [200] {'content-length': '10955', 'date': 'Thu, 01 May 2014 17:34:52 GMT', 'content-type': 'application/json', 'vary': 'X-Auth-Token', 'connection': 'close', 'server': 'Apache/2.2.22 (Ubuntu)'}
RESP BODY: ... truncated ... 

2014-05-01 17:38:33,537 DEBUG: Parsed 2014-05-02T17:34:52Z into {'tz_sign': None, 'second_fraction': None, 'hour': u'17', 'daydash': u'02', 'tz_hour': None, 'month': None, 'timezone': u'Z', 'second': u'52', 'tz_minute': None, 'year': u'2014', 'separator': u'T', 'monthdash': u'05', 'day': None, 'minute': u'34'} with default timezone <iso8601.iso8601.Utc object at 0x24040d0>
2014-05-01 17:38:33,537 DEBUG: Got u'2014' for 'year' with default None
2014-05-01 17:38:33,537 DEBUG: Got u'05' for 'monthdash' with default 1
2014-05-01 17:38:33,537 DEBUG: Got 5 for 'month' with default 5
2014-05-01 17:38:33,537 DEBUG: Got u'02' for 'daydash' with default 1
2014-05-01 17:38:33,537 DEBUG: Got 2 for 'day' with default 2
2014-05-01 17:38:33,538 DEBUG: Got u'17' for 'hour' with default None
2014-05-01 17:38:33,538 DEBUG: Got u'34' for 'minute' with default None
2014-05-01 17:38:33,538 DEBUG: Got u'52' for 'second' with default None
2014-05-01 17:38:33,778 DEBUG: REQ: curl -i http://swiftds:8080/swift/v1/docker-registry-retry/registry/repositories/library/ctos-java/_index_images -X GET -H "X-Auth-Token: 1261bdf4f23b4f25bb37ef2a5ef5f476"

2014-05-01 17:38:33,778 DEBUG: RESP STATUS: 404

2014-05-01 17:38:33,779 DEBUG: RESP BODY: NoSuchKey

2014-05-01 17:38:33,780 ERROR: Object GET failed: http://swiftds:8080/swift/v1/docker-registry-retry/registry/repositories/library/ctos-java/_index_images 404 Not Found   NoSuchKey
Traceback (most recent call last):
  File "/usr/local/lib/python2.7/dist-packages/swiftclient/client.py", line 1110, in _retry
    rv = func(self.url, self.token, *args, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/swiftclient/client.py", line 758, in get_object
    http_response_content=body)
ClientException: Object GET failed: http://swiftds:8080/swift/v1/docker-registry-retry/registry/repositories/library/ctos-java/_index_images 404 Not Found   NoSuchKey
2014-05-01 17:38:38,937 DEBUG: REQ: curl -i http://swiftds:8080/swift/v1/docker-registry-retry/registry/repositories/library/ctos-java/_index_images -X PUT -H "X-Auth-Token: 1261bdf4f23b4f25bb37ef2a5ef5f476"

2014-05-01 17:38:38,937 DEBUG: RESP STATUS: 200

2014-05-01 17:38:38,938 DEBUG: RESP BODY:
HTTP/1.1 404 Not Found
Date: Thu, 01 May 2014 17:38:34 GMT
Server: Apache/2.2.22 (Ubuntu)
Accept-Ranges: bytes
Content-Length: 12
Vary: Accept-Encoding
Content-Type: text/plain; charset=utf-8

NoSuchBucket

68.87.97.254 - - [01/May/2014:17:38:38] "PUT /v1/repositories/ctos-java/ HTTP/1.1" 200 2 "-" "docker/0.10.0 go/go1.2.1 git-commit/dc9c28f kernel/3.13.3-tinycore64 os/linux arch/amd64"
2014-05-01 17:38:38,940 INFO: 68.87.97.254 - - [01/May/2014:17:38:38] "PUT /v1/repositories/ctos-java/ HTTP/1.1" 200 2 "-" "docker/0.10.0 go/go1.2.1 git-commit/dc9c28f kernel/3.13.3-tinycore64 os/linux arch/amd64"
2014-05-01 17:38:39,084 DEBUG: check_session: Session is empty
2014-05-01 17:38:39,262 DEBUG: REQ: curl -i http://swiftds:8080/swift/v1/docker-registry-retry/registry/images/511136ea3c5a64f264b78b5433614aec563103b4d4702f3ba7d4d2698e22c158/_inprogress -X GET -H "X-Auth-Token: 1261bdf4f23b4f25bb37ef2a5ef5f476"

2014-05-01 17:38:39,263 DEBUG: RESP STATUS: 404

2014-05-01 17:38:39,263 DEBUG: RESP BODY: NoSuchKey

2014-05-01 17:38:39,263 ERROR: Object GET failed: http://swiftds:8080/swift/v1/docker-registry-retry/registry/images/511136ea3c5a64f264b78b5433614aec563103b4d4702f3ba7d4d2698e22c158/_inprogress 404 Not Found   NoSuchKey
Traceback (most recent call last):
  File "/usr/local/lib/python2.7/dist-packages/swiftclient/client.py", line 1110, in _retry
    rv = func(self.url, self.token, *args, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/swiftclient/client.py", line 758, in get_object
    http_response_content=body)
ClientException: Object GET failed: http://swiftds:8080/swift/v1/docker-registry-retry/registry/images/511136ea3c5a64f264b78b5433614aec563103b4d4702f3ba7d4d2698e22c158/_inprogress 404 Not Found   NoSuchKey
2014-05-01 17:38:44,432 DEBUG: REQ: curl -i http://swiftds:8080/swift/v1/docker-registry-retry/registry/repositories/library/ctos-java/_private -X GET -H "X-Auth-Token: 1261bdf4f23b4f25bb37ef2a5ef5f476"

2014-05-01 17:38:44,433 DEBUG: RESP STATUS: 200

2014-05-01 17:38:44,433 DEBUG: api_error: Image not found
68.87.97.254 - - [01/May/2014:17:38:44] "GET /v1/images/511136ea3c5a64f264b78b5433614aec563103b4d4702f3ba7d4d2698e22c158/json HTTP/1.1" 404 28 "-" "docker/0.10.0 go/go1.2.1 git-commit/dc9c28f kernel/3.13.3-tinycore64 os/linux arch/amd64"
2014-05-01 17:38:44,435 INFO: 68.87.97.254 - - [01/May/2014:17:38:44] "GET /v1/images/511136ea3c5a64f264b78b5433614aec563103b4d4702f3ba7d4d2698e22c158/json HTTP/1.1" 404 28 "-" "docker/0.10.0 go/go1.2.1 git-commit/dc9c28f kernel/3.13.3-tinycore64 os/linux arch/amd64"
2014-05-01 17:38:44,601 DEBUG: check_session: Session is empty
2014-05-01 17:38:44,826 DEBUG: REQ: curl -i http://swiftds:8080/swift/v1/docker-registry-retry/registry/images/511136ea3c5a64f264b78b5433614aec563103b4d4702f3ba7d4d2698e22c158/_checksum DELETE -H "X-Auth-Token: 1261bdf4f23b4f25bb37ef2a5ef5f476"

2014-05-01 17:38:44,826 DEBUG: RESP STATUS: 404

2014-05-01 17:38:44,827 DEBUG: RESP BODY: NoSuchBucket

2014-05-01 17:38:44,827 ERROR: Object DELETE failed: http://swiftds:8080/swift/v1/docker-registry-retry/registry/images/511136ea3c5a64f264b78b5433614aec563103b4d4702f3ba7d4d2698e22c158/_checksum 404 Not Found   NoSuchBucket
Traceback (most recent call last):
  File "/usr/local/lib/python2.7/dist-packages/swiftclient/client.py", line 1110, in _retry
    rv = func(self.url, self.token, *args, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/swiftclient/client.py", line 1017, in delete_object
    http_response_content=body)
ClientException: Object DELETE failed: http://swiftds:8080/swift/v1/docker-registry-retry/registry/images/511136ea3c5a64f264b78b5433614aec563103b4d4702f3ba7d4d2698e22c158/_checksum 404 Not Found   NoSuchBucket
2014-05-01 17:38:49,999 DEBUG: REQ: curl -i http://swiftds:8080/swift/v1/docker-registry-retry/registry/images/511136ea3c5a64f264b78b5433614aec563103b4d4702f3ba7d4d2698e22c158/json -X GET -H "X-Auth-Token: 1261bdf4f23b4f25bb37ef2a5ef5f476"

2014-05-01 17:38:50,000 DEBUG: RESP STATUS: 200

2014-05-01 17:38:50,193 DEBUG: REQ: curl -i http://swiftds:8080/swift/v1/docker-registry-retry/registry/images/511136ea3c5a64f264b78b5433614aec563103b4d4702f3ba7d4d2698e22c158/_inprogress -X GET -H "X-Auth-Token: 1261bdf4f23b4f25bb37ef2a5ef5f476"

2014-05-01 17:38:50,193 DEBUG: RESP STATUS: 404

2014-05-01 17:38:50,193 DEBUG: RESP BODY: NoSuchKey

2014-05-01 17:38:50,194 ERROR: Object GET failed: http://swiftds:8080/swift/v1/docker-registry-retry/registry/images/511136ea3c5a64f264b78b5433614aec563103b4d4702f3ba7d4d2698e22c158/_inprogress 404 Not Found   NoSuchKey
Traceback (most recent call last):
  File "/usr/local/lib/python2.7/dist-packages/swiftclient/client.py", line 1110, in _retry
    rv = func(self.url, self.token, *args, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/swiftclient/client.py", line 758, in get_object
    http_response_content=body)
ClientException: Object GET failed: http://swiftds:8080/swift/v1/docker-registry-retry/registry/images/511136ea3c5a64f264b78b5433614aec563103b4d4702f3ba7d4d2698e22c158/_inprogress 404 Not Found   NoSuchKey
2014-05-01 17:38:50,194 DEBUG: api_error: Image already exists
68.87.97.254 - - [01/May/2014:17:38:50] "PUT /v1/images/511136ea3c5a64f264b78b5433614aec563103b4d4702f3ba7d4d2698e22c158/json HTTP/1.1" 409 33 "-" "docker/0.10.0 go/go1.2.1 git-commit/dc9c28f kernel/3.13.3-tinycore64 os/linux arch/amd64"
2014-05-01 17:38:50,196 INFO: 68.87.97.254 - - [01/May/2014:17:38:50] "PUT /v1/images/511136ea3c5a64f264b78b5433614aec563103b4d4702f3ba7d4d2698e22c158/json HTTP/1.1" 409 33 "-" "docker/0.10.0 go/go1.2.1 git-commit/dc9c28f kernel/3.13.3-tinycore64 os/linux arch/amd64"
2014-05-01 17:38:50,433 DEBUG: check_session: Session is empty
2014-05-01 17:38:55,825 DEBUG: REQ: curl -i http://swiftds:8080/swift/v1/docker-registry-retry/registry/images/7064731afe90d78da2c117d64a1221c826234cd7145fd330ae7e207ff5606980/_inprogress -X GET -H "X-Auth-Token: 1261bdf4f23b4f25bb37ef2a5ef5f476"

2014-05-01 17:38:55,825 DEBUG: RESP STATUS: 200

2014-05-01 17:38:55,826 DEBUG: api_error: Image is being uploaded, retry later
68.87.97.254 - - [01/May/2014:17:38:55] "GET /v1/images/7064731afe90d78da2c117d64a1221c826234cd7145fd330ae7e207ff5606980/json HTTP/1.1" 400 49 "-" "docker/0.10.0 go/go1.2.1 git-commit/dc9c28f kernel/3.13.3-tinycore64 os/linux arch/amd64"
2014-05-01 17:38:55,827 INFO: 68.87.97.254 - - [01/May/2014:17:38:55] "GET /v1/images/7064731afe90d78da2c117d64a1221c826234cd7145fd330ae7e207ff5606980/json HTTP/1.1" 400 49 "-" "docker/0.10.0 go/go1.2.1 git-commit/dc9c28f kernel/3.13.3-tinycore64 os/linux arch/amd64"
2014-05-01 17:38:56,277 DEBUG: check_session: Session is empty
REQ: curl -i https://keystone:5000/v2.0/tokens -X POST -H "Content-Type: application/json" -H "User-Agent: python-keystoneclient"
2014-05-01 17:38:56,325 DEBUG: REQ: curl -i https://keystone:5000/v2.0/tokens -X POST -H "Content-Type: application/json" -H "User-Agent: python-keystoneclient"
REQ BODY: {"auth": {"tenantName": "tenant", "passwordCredentials": {"username": "username", "password": ""}}}

2014-05-01 17:38:56,325 DEBUG: REQ BODY: {"auth": {"tenantName": "tenant", "passwordCredentials": {"username": "username", "password": ""}}}

Starting new HTTPS connection (1): keystone
2014-05-01 17:38:56,331 INFO: Starting new HTTPS connection (1): keystone
"POST /v2.0/tokens HTTP/1.1" 200 10955
2014-05-01 17:38:56,792 DEBUG: "POST /v2.0/tokens HTTP/1.1" 200 10955
RESP: [200] {'content-length': '10955', 'date': 'Thu, 01 May 2014 17:35:15 GMT', 'content-type': 'application/json', 'vary': 'X-Auth-Token', 'connection': 'close', 'server': 'Apache/2.2.22 (Ubuntu)'}
RESP BODY: ... truncated ... 

2014-05-01 17:38:56,805 DEBUG: RESP: [200] {'content-length': '10955', 'date': 'Thu, 01 May 2014 17:35:15 GMT', 'content-type': 'application/json', 'vary': 'X-Auth-Token', 'connection': 'close', 'server': 'Apache/2.2.22 (Ubuntu)'}
RESP BODY: ... truncated ... 

2014-05-01 17:38:56,807 DEBUG: Parsed 2014-05-02T17:35:15Z into {'tz_sign': None, 'second_fraction': None, 'hour': u'17', 'daydash': u'02', 'tz_hour': None, 'month': None, 'timezone': u'Z', 'second': u'15', 'tz_minute': None, 'year': u'2014', 'separator': u'T', 'monthdash': u'05', 'day': None, 'minute': u'35'} with default timezone <iso8601.iso8601.Utc object at 0x2425b50>
2014-05-01 17:38:56,807 DEBUG: Got u'2014' for 'year' with default None
2014-05-01 17:38:56,807 DEBUG: Got u'05' for 'monthdash' with default 1
2014-05-01 17:38:56,808 DEBUG: Got 5 for 'month' with default 5
2014-05-01 17:38:56,808 DEBUG: Got u'02' for 'daydash' with default 1
2014-05-01 17:38:56,808 DEBUG: Got 2 for 'day' with default 2
2014-05-01 17:38:56,808 DEBUG: Got u'17' for 'hour' with default None
2014-05-01 17:38:56,808 DEBUG: Got u'35' for 'minute' with default None
2014-05-01 17:38:56,808 DEBUG: Got u'15' for 'second' with default None
2014-05-01 17:38:57,218 DEBUG: REQ: curl -i http://swiftds:8080/swift/v1/docker-registry-retry/registry/images/7064731afe90d78da2c117d64a1221c826234cd7145fd330ae7e207ff5606980/_checksum DELETE -H "X-Auth-Token: ceda671b4ade4ae49712f9873d48ef05"

2014-05-01 17:38:57,219 DEBUG: RESP STATUS: 404

2014-05-01 17:38:57,219 DEBUG: RESP BODY: NoSuchBucket

2014-05-01 17:38:57,219 ERROR: Object DELETE failed: http://swiftds:8080/swift/v1/docker-registry-retry/registry/images/7064731afe90d78da2c117d64a1221c826234cd7145fd330ae7e207ff5606980/_checksum 404 Not Found   NoSuchBucket
Traceback (most recent call last):
  File "/usr/local/lib/python2.7/dist-packages/swiftclient/client.py", line 1110, in _retry
    rv = func(self.url, self.token, *args, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/swiftclient/client.py", line 1017, in delete_object
    http_response_content=body)
ClientException: Object DELETE failed: http://swiftds:8080/swift/v1/docker-registry-retry/registry/images/7064731afe90d78da2c117d64a1221c826234cd7145fd330ae7e207ff5606980/_checksum 404 Not Found   NoSuchBucket
2014-05-01 17:39:02,392 DEBUG: REQ: curl -i http://swiftds:8080/swift/v1/docker-registry-retry/registry/images/511136ea3c5a64f264b78b5433614aec563103b4d4702f3ba7d4d2698e22c158/json -X GET -H "X-Auth-Token: ceda671b4ade4ae49712f9873d48ef05"

2014-05-01 17:39:02,392 DEBUG: RESP STATUS: 200

2014-05-01 17:39:02,805 DEBUG: REQ: curl -i http://swiftds:8080/swift/v1/docker-registry-retry/registry/images/7064731afe90d78da2c117d64a1221c826234cd7145fd330ae7e207ff5606980/json -X GET -H "X-Auth-Token: ceda671b4ade4ae49712f9873d48ef05"

2014-05-01 17:39:02,806 DEBUG: RESP STATUS: 404

2014-05-01 17:39:02,806 DEBUG: RESP BODY: NoSuchKey

2014-05-01 17:39:02,806 ERROR: Object GET failed: http://swiftds:8080/swift/v1/docker-registry-retry/registry/images/7064731afe90d78da2c117d64a1221c826234cd7145fd330ae7e207ff5606980/json 404 Not Found   NoSuchKey
Traceback (most recent call last):
  File "/usr/local/lib/python2.7/dist-packages/swiftclient/client.py", line 1110, in _retry
    rv = func(self.url, self.token, *args, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/swiftclient/client.py", line 758, in get_object
    http_response_content=body)
ClientException: Object GET failed: http://swiftds:8080/swift/v1/docker-registry-retry/registry/images/7064731afe90d78da2c117d64a1221c826234cd7145fd330ae7e207ff5606980/json 404 Not Found   NoSuchKey
2014-05-01 17:39:07,969 DEBUG: REQ: curl -i http://swiftds:8080/swift/v1/docker-registry-retry/registry/images/7064731afe90d78da2c117d64a1221c826234cd7145fd330ae7e207ff5606980/_inprogress -X PUT -H "X-Auth-Token: ceda671b4ade4ae49712f9873d48ef05"

2014-05-01 17:39:07,970 DEBUG: RESP STATUS: 200

2014-05-01 17:39:07,970 DEBUG: RESP BODY:
HTTP/1.1 404 Not Found
Date: Thu, 01 May 2014 17:39:03 GMT
Server: Apache/2.2.22 (Ubuntu)
Accept-Ranges: bytes
Content-Length: 12
Vary: Accept-Encoding
Content-Type: text/plain; charset=utf-8

NoSuchBucket

2014-05-01 17:39:08,151 DEBUG: REQ: curl -i http://swiftds:8080/swift/v1/docker-registry-retry/registry/images/7064731afe90d78da2c117d64a1221c826234cd7145fd330ae7e207ff5606980/json -X PUT -H "X-Auth-Token: ceda671b4ade4ae49712f9873d48ef05"

2014-05-01 17:39:08,152 DEBUG: RESP STATUS: 404

2014-05-01 17:39:08,152 DEBUG: RESP BODY: NoSuchBucket

2014-05-01 17:39:08,152 ERROR: Object PUT failed: http://swiftds:8080/swift/v1/docker-registry-retry/registry/images/7064731afe90d78da2c117d64a1221c826234cd7145fd330ae7e207ff5606980/json 404 Not Found   NoSuchBucket
Traceback (most recent call last):
  File "/usr/local/lib/python2.7/dist-packages/swiftclient/client.py", line 1110, in _retry
    rv = func(self.url, self.token, *args, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/swiftclient/client.py", line 922, in put_object
    http_response_content=body)
ClientException: Object PUT failed: http://swiftds:8080/swift/v1/docker-registry-retry/registry/images/7064731afe90d78da2c117d64a1221c826234cd7145fd330ae7e207ff5606980/json 404 Not Found   NoSuchBucket
2014-05-01 17:39:08,153 ERROR: Exception on /v1/images/7064731afe90d78da2c117d64a1221c826234cd7145fd330ae7e207ff5606980/json [PUT]
Traceback (most recent call last):
  File "/usr/local/lib/python2.7/dist-packages/flask/app.py", line 1687, in wsgi_app
    response = self.full_dispatch_request()
  File "/usr/local/lib/python2.7/dist-packages/flask/app.py", line 1360, in full_dispatch_request
    rv = self.handle_user_exception(e)
  File "/usr/local/lib/python2.7/dist-packages/flask/app.py", line 1358, in full_dispatch_request
    rv = self.dispatch_request()
  File "/usr/local/lib/python2.7/dist-packages/flask/app.py", line 1344, in dispatch_request
    return self.view_functions[rule.endpoint](**req.view_args)
  File "/docker-registry/docker_registry/toolkit.py", line 237, in wrapper
    return f(*args, **kwargs)
  File "/docker-registry/docker_registry/images.py", line 413, in put_image_json
    store.put_content(json_path, flask.request.data)
  File "/docker-registry/docker_registry/storage/swift.py", line 55, in put_content
    raise IOError("Could not put content: {}".format(path))
IOError: Could not put content: registry/images/7064731afe90d78da2c117d64a1221c826234cd7145fd330ae7e207ff5606980/json
2014-05-01 17:39:08,153 ERROR: Exception on /v1/images/7064731afe90d78da2c117d64a1221c826234cd7145fd330ae7e207ff5606980/json [PUT]
Traceback (most recent call last):
  File "/usr/local/lib/python2.7/dist-packages/flask/app.py", line 1687, in wsgi_app
    response = self.full_dispatch_request()
  File "/usr/local/lib/python2.7/dist-packages/flask/app.py", line 1360, in full_dispatch_request
    rv = self.handle_user_exception(e)
  File "/usr/local/lib/python2.7/dist-packages/flask/app.py", line 1358, in full_dispatch_request
    rv = self.dispatch_request()
  File "/usr/local/lib/python2.7/dist-packages/flask/app.py", line 1344, in dispatch_request
    return self.view_functions[rule.endpoint](**req.view_args)
  File "/docker-registry/docker_registry/toolkit.py", line 237, in wrapper
    return f(*args, **kwargs)
  File "/docker-registry/docker_registry/images.py", line 413, in put_image_json
    store.put_content(json_path, flask.request.data)
  File "/docker-registry/docker_registry/storage/swift.py", line 55, in put_content
    raise IOError("Could not put content: {}".format(path))
IOError: Could not put content: registry/images/7064731afe90d78da2c117d64a1221c826234cd7145fd330ae7e207ff5606980/json
68.87.97.254 - - [01/May/2014:17:39:08] "PUT /v1/images/7064731afe90d78da2c117d64a1221c826234cd7145fd330ae7e207ff5606980/json HTTP/1.1" 500 291 "-" "docker/0.10.0 go/go1.2.1 git-commit/dc9c28f kernel/3.13.3-tinycore64 os/linux arch/amd64"
2014-05-01 17:39:08,165 INFO: 68.87.97.254 - - [01/May/2014:17:39:08] "PUT /v1/images/7064731afe90d78da2c117d64a1221c826234cd7145fd330ae7e207ff5606980/json HTTP/1.1" 500 291 "-" "docker/0.10.0 go/go1.2.1 git-commit/dc9c28f kernel/3.13.3-tinycore64 os/linux arch/amd64"
dmp42 commented 10 years ago

@matthughes you are using glance with swift + file system, right?

matthughes commented 10 years ago

I was actually trying to just use the swift option.

https://github.com/dotcloud/docker-registry/blob/master/config/config_sample.yml

# This flavor is for storing images in Openstack Swift
swift: &swift
    storage: swift
    storage_path: _env:STORAGE_PATH:/registry
    # keystone authorization
    swift_authurl: _env:OS_AUTH_URL
    swift_container: _env:OS_CONTAINER
    swift_user: _env:OS_USERNAME
    swift_password: _env:OS_PASSWORD
    swift_tenant_name: _env:OS_TENANT_NAME
    swift_region_name: _env:OS_REGION_NAME
dmp42 commented 10 years ago

@matthughes By any chance, would you be willing to help writing a .travis.yml file that would install and configure swift?

That would let unit tests be run on travis against an actual swift server and would help us reproduce / fix your problem.

That would be there: https://github.com/bacongobbler/docker-registry-driver-swift/blob/master/.travis.yml

If you would need help converting your installation steps into travis lingo, ask me (on irc: channel docker-dev or by mail).

Now, from your logs:

ClientException: Object PUT failed: http://swiftds:8080/swift/v1/docker-registry-retry/registry/images/7064731afe90d78da2c117d64a1221c826234cd7145fd330ae7e207ff5606980/json 404 Not Found NoSuchBucket

Is it possible you have not configured swift container properly?

Thanks!

dmp42 commented 10 years ago

@bacongobbler ping - any idea on this? Looks like it's in your garden :-)

bacongobbler commented 10 years ago

Sounds like you need to create the docker-registry-retry bucket from the log you pointed out. You have to create them beforehand unlike s3, which creates them on the fly.

bacongobbler commented 10 years ago

@matthughes did my above comment solve it for you?

bacongobbler commented 10 years ago

ping @matthughes