Docker Community Forums

Share and learn in the Docker community.

Can't delete repositories or tags from private registry: 500 Internal Server Error


(Dankerrigan) #1

Hi, I am unable to delete tags or repositories from my private registry (v1). According to the registry API, I believe that I should be able to delete a tag using a command similar to

curl -X DELETE 'http://registry_host_ip:port/v1/repositories/centos/tags/latest'

However, this result in a 500 Internal Server Error. I am using Docker version 1.6.0 and the registry is hosted on a Red Hat Enterprise Linux Server.

When I look at the registry logs, I see the following:

2015-06-17 15:07:01,090 ERROR: Exception on /v1/repositories/centos/tags/latest [DELETE]
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 306, in wrapper
    return f(namespace=namespace, repository=repository, *args, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/docker_registry/toolkit.py", line 280, in wrapper
    return f(*args, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/docker_registry/tags.py", line 233, in _delete_tag
    delete_tag(namespace=namespace, repository=repository, tag=tag)
  File "/usr/local/lib/python2.7/dist-packages/docker_registry/tags.py", line 214, in delete_tag
    image = store.get_content(path=tag_path)
TypeError: wrapper() got an unexpected keyword argument 'path'

Has anyone dealt with this before?


(Florian Dehn) #2

Same here with Docker 1.7.0, repository running on a Ubuntu server

backend_1  | 172.17.42.1 - - [10/Jul/2015:09:06:05 +0000] "GET /v1/search?q= HTTP/1.0" 200 301 "https://example.com/repositories" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_4) AppleWebKit/600.7.12 (KHTML, like Gecko) Version/8.0.7 Safari/600.7.12"
backend_1  | 2015-07-10 09:06:05,996 ERROR: Exception on /v1/repositories/mytag [DELETE]
backend_1  | Traceback (most recent call last):
backend_1  |   File "/usr/local/lib/python2.7/dist-packages/flask/app.py", line 1817, in wsgi_app
backend_1  |     response = self.full_dispatch_request()
backend_1  |   File "/usr/local/lib/python2.7/dist-packages/flask/app.py", line 1477, in full_dispatch_request
backend_1  |     rv = self.handle_user_exception(e)
backend_1  |   File "/usr/local/lib/python2.7/dist-packages/flask/app.py", line 1381, in handle_user_exception
backend_1  |     reraise(exc_type, exc_value, tb)
backend_1  |   File "/usr/local/lib/python2.7/dist-packages/flask/app.py", line 1475, in full_dispatch_request
backend_1  |     rv = self.dispatch_request()
backend_1  |   File "/usr/local/lib/python2.7/dist-packages/flask/app.py", line 1461, in dispatch_request
backend_1  |     return self.view_functions[rule.endpoint](**req.view_args)
backend_1  |   File "/usr/local/lib/python2.7/dist-packages/docker_registry/toolkit.py", line 306, in wrapper
backend_1  |     return f(namespace=namespace, repository=repository, *args, **kwargs)
backend_1  |   File "/usr/local/lib/python2.7/dist-packages/docker_registry/toolkit.py", line 280, in wrapper
backend_1  |     return f(*args, **kwargs)
backend_1  |   File "/usr/local/lib/python2.7/dist-packages/docker_registry/tags.py", line 262, in delete_repository
backend_1  |     namespace=namespace, repository=repository, tag=tag_name)
backend_1  |   File "/usr/local/lib/python2.7/dist-packages/docker_registry/tags.py", line 214, in delete_tag
backend_1  |     image = store.get_content(path=tag_path)
backend_1  | TypeError: wrapper() got an unexpected keyword argument 'path'
backend_1  | 10/Jul/2015:09:06:05 +0000 ERROR: Exception on /v1/repositories/mytag [DELETE]
backend_1  | Traceback (most recent call last):
backend_1  |   File "/usr/local/lib/python2.7/dist-packages/flask/app.py", line 1817, in wsgi_app
backend_1  |     response = self.full_dispatch_request()
backend_1  |   File "/usr/local/lib/python2.7/dist-packages/flask/app.py", line 1477, in full_dispatch_request
backend_1  |     rv = self.handle_user_exception(e)
backend_1  |   File "/usr/local/lib/python2.7/dist-packages/flask/app.py", line 1381, in handle_user_exception
backend_1  |     reraise(exc_type, exc_value, tb)
backend_1  |   File "/usr/local/lib/python2.7/dist-packages/flask/app.py", line 1475, in full_dispatch_request
backend_1  |     rv = self.dispatch_request()
backend_1  |   File "/usr/local/lib/python2.7/dist-packages/flask/app.py", line 1461, in dispatch_request
backend_1  |     return self.view_functions[rule.endpoint](**req.view_args)
backend_1  |   File "/usr/local/lib/python2.7/dist-packages/docker_registry/toolkit.py", line 306, in wrapper
backend_1  |     return f(namespace=namespace, repository=repository, *args, **kwargs)
backend_1  |   File "/usr/local/lib/python2.7/dist-packages/docker_registry/toolkit.py", line 280, in wrapper
backend_1  |     return f(*args, **kwargs)
backend_1  |   File "/usr/local/lib/python2.7/dist-packages/docker_registry/tags.py", line 262, in delete_repository
backend_1  |     namespace=namespace, repository=repository, tag=tag_name)
backend_1  |   File "/usr/local/lib/python2.7/dist-packages/docker_registry/tags.py", line 214, in delete_tag
backend_1  |     image = store.get_content(path=tag_path)
backend_1  | TypeError: wrapper() got an unexpected keyword argument 'path'