Bug 476093

Summary: detaching block devices malfunction if the device is in use by the guest.
Product: Red Hat Enterprise Linux 5 Reporter: Gurhan Ozen <gozen>
Component: xenAssignee: Michal Novotny <minovotn>
Status: CLOSED DUPLICATE QA Contact: Virtualization Bugs <virt-bugs>
Severity: high Docs Contact:
Priority: high    
Version: 5.3CC: areis, jburke, syeghiay, xen-maint
Target Milestone: rc   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2009-03-05 12:35:33 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Gurhan Ozen 2008-12-11 21:39:32 UTC
Description of problem:
 
When detaching a device from a guest when the device is in use by the guest, xen detaches it nonetheless and removes it from the guest domain's info even though the device lives on the guest causing the subsequent block attach/detach commands to be in disarray.



Version-Release number of selected component (if applicable):
# rpm -qa | grep xen 
xen-devel-3.0.3-79.el5
xen-devel-3.0.3-79.el5
kernel-xen-2.6.18-126.el5
xen-libs-3.0.3-79.el5
xen-debuginfo-3.0.3-79.el5
xen-3.0.3-79.el5
xen-debuginfo-3.0.3-79.el5
kernel-xen-devel-2.6.18-126.el5
xen-libs-3.0.3-79.el5


How reproducible:
Very

Steps to Reproduce:
1. Install a guest, attach a device.
2. Go to the guest and format and mount the device
3. In dom0 detach the device. Both xm and virsh detaching operations return ok and the device is removed from the guest's disk list.
4. Go back to guest and do /proc/partitions
  
Actual results:
dom0 thinks that the device is detached from the guest and removes the device from the guest configuration even though the device is there in the guest.

Expected results:
detach operations should return error if the device is in use by the guest.

Additional info:

Comment 2 Michal Novotny 2009-03-05 12:35:33 UTC
Well, returning error when xend is unable to detach the device is not possible but except showing this error message it works fine with patch for BZ #484110.

*** This bug has been marked as a duplicate of bug 484110 ***