]> review.fuel-infra Code Review - openstack-build/cinder-build.git/commit
Cinder os-force_detach api returns 500
authorPranaliDeore <pranali11.deore@nttdata.com>
Wed, 29 Apr 2015 12:31:04 +0000 (05:31 -0700)
committerPranaliDeore <pranali11.deore@nttdata.com>
Wed, 13 May 2015 11:28:27 +0000 (04:28 -0700)
commitc917f21994b9b80abf42823fc24d1c131ea12de4
treed21a2b6936576aae0fc57996c5a8693b571ec728
parenteebe5a5d322ae737f923ed84daef159fcd2ed0da
Cinder os-force_detach api returns 500

If invalid 'attachment_id' is passed to the os-force_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.

Closes-Bug: 1450431
Change-Id: I5e308d9f4b3772284caaedb3d2d0b3f7d25e1e5d
cinder/api/contrib/admin_actions.py
cinder/tests/unit/api/contrib/test_admin_actions.py