]> review.fuel-infra Code Review - openstack-build/cinder-build.git/commit
cinder os-detach api returns 500
authorPranaliDeore <pranali11.deore@nttdata.com>
Tue, 28 Apr 2015 12:00:28 +0000 (05:00 -0700)
committerAbhijeet Malawade <Abhijeet.Malawade@nttdata.com>
Thu, 7 May 2015 10:51:08 +0000 (03:51 -0700)
commit716e64a3e9dfc0d1ea29da7d6302eab0ae244bfc
treee10f3c8f69a14b538dbacbde3130a315711aac28
parentdaa751a62e46befed0982c6ce16b26f080040c38
cinder os-detach api returns 500

If invalid 'attachment_id' is passed to the os-detach
api, then it returns 500 error because even though
VolumeAttachmentNotFound exception is raised from manager,
it gets converted to RemoteError due to rpcapi call.

Caught RemoteError exception in the api and returned 400
error to the user if exception type is VolumeAttachmentNotFound
OR InvalidVolume. In other cases 500 error is raised.

Fixed typo in comment of volume manager.

Closes-Bug: 1449870
Change-Id: I92b03e0af3b7ab517e34edaeffd88f0a00516000
cinder/api/contrib/volume_actions.py
cinder/tests/unit/api/contrib/test_volume_actions.py
cinder/volume/manager.py