Public bug reported: When the nova volume API makes calls into the Cinder API using cinderclient, if cinder raises an exception like Forbidden or OverLimit, the nova volume api does not catch these exceptions. So they go up to the nova rest api, resulting in a 500 to be returned.
Here's an example from a tempest test: Traceback (most recent call last): File "/home/ubuntu/tempest/tempest/api/compute/volumes/test_volumes_get.py", line 51, in test_volume_create_get_delete metadata=metadata)['volume'] File "/home/ubuntu/tempest/tempest/lib/services/compute/volumes_client.py", line 55, in create_volume resp, body = self.post('os-volumes', post_body) File "/home/ubuntu/tempest/tempest/lib/common/rest_client.py", line 259, in post return self.request('POST', url, extra_headers, headers, body) File "/home/ubuntu/tempest/tempest/lib/common/rest_client.py", line 642, in request resp, resp_body) File "/home/ubuntu/tempest/tempest/lib/common/rest_client.py", line 761, in _error_checker message=message) tempest.lib.exceptions.ServerFault: Got server fault Details: Unexpected API Error. Please report this at http://bugs.launchpad.net/nova/ and attach the Nova API log if possible. <class 'cinderclient.exceptions.Forbidden'> The volume API needs to wrap these exceptions and return the nova equivalent to the rest API so the appropriate return code can be returned. ** Affects: nova Importance: Undecided Assignee: Ryan Rossiter (rlrossit) Status: New ** Changed in: nova Assignee: (unassigned) => Ryan Rossiter (rlrossit) -- You received this bug notification because you are a member of Yahoo! Engineering Team, which is subscribed to OpenStack Compute (nova). https://bugs.launchpad.net/bugs/1554631 Title: Cinder exceptions returned from nova rest api as 500 errors Status in OpenStack Compute (nova): New Bug description: When the nova volume API makes calls into the Cinder API using cinderclient, if cinder raises an exception like Forbidden or OverLimit, the nova volume api does not catch these exceptions. So they go up to the nova rest api, resulting in a 500 to be returned. Here's an example from a tempest test: Traceback (most recent call last): File "/home/ubuntu/tempest/tempest/api/compute/volumes/test_volumes_get.py", line 51, in test_volume_create_get_delete metadata=metadata)['volume'] File "/home/ubuntu/tempest/tempest/lib/services/compute/volumes_client.py", line 55, in create_volume resp, body = self.post('os-volumes', post_body) File "/home/ubuntu/tempest/tempest/lib/common/rest_client.py", line 259, in post return self.request('POST', url, extra_headers, headers, body) File "/home/ubuntu/tempest/tempest/lib/common/rest_client.py", line 642, in request resp, resp_body) File "/home/ubuntu/tempest/tempest/lib/common/rest_client.py", line 761, in _error_checker message=message) tempest.lib.exceptions.ServerFault: Got server fault Details: Unexpected API Error. Please report this at http://bugs.launchpad.net/nova/ and attach the Nova API log if possible. <class 'cinderclient.exceptions.Forbidden'> The volume API needs to wrap these exceptions and return the nova equivalent to the rest API so the appropriate return code can be returned. To manage notifications about this bug go to: https://bugs.launchpad.net/nova/+bug/1554631/+subscriptions -- Mailing list: https://launchpad.net/~yahoo-eng-team Post to : yahoo-eng-team@lists.launchpad.net Unsubscribe : https://launchpad.net/~yahoo-eng-team More help : https://help.launchpad.net/ListHelp