Bug 483180 - disk detachment doesn't clean up Xen state fully, leaving block device unusable
Summary: disk detachment doesn't clean up Xen state fully, leaving block device unusable
Keywords:
Status: CLOSED INSUFFICIENT_DATA
Alias: None
Product: Virtualization Tools
Classification: Community
Component: libvirt
Version: unspecified
Hardware: x86_64
OS: Linux
low
high
Target Milestone: ---
Assignee: Daniel Veillard
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2009-01-30 02:24 UTC by Dmitrii
Modified: 2010-05-26 02:01 UTC (History)
3 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2010-05-26 02:01:06 UTC
Embargoed:


Attachments (Terms of Use)

Description Dmitrii 2009-01-30 02:24:47 UTC
Description of problem:

When detaching a block device from a Xen domain using either 'virsh detach-disk' or, programmatically via virDomainDetachDevice(), the block device is left in a "busy" state and cannot be used from then on, by virsh or anyone else, until the domain is terminated. The detach operation achieves partial success, though, as the device does indeed disappear inside the guest domain.  On the same system, using the same domain and the same block device, xm block-attach and block-detach work flawlessly.

Version-Release number of selected component (if applicable):

libvirt / virsh 0.5.1 (problem also seen in 0.4.6)
on 2.6.26-1-xen-amd64

How reproducible:

consistently

Steps to Reproduce:

# losetup /dev/loop1 /path/to/partition.image
# virsh attach-disk instance-name /dev/loop1 hda1
Disk attached successfully
# virsh detach-disk instance-name hda1
Disk detached successfully
# virsh attach-disk instance-name /dev/loop1 hda1
libvir: Xen Daemon error : POST operation failed: xend_post: error from xen daemon: (xend.err 'Invalid Configuration: The file "/dev/loop1" is already used')

Comment 1 Cole Robinson 2010-05-26 02:01:06 UTC
The reported libvirt version is very old now (as well as this bug). If you can reproduce with a newer libvirt and xen version, please report that info here, along with your host distro, and we can reopen this bug. Closing.


Note You need to log in before you can comment on or make changes to this bug.