tmetsch / occi-os

This is a clone and continuation of https://github.com/dizz/nova - it provides a python egg which can be easily deployed in OpenStack and will thereby add the 3rd party OCCI interface to OpenStack. For usage examples, see the OpenStack wiki.
Apache License 2.0
10 stars 23 forks source link

Cannot delete storage link #72

Closed bhagemeier closed 10 years ago

bhagemeier commented 10 years ago

Hi,

after successful creation of a storage link, I am unable to delete it through OCCI. This is what I get in return:

Traceback (most recent call last): File "/usr/lib/python2.7/dist-packages/eventlet/wsgi.py", line 383, in handle_one_response result = self.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/keystoneclient/middleware/auth_token.py", line 450, in call File "/usr/lib/python2.7/dist-packages/webob/dec.py", line 144, in call return resp(environ, start_response) File "/usr/local/lib/python2.7/dist-packages/openstackocci_grizzly-1.0-py2.7.egg/occi_os_api/wsgi.py", line 159, in call registry=self.registry) File "/usr/local/lib/python2.7/dist-packages/occi/wsgi.py", line 232, in _call_occi status, headers, body = handler.handle(mtd, key) File "/usr/local/lib/python2.7/dist-packages/occi/handlers.py", line 69, in handle return getattr(self, str.lower(method))(key) File "/usr/local/lib/python2.7/dist-packages/occi/handlers.py", line 296, in delete workflow.delete_entity(entity, self.registry, self.extras) File "/usr/local/lib/python2.7/dist-packages/occi/workflow.py", line 95, in delete_entity entity.source.links.remove(entity) ValueError: list.remove(x): x not in list

Cheers, Björn

bhagemeier commented 10 years ago

Need to be more precise here:

For the first call of DELETE

curl -v -X DELETE --capath /etc/grid-security/certificates/ -H 'x-auth-token: *****' https://egi-cloud.zam.kfa-juelich.de:8787/storage/link/c772096d-7c9a-4e65-8f4f-35898db0c2c1 -H 'content-type: text/occi'

I get

detach_volume() takes exactly 3 arguments (4 given)

and the server log says

2013-12-20 15:19:45.807 INFO nova.occiapi.wsgi.server [req-99b27508-d63a-4585-b1e6-30d34791020f 9d4e9c6d65664342951d536353c3f3db 2e84348b35d849b7971f6f0e82dd3209] 134.94.168.82,127.0.0.1 "DELETE /storage/link/ff0b726d-e93c-4c3a-a090-bc5a18d97b22 HTTP/1.0" status: 400 len: 225 time: 0.2759449

Subsequent calls give me what I posted originally.

tmetsch commented 10 years ago

Seems like line https://github.com/openstack/nova/blob/stable/grizzly/nova/compute/api.py#L2324 and https://github.com/tmetsch/occi-os/blob/stable/grizzly/occi_os_api/nova_glue/vm.py#L347 don't match in the stable grizzly branch. Most likely because those test did not pass there...

tmetsch commented 10 years ago

Fixed on master.