For one thing, the cinder code isn't logging the reason for the failure here:
2015-04-29 07:26:02.815 21775 ERROR cinder.volume.targets.lio [req-fec5ff89-5465-4e76-b573-6a5afc0d4ee2 a9d0160b91f2412d84972a615b7547dc 828348052e494d76a401f669f85829f3 - - -] Failed to delete initiator iqn iqn.1994-05.com.redhat:734fb33285d0 to target.
That's catching a ProcessExecutionError but not logging stdout/stderr information so it's going to be hard to debug.
That raises ISCSITargetDetachFailed which is just wrapped into the generic VolumeBackendAPIException in volume manager terminate_connection which raises it up to the API which returns a 500 in the response, which isn't helpful.
So a few things you have to unwind if you want a more specific error, and that starts with why the detach fails down in cinder.volume.targets.lio, translate that to a specific error, raise that up and eventually get that information out in the cinderclient to raise a more specific error to nova.
But as Jay says, maybe nova should just handle the 500 from cinder and continue.
For one thing, the cinder code isn't logging the reason for the failure here:
2015-04-29 07:26:02.815 21775 ERROR cinder. volume. targets. lio [req-fec5ff89- 5465-4e76- b573-6a5afc0d4e e2 a9d0160b91f2412 d84972a615b7547 dc 828348052e494d7 6a401f669f85829 f3 - - -] Failed to delete initiator iqn iqn.1994- 05.com. redhat: 734fb33285d0 to target.
That's catching a ProcessExecutio nError but not logging stdout/stderr information so it's going to be hard to debug.
That raises ISCSITargetDeta chFailed which is just wrapped into the generic VolumeBackendAP IException in volume manager terminate_ connection which raises it up to the API which returns a 500 in the response, which isn't helpful.
So a few things you have to unwind if you want a more specific error, and that starts with why the detach fails down in cinder. volume. targets. lio, translate that to a specific error, raise that up and eventually get that information out in the cinderclient to raise a more specific error to nova.
But as Jay says, maybe nova should just handle the 500 from cinder and continue.