ooi

ooi fails with error 500 when deleting a volume that is attached

Bug #1624233 reported by Alvaro Lopez
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
ooi
Fix Released
Medium
Alvaro Lopez

Bug Description

An attempt to delete something I don't have permissions or that throws an error will result in HTTP[500] and Nova API message:

    <- "DELETE /occi1.1/storage/981f0067-4179-4420-80e3-b9d2d2b77856 HTTP/1.1\r\nAccept: text/plain,text/occi\r\nUser-Agent: rOCCI-core/4.3.2 rOCCI-api/4.3.5 OCCI/1.1 ruby-x86_64-linux/2.2.4p230\r\nX-Auth-Token: TOKEN_HERE\r\nConnection: close\r\nHost: cloud.ifca.es:8787\r\n\r\n"
    -> "HTTP/1.1 500 Internal Server Error\r\n"
    -> "Date: Thu, 15 Sep 2016 08:55:38 GMT\r\n"
    -> "Content-Type: text/plain; charset=UTF-8\r\n"
    -> "Content-Length: 154\r\n"
    -> "Connection: close\r\n"
    -> "server: ooi/0.1.1 OCCI/1.1\r\n"
    -> "x-compute-request-id: req-7fa9d560-ce96-431e-8c32-6fa4e7bba2ef\r\n"
    -> "\r\n"
    reading 154 bytes...
    -> "Unexpected API Error. Please report this at http://bugs.launchpad.net/nova/ and attach the Nova API log if possible.\n<class 'nova.exception.InvalidInput'>"
    read 154 bytes
    Conn close

ooi shows in the logs the following:

    2016-09-15 10:54:28.712 11539 INFO ooi.wsgi [req-d2df378a-635f-42e0-9f5c-b90c2a8d41a6 7050a82701b04f8d8f61098a07ff0ebc 999f045cb1ff4684a15ebb338af69460 - - -] HTTP exception thrown: The server has either erred or is incapable of performing the requested operation.
 2016-09-15 10:55:11.749 11536 ERROR nova.api.openstack.extensions [req-9cac4bbe-f7ff-4f85-8cfd-1c0d4ce5dfef 7050a82701b04f8d8f61098a07ff0ebc 999f045cb1ff4684a15ebb338af69460 - - -] Unexpected exception in API method
 2016-09-15 10:55:11.749 11536 ERROR nova.api.openstack.extensions Traceback (most recent call last):
 2016-09-15 10:55:11.749 11536 ERROR nova.api.openstack.extensions File "/usr/lib/python2.7/dist-packages/nova/api/openstack/extensions.py", line 478, in wrapped
 2016-09-15 10:55:11.749 11536 ERROR nova.api.openstack.extensions return f(*args, **kwargs)
 2016-09-15 10:55:11.749 11536 ERROR nova.api.openstack.extensions File "/usr/lib/python2.7/dist-packages/nova/api/openstack/compute/volumes.py", line 110, in delete
 2016-09-15 10:55:11.749 11536 ERROR nova.api.openstack.extensions self.volume_api.delete(context, id)
 2016-09-15 10:55:11.749 11536 ERROR nova.api.openstack.extensions File "/usr/lib/python2.7/dist-packages/nova/volume/cinder.py", line 225, in wrapper
 2016-09-15 10:55:11.749 11536 ERROR nova.api.openstack.extensions six.reraise(exc_value, None, exc_trace)
 2016-09-15 10:55:11.749 11536 ERROR nova.api.openstack.extensions File "/usr/lib/python2.7/dist-packages/nova/volume/cinder.py", line 214, in wrapper
 2016-09-15 10:55:11.749 11536 ERROR nova.api.openstack.extensions res = method(self, ctx, volume_id, *args, **kwargs)
 2016-09-15 10:55:11.749 11536 ERROR nova.api.openstack.extensions File "/usr/lib/python2.7/dist-packages/nova/volume/cinder.py", line 418, in delete
 2016-09-15 10:55:11.749 11536 ERROR nova.api.openstack.extensions cinderclient(context).volumes.delete(volume_id)
 2016-09-15 10:55:11.749 11536 ERROR nova.api.openstack.extensions File "/usr/lib/python2.7/dist-packages/cinderclient/v2/volumes.py", line 289, in delete
 2016-09-15 10:55:11.749 11536 ERROR nova.api.openstack.extensions return self._delete("/volumes/%s" % base.getid(volume))
 2016-09-15 10:55:11.749 11536 ERROR nova.api.openstack.extensions File "/usr/lib/python2.7/dist-packages/cinderclient/base.py", line 309, in _delete
 2016-09-15 10:55:11.749 11536 ERROR nova.api.openstack.extensions resp, body = self.api.client.delete(url)
 2016-09-15 10:55:11.749 11536 ERROR nova.api.openstack.extensions File "/usr/lib/python2.7/dist-packages/cinderclient/client.py", line 120, in delete
 2016-09-15 10:55:11.749 11536 ERROR nova.api.openstack.extensions return self._cs_request(url, 'DELETE', **kwargs)
 2016-09-15 10:55:11.749 11536 ERROR nova.api.openstack.extensions File "/usr/lib/python2.7/dist-packages/cinderclient/client.py", line 108, in _cs_request
 2016-09-15 10:55:11.749 11536 ERROR nova.api.openstack.extensions return self.request(url, method, **kwargs)
 2016-09-15 10:55:11.749 11536 ERROR nova.api.openstack.extensions File "/usr/lib/python2.7/dist-packages/cinderclient/client.py", line 101, in request
 2016-09-15 10:55:11.749 11536 ERROR nova.api.openstack.extensions raise exceptions.from_response(resp, body)
 2016-09-15 10:55:11.749 11536 ERROR nova.api.openstack.extensions InvalidInput: Invalid input received: Volume cannot be deleted while in attached state (HTTP 400) (Request-ID: req-1780ad83-67cf-425d-972b-cb5d58cae669)
 2016-09-15 10:55:11.749 11536 ERROR nova.api.openstack.extensions
 2016-09-15 10:55:11.773 11536 INFO nova.api.openstack.wsgi [req-9cac4bbe-f7ff-4f85-8cfd-1c0d4ce5dfef 7050a82701b04f8d8f61098a07ff0ebc 999f045cb1ff4684a15ebb338af69460 - - -] HTTP exception thrown: Unexpected API Error. Please report this at http://bugs.launchpad.net/nova/ and attach the Nova API log if possible.
 <class 'nova.exception.InvalidInput'>
 2016-09-15 10:55:11.775 11536 INFO ooi.wsgi [req-9cac4bbe-f7ff-4f85-8cfd-1c0d4ce5dfef 7050a82701b04f8d8f61098a07ff0ebc 999f045cb1ff4684a15ebb338af69460 - - -] HTTP exception thrown: Unexpected API Error. Please report this at http://bugs.launchpad.net/nova/ and attach the Nova API log if possible.
 <class 'nova.exception.InvalidInput'>

Alvaro Lopez (aloga)
Changed in ooi:
importance: Undecided → Medium
milestone: none → 0.3.2
Revision history for this message
Alvaro Lopez (aloga) wrote :

This is related with this bug in nova https://bugs.launchpad.net/nova/+bug/1625101

The 500 exception is thrown by the nova API, and unfortunately we cannot do anything to show the real message.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to ooi (master)

Fix proposed to branch: master
Review: https://review.openstack.org/372377

Changed in ooi:
assignee: nobody → Alvaro Lopez (aloga)
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to ooi (master)

Reviewed: https://review.openstack.org/372377
Committed: https://git.openstack.org/cgit/openstack/ooi/commit/?id=f9fd5481e3ea87cbaf1fd1216b45e32c4ac113d9
Submitter: Jenkins
Branch: master

commit f9fd5481e3ea87cbaf1fd1216b45e32c4ac113d9
Author: Alvaro Lopez Garcia <email address hidden>
Date: Mon Sep 19 12:24:28 2016 +0200

    Handle 500 errors coming from nova

    We do not want to return the nova error 500 messages to the users but
    rather build our own message, so that a bug is filled to us.

    Change-Id: Iaeae2affdb60f22df64fd1929e3bd8c18ac3e64c
    Closes-bug: #1624233

Changed in ooi:
status: In Progress → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.