Ask Your Question
0

Cannot delete image with Swift backend

asked 2011-04-26 16:06:52 -0500

ethuleau gravatar image

Hi,

I use Glance bzr124 on a ubuntu 10.04 LTS with a backend Swift 1.2.0. I can upload and list files on the object store but when I tried to delete one, I've got this error :

$ glance delete 1

Delete image 1? [y/N] y Traceback (most recent call last): File "/usr/bin/glance", line 605, in <module> result = command(options, args) File "/usr/bin/glance", line 327, in image_delete c.delete_image(image_id) File "/usr/lib/pymodules/python2.6/glance/client.py", line 289, in delete_image self.do_request("DELETE", "/images/%s" % image_id) File "/usr/lib/pymodules/python2.6/glance/client.py", line 161, in do_request raise Exception("Internal Server error: %s" % res.read()) Exception: Internal Server error: Traceback (most recent call last): File "/usr/lib/pymodules/python2.6/eventlet/wsgi.py", line 336, in handle_one_response result = self.application(self.environ, start_response) File "/usr/lib/pymodules/python2.6/webob/dec.py", line 159, in __call__ return resp(environ, start_response) File "/usr/lib/pymodules/python2.6/routes/middleware.py", line 131, in __call__ response = self.app(environ, start_response) File "/usr/lib/pymodules/python2.6/webob/dec.py", line 159, in __call__ return resp(environ, start_response) File "/usr/lib/pymodules/python2.6/webob/dec.py", line 147, in __call__ resp = self.call_func(req, args, self.kwargs) File "/usr/lib/pymodules/python2.6/webob/dec.py", line 208, in call_func return self.func(req, *args, *kwargs) File "/usr/lib/pymodules/python2.6/glance/common/wsgi.py", line 228, in __call__ result = method(arg_dict) File "/usr/lib/pymodules/python2.6/glance/server.py", line 456, in delete delete_from_backend(image['location']) File "/usr/lib/pymodules/python2.6/glance/store/__init__.py", line 94, in delete_from_backend return backend_class.delete(parsed_uri, **kwargs) File "/usr/lib/pymodules/python2.6/glance/store/swift.py", line 180, in delete swift_conn.delete_object(container, obj) File "/usr/lib/pymodules/python2.6/swift/common/client.py", line 839, in delete_object return self._retry(None, delete_object, container, obj) File "/usr/lib/pymodules/python2.6/swift/common/client.py", line 734, in _retry self.url, self.token = self.get_auth() File "/usr/lib/pymodules/python2.6/swift/common/client.py", line 722, in get_auth return get_auth(self.authurl, self.user, self.key, snet=self.snet) File "/usr/lib/pymodules/python2.6/swift/common/client.py", line 177, in get_auth parsed, conn = http_connection(url) File "/usr/lib/pymodules/python2.6/swift/common/client.py", line 153, in http_connection conn = HTTPSConnection(parsed.netloc) File "/usr/lib/python2.6/httplib.py", line 1101, in __init__ HTTPConnection.__init__(self, host, port, strict, timeout) File "/usr/lib/python2.6/httplib.py", line 657, in __init__ self._set_hostport(host, port) File "/usr/lib/python2.6/httplib.py", line 682, in _set_hostport raise InvalidURL("nonnumeric port: '%s'" % host[i+1:]) InvalidURL: nonnumeric port: ''

In the log file of glance (registery + API) :

2011-04-26 18:05:08 DEBUG [routes.middleware] Matched DELETE /images/1 2011-04-26 18:05:08 DEBUG [routes.middleware] Route path: '/images/:(id)', defaults: {'action': u'delete', 'controller': <glance.server ... (more)

edit retag flag offensive close merge delete

5 answers

Sort by » oldest newest most voted
0

answered 2011-08-04 09:10:44 -0500

ethuleau gravatar image

Nice.

edit flag offensive delete link more
0

answered 2011-04-28 07:44:28 -0500

ethuleau gravatar image

My Glance configuration :

[DEFAULT] verbose = True

debug = True

log_config = /etc/glance/logging.cnf log_file = /var/log/glance/glance.log log_dir = /var/log/glance/

[app:glance-api] paste.app_factory = glance.server:app_factory

default_store = swift

bind_host = 0.0.0.0 bind_port = 9292

registry_host = 0.0.0.0 registry_port = 9191

swift_store_auth_address = https://p-hs21-15-swift-proxy-1:11000/v1.0/ (https://p-hs21-15-swift-proxy-1:11000...) swift_store_user = glance:ethuleau swift_store_key = nah2eeBo swift_store_container = glance swift_store_create_container_on_put = True

[app:glance-registry] paste.app_factory = glance.registry.server:app_factory

bind_host = 0.0.0.0 bind_port = 9191

sql_connection=mysql://root:nova@127.0.0.1/glance2 sql_idle_timeout = 3600

edit flag offensive delete link more
0

answered 2011-04-27 16:06:52 -0500

jaypipes gravatar image

Hey again,

Could you paste your glance.conf. Thanks!

jay

edit flag offensive delete link more
0

answered 2011-04-27 14:58:28 -0500

ethuleau gravatar image

Hi Jay,

Thanks for your answer and your future fix.

I have the same error when Nova tries to get an image from Glance repository.

Regards, Édouard.

edit flag offensive delete link more
0

answered 2011-04-27 14:48:35 -0500

jaypipes gravatar image

Hi Edouard!

It looks like our URL parser isn't properly parsing "swift://glance:ethuleau:nah2eeBo@https://p-hs21-15-swift-proxy-1:11000/v1.0//glance/1" and picking up that 11000 is the port.

I'll turn this into a bug and get to fixing it. :)

Cheers! jay

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Get to know Ask OpenStack

Resources for moderators

Question Tools

1 follower

Stats

Asked: 2011-04-26 16:06:52 -0500

Seen: 323 times

Last updated: Aug 04 '11