← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1554631] Fix merged to nova (master)

 

Reviewed:  https://review.openstack.org/290550
Committed: https://git.openstack.org/cgit/openstack/nova/commit/?id=99de5fd3d9d9a53e1c6e9c185201110933db668e
Submitter: Jenkins
Branch:    master

commit 99de5fd3d9d9a53e1c6e9c185201110933db668e
Author: Ryan Rossiter <rlrossit@xxxxxxxxxx>
Date:   Fri Mar 11 21:09:13 2016 +0000

    Translate OverLimit exceptions in Cinder calls
    
    The cinder wrapper on all cinder API calls can check for the cinder
    client returning OverLimit, so it can get correctly translated to
    OverQuota. The OverQuota is different in volumes vs. snapshots, so they
    need to be separated out into the different wrappers. But also, because
    in snapshot creations, we need to catch a NotFound as a VolumeNotFound
    and an OverLimit as an OverQuota for snapshots, we need to make a new
    wrapper that mixes those two together for when we create snapshots.
    
    Change-Id: Ia03f15232df71ca9a31ffbcca60f33949312a686
    Partial-Bug: #1554631


** Changed in: nova
       Status: In Progress => Fix Released

-- 
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):
  Fix Released

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


References