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

Re: [Xen-devel] [PATCH] Fix xm block/network-detach command (take2)

To: Masaki Kanno <kanno.masaki@xxxxxxxxxxxxxx>
Subject: Re: [Xen-devel] [PATCH] Fix xm block/network-detach command (take2)
From: Jim Fehlig <jfehlig@xxxxxxxxxx>
Date: Thu, 09 Aug 2007 12:49:07 -0600
Cc: xen-devel@xxxxxxxxxxxxxxxxxxx, mats@xxxxxxxxxxxxxxxxx
Delivery-date: Thu, 09 Aug 2007 11:50:54 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
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/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
References: 27C7DA86EF58C0kanno.masaki@xxxxxxxxxxxxxx
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Thunderbird 1.5.0.8 (X11/20060911)
Masaki Kanno wrote:
> Hi,
>
> I updated the patch for latest xen-unstable. 
>
> Please look at the following for the last patch. 
> http://lists.xensource.com/archives/html/xen-devel/2007-08/msg00043.html
>   
Hi Masaki,

I tested your patch briefly on c/s 15672.

klutina:/usr/lib64/python/xen/xend # xm li
Name ID Mem VCPUs State Time(s)
Domain-0 0 1343 2 r----- 5760.4
sles10 9 512 1 r----- 0.9

klutina:/usr/lib64/python/xen/xend # xm block-list 9
Vdev BE handle state evt-ch ring-ref BE-path
51712 0 0 4 9 522 /local/domain/0/backend/vbd/9/51712

klutina:/usr/lib64/python/xen/xend # xm block-attach 9
tap:aoi:/tests/images/sles10_graphics/disk1 xvdb r

klutina:/usr/lib64/python/xen/xend # xm block-list 9
Vdev BE handle state evt-ch ring-ref BE-path
51712 0 0 4 9 522 /local/domain/0/backend/vbd/9/51712
51728 0 0 3 10 676 /local/domain/0/backend/tap/9/51728

51728 0 0 3 10 676 /local/domain/0/backend/tap/9/51728

klutina:/usr/lib64/python/xen/xend # xm block-detach 9 xvdb
Error: 'tap_refs'
Usage: xm block-detach <Domain> <DevId> [-f|--force]

Destroy a domain's virtual block device.

klutina:/usr/lib64/python/xen/xend # xm block-list 9
Vdev BE handle state evt-ch ring-ref BE-path
51712 0 0 4 9 522 /local/domain/0/backend/vbd/9/51712


The device was unplugged but its config not removed. From xend.log:

File "/usr/lib64/python2.4/xen/xend/XendDomainInfo.py", line 615, in
destroyDevice
self.info['%s_refs' % deviceClass].remove(dev_uuid)
KeyError: 'tap_refs'

I think refs for the various disk types all fall under 'vbd_refs'.

Also, when trying to detach a disk that a pv domU has mounted, I get
this error (after 100 second timeout):

klutina:/usr/lib64/python/xen/xend # xm block-list 10
Vdev BE handle state evt-ch ring-ref BE-path
51712 0 0 4 12 522 /local/domain/0/backend/vbd/10/51712
51728 0 0 4 13 523 /local/domain/0/backend/vbd/10/51728

klutina:/usr/lib64/python/xen/xend # xm block-detach 10 xvdb
(...... wait 100 seconds .......)
Error: Device xvdb not connected
Usage: xm block-detach <Domain> <DevId> [-f|--force]

Destroy a domain's virtual block device.

The behavior is fine (i.e. the disk is still attached and remains in
stored config) but the error message is misleading. xvbd is connected,
its just the front-end won't let go AFAIK.

Regards,
Jim


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel