Comment 6 for bug 1077045

Revision history for this message
Stephen Street (stephen-redrocketcomputing) wrote :

I'm very new to openstack and ceph (first installation) and I'm seeing a simlar error. The output from

glance --debug image-delete d938b672-af7c-4950-ad24-2a571f66bc4e
curl -i -X DELETE -H 'X-Auth-Token: 48e7b767956c4c6aaa11c2f9b42e3e12' -H 'Content-Type: application/octet-stream' -H 'User-Agent: python-glanceclient' http://192.168.137.69:9292/v1/images/d938b672-af7c-4950-ad24-2a571f66bc4e

HTTP/1.1 500 Internal Server Error
date: Fri, 08 Feb 2013 18:11:38 GMT
content-length: 3537
content-type: text/plain
connection: close

Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/eventlet/wsgi.py", line 382, in handle_one_response
    result = self.application(self.environ, start_response)
  File "/usr/lib/python2.7/dist-packages/webob/dec.py", line 147, in __call__
    resp = self.call_func(req, *args, **self.kwargs)
  File "/usr/lib/python2.7/dist-packages/webob/dec.py", line 210, in call_func
    return self.func(req, *args, **kwargs)
  File "/usr/lib/python2.7/dist-packages/glance/common/wsgi.py", line 326, in __call__
    response = req.get_response(self.application)
  File "/usr/lib/python2.7/dist-packages/webob/request.py", line 1086, in get_response
    application, catch_exc_info=False)
  File "/usr/lib/python2.7/dist-packages/webob/request.py", line 1055, in call_application
    app_iter = application(self.environ, start_response)
  File "/usr/lib/python2.7/dist-packages/keystone/middleware/auth_token.py", line 278, in __call__
    return self.app(env, start_response)
  File "/usr/lib/python2.7/dist-packages/webob/dec.py", line 147, in __call__
    resp = self.call_func(req, *args, **self.kwargs)
  File "/usr/lib/python2.7/dist-packages/webob/dec.py", line 210, in call_func
    return self.func(req, *args, **kwargs)
  File "/usr/lib/python2.7/dist-packages/glance/common/wsgi.py", line 326, in __call__
    response = req.get_response(self.application)
  File "/usr/lib/python2.7/dist-packages/webob/request.py", line 1086, in get_response
    application, catch_exc_info=False)
  File "/usr/lib/python2.7/dist-packages/webob/request.py", line 1055, in call_application
    app_iter = application(self.environ, start_response)
  File "/usr/lib/python2.7/dist-packages/paste/urlmap.py", line 203, in __call__
    return app(environ, start_response)
  File "/usr/lib/python2.7/dist-packages/webob/dec.py", line 159, in __call__
    return resp(environ, start_response)
  File "/usr/lib/python2.7/dist-packages/routes/middleware.py", line 131, in __call__
    response = self.app(environ, start_response)
  File "/usr/lib/python2.7/dist-packages/webob/dec.py", line 159, in __call__
    return resp(environ, start_response)
  File "/usr/lib/python2.7/dist-packages/webob/dec.py", line 147, in __call__
    resp = self.call_func(req, *args, **self.kwargs)
  File "/usr/lib/python2.7/dist-packages/webob/dec.py", line 210, in call_func
    return self.func(req, *args, **kwargs)
  File "/usr/lib/python2.7/dist-packages/glance/common/wsgi.py", line 532, in __call__
    request, **action_args)
  File "/usr/lib/python2.7/dist-packages/glance/common/wsgi.py", line 549, in dispatch
    return method(*args, **kwargs)
  File "/usr/lib/python2.7/dist-packages/glance/common/utils.py", line 425, in wrapped
    return func(self, req, *args, **kwargs)
  File "/usr/lib/python2.7/dist-packages/glance/api/v1/images.py", line 859, in delete
    req.context, id)
  File "/usr/lib/python2.7/dist-packages/glance/store/__init__.py", line 259, in safe_delete_from_backend
    return delete_from_backend(context, uri, **kwargs)
  File "/usr/lib/python2.7/dist-packages/glance/store/__init__.py", line 239, in delete_from_backend
    return store.delete(loc)
  File "/usr/lib/python2.7/dist-packages/glance/store/rbd.py", line 279, in delete
    image.unprotect_snap(loc.snapshot)
  File "/usr/lib/python2.7/dist-packages/rbd.py", line 573, in unprotect_snap
    raise make_ex(ret, 'error unprotecting snapshot %s@%s' % (self.name, name))
PermissionError: error unprotecting snapshot d938b672-af7c-4950-ad24-2a571f66bc4e@snap

Request returned failure status.
None
HTTPInternalServerError (HTTP 500)

My ceph installation is using cephx authentication with the following permissions:

client.admin
 key: AQD2nRFR8Nb9MBAAWSPtisqdHTnjzOxFuAD6ew==
 caps: [mds] allow
 caps: [mon] allow *
 caps: [osd] allow *
client.images
 key: AQC/PhVReJJtBRAA6fidS3oAsYisR0LCmbX0Iw==
 caps: [mon] allow r
 caps: [osd] allow class-read object_prefix rbd_children, allow rwx pool=images
client.volumes
 key: AQCtPhVRQAs3KBAA/TOsmXKLO07wd3Nzz8lK8g==
 caps: [mon] allow r
 caps: [osd] allow class-read object_prefix rbd_children, allow rwx pool=volumes, allow rx pool=images

as created from http://ceph.com/docs/master/rbd/rbd-openstack/

If I disable cephx authentication everything works.

Let know me know how I can help to resolve this problem.