Unrescue causes 'Device in use' when trying to unplug VBD devices

Bug #851315 reported by Dan Prince
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Fix Released
High
Dan Prince

Bug Description

I get the following exceptions when trying to unrescue an instance in which I have mounted the original image:

(nova.exception): TRACE: File "/usr/lib/pymodules/python2.6/nova/compute/manager.py", line 115, in decorated_function
(nova.exception): TRACE: function(self, context, instance_id, *args, **kwargs)
(nova.exception): TRACE: File "/usr/lib/pymodules/python2.6/nova/compute/manager.py", line 833, in unrescue_instance
(nova.exception): TRACE: self.driver.unrescue(instance_ref, None, network_info)
(nova.exception): TRACE: File "/usr/lib/pymodules/python2.6/nova/virt/xenapi_conn.py", line 251, in unrescue
(nova.exception): TRACE: self._vmops.unrescue(instance, _callback)
(nova.exception): TRACE: File "/usr/lib/pymodules/python2.6/nova/virt/xenapi/vmops.py", line 1006, in unrescue
(nova.exception): TRACE: self._destroy_rescue_instance(rescue_vm_ref)
(nova.exception): TRACE: File "/usr/lib/pymodules/python2.6/nova/virt/xenapi/vmops.py", line 888, in _destroy_rescue_instance
(nova.exception): TRACE: self._destroy_rescue_vbds(rescue_vm_ref)
(nova.exception): TRACE: File "/usr/lib/pymodules/python2.6/nova/virt/xenapi/vmops.py", line 830, in _destroy_rescue_vbds
(nova.exception): TRACE: VMHelper.unplug_vbd(self._session, vbd_ref)
(nova.exception): TRACE: File "/usr/lib/pymodules/python2.6/nova/virt/xenapi/vm_utils.py", line 275, in unplug_vbd
(nova.exception): TRACE: raise StorageError(_('Unable to unplug VBD %s') % vbd_ref)
(nova.exception): TRACE: StorageError: Unable to unplug VBD OpaqueRef:273ad420-f138-0818-8ad5-61bcec1a42c0

---

There really is no need to attempt to hot unplug VBD devices. We should simply shutdown the rescue instance, wait for shutdown to complete, and then destroy the VDI.

Related branches

Dan Prince (dan-prince)
Changed in nova:
status: New → Incomplete
status: Incomplete → In Progress
assignee: nobody → Dan Prince (dan-prince)
importance: Undecided → High
Revision history for this message
Vish Ishaya (vishvananda) wrote :

Dan. Was this ever addressed?

Revision history for this message
Johannes Erdfelt (johannes.erdfelt) wrote :

I'm pretty sure it was taken care of. The rescue process can probably be optimized further, but after fixing bug 950168 I've been able to rescue and unrescue instances without any problems.

Changed in nova:
status: In Progress → Fix Committed
Thierry Carrez (ttx)
Changed in nova:
milestone: none → essex-rc1
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in nova:
milestone: essex-rc1 → 2012.1
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.