Nova raise a confusing error when attaching a volume fail
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
OpenStack Compute (nova) |
Confirmed
|
Low
|
Unassigned |
Bug Description
Here is my story:
While i was trying to create a new volume driver for a new network file system, i stumble upon this error each time i try to attach a volume to my instance, DeviceIsBusy("The supplied device (/dev/vdc) is busy.") and while this error was suggeting me to try to use another device /dev/vdc, /dev/vdb and so on, but still all devices was raising the same error, and so to understand more about how and why this error is raised, i took a pick on the relevant part of the code that handle volume attachement, which is this:
def attach_volume(self, connection_info, instance, mountpoint):
....
try:
...
except Exception, ex:
if isinstance(ex, libvirt.
As everyone can see, the code above basically catch all operation error that libvirt can raise and assume that all of them are the source of a device being busy which is not correct at all.
And as i understood from the git blame, this part of code was added to fix the bug https:/
So my suggestion is to raise a more general Exception by setting the error message to the same as libvirt.
Messages will be:
- For bug #914974: operation failed: target vdb already exists
- For me it's : operation failed: open disk image file failed
If this is a concern for anyone i would like to supply a patch to fix this.
Cheers,
Changed in nova: | |
assignee: | nobody → mouadino (mouadino) |
Changed in nova: | |
status: | In Progress → New |
assignee: | mouadino (mouadino) → nobody |
tags: | added: libvirt |
Changed in nova: | |
importance: | Undecided → Low |
status: | New → Confirmed |
Changed in nova: | |
assignee: | nobody → Shweta Patil (89shweta) |
Changed in nova: | |
assignee: | Shweta Patil (89shweta) → tcs_openstack_group (tcs-openstack-group) |
assignee: | tcs_openstack_group (tcs-openstack-group) → Abhishek Talwar (abhishek-talwar) |
Changed in nova: | |
assignee: | Abhishek Talwar (abhishek-talwar) → nobody |
Changed in nova: | |
assignee: | nobody → Sailaja (sailajap) |
Changed in nova: | |
status: | Confirmed → In Progress |
Changed in nova: | |
assignee: | nobody → Sivasathurappan Radhakrishnan (siva-radhakrishnan) |
Changed in nova: | |
assignee: | nobody → Maurice Wei (mauricewei) |
Changed in nova: | |
assignee: | Maurice Wei (mauricewei) → nobody |
Fix proposed to branch: master /review. openstack. org/26758
Review: https:/