Libvirt driver reports incorrect error when volume-detach fails
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
OpenStack Compute (nova) |
Fix Released
|
Undecided
|
Dan Smith | ||
Essex |
Fix Released
|
Undecided
|
Aaron Rosen | ||
nova (Ubuntu) |
Fix Released
|
Undecided
|
Unassigned | ||
Precise |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
Libvirt's error path during volume-detach does not properly re-raise exceptions.
Consider the scenario:
1. nova boot ... fooserver
2. nova volume-create 1
3. nova volume-attach fooserver <vol_id> /dev/vdz
4. nova volume-detach fooserver <vol_id>
5. nova volume-attach fooserver <vol_id> /dev/vdz
Step 5 currently fails with the cirrus image because ACPI hotplug is disabled, which means you can't reattach a drive at the same device. Instead of the libvirt error message, we get the dump below, because the original exception is lost during the cleanup phase and the subsequent 'raise' can't do its job.
2012-07-26 06:57:17 ERROR nova.compute.
3bb774fd demo demo] [instance: 2d4c4223-
ttach volume 3759f55c-
2012-07-26 06:57:17 TRACE nova.compute.
1-b305eddddc61] Traceback (most recent call last):
2012-07-26 06:57:17 TRACE nova.compute.
1-b305eddddc61] File "/opt/stack/
attach_volume
2012-07-26 06:57:17 TRACE nova.compute.
1-b305eddddc61] mountpoint)
2012-07-26 06:57:17 TRACE nova.compute.
1-b305eddddc61] File "/opt/stack/
2012-07-26 06:57:17 TRACE nova.compute.
1-b305eddddc61] temp_level, payload)
2012-07-26 06:57:17 TRACE nova.compute.
1-b305eddddc61] File "/usr/lib/
2012-07-26 06:57:17 TRACE nova.compute.
1-b305eddddc61] self.gen.next()
2012-07-26 06:57:17 TRACE nova.compute.
1-b305eddddc61] File "/opt/stack/
2012-07-26 06:57:17 TRACE nova.compute.
2012-07-26 06:57:17 TRACE nova.compute.
2012-07-26 06:57:17 TRACE nova.compute.
2012-07-26 06:57:17 TRACE nova.compute.
2012-07-26 06:57:17 TRACE nova.compute.
Related branches
- Chuck Short: Pending requested
-
Diff: 56 lines (+14/-4)3 files modifieddebian/changelog (+8/-0)
debian/control (+6/-3)
debian/nova-console.install (+0/-1)
Changed in nova: | |
assignee: | nobody → Dan Smith (danms) |
status: | New → In Progress |
Changed in nova: | |
milestone: | none → folsom-3 |
status: | Fix Committed → Fix Released |
Changed in nova (Ubuntu): | |
status: | New → Fix Released |
Changed in nova (Ubuntu Precise): | |
status: | New → Confirmed |
Changed in nova: | |
milestone: | folsom-3 → 2012.2 |
Reviewed: https:/ /review. openstack. org/10283 github. com/openstack/ nova/commit/ 4810269ef648348 bbc7ef9113d4e7f af47b15c55
Committed: http://
Submitter: Jenkins
Branch: master
commit 4810269ef648348 bbc7ef9113d4e7f af47b15c55
Author: Dan Smith <email address hidden>
Date: Wed Jul 25 10:33:16 2012 -0700
Fix exception handling in libvirt attach_volume()
Currently, the real reason for a failure is dropped when attempting ERR_OPERATION_ FAILED) . This change uses save_and_ reraise_ exception( )
to unroll the volume connection (with the exception of when it is
VIR_
to correct that so that the actual reason for failure gets logged.
Fixes bug 1029463
Change-Id: Id47db565c4fb5a 88d1a263600b417 06dd3419726