WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

[Xen-devel] Fix removing /vm/UUID/device paths when device cannot be dis

To: xen-devel@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-devel] Fix removing /vm/UUID/device paths when device cannot be disconnected
From: Jiri Denemark <jdenemar@xxxxxxxxxx>
Date: Wed, 25 Feb 2009 16:39:56 +0100
Delivery-date: Wed, 25 Feb 2009 07:41:05 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Mutt/1.5.18 (2008-05-17)
Hi,

Currently if a device cannot be disconnected (for example, when trying to
xm block-detach a disk which is mounted in domU), its /vm/UUID/device/CLASS/ID
path is still removed. The result is that after a failed detach, the device
cannot be detached even when using force...

An example of bad behavior:

xm create guest
xm block-attach guest tap:aio:/var/lib/xen/images/disk.img xvdb w

# mount /dev/xvdb1 in the guest

Than "xm block-detach guest xvdb" fails with something like
    Error: Device ID (tap) could not be disconnected.

Examining xenstore, one can find both xvdb's backend and frontend are there,
but /vm/UUID/device/tap/ID is not.

Although "xm block-list guest" would still show the xvdb device,
"xm block-detach guest xvdb" would fail with
    Device ID not connected
And it would show it even when --force is used.


I'd suggest to change deviceDestroy behavior to remove /vm/UUID/device/...
path only when force was used (as it already does so for both frontend and
backend) and do the removing from xen-hotplug-cleanup script when we are sure
the device is really not attached to the guest any more.

Attached is a patch which moves unforced removing to cleanup script.

Cheers.


Signed-off-by: Jiri Denemark <jdenemar@xxxxxxxxxx>

Attachment: device_destroy.patch
Description: Text document

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel
<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-devel] Fix removing /vm/UUID/device paths when device cannot be disconnected, Jiri Denemark <=