|
|
|
|
|
|
|
|
|
|
xen-devel
Re: [Xen-devel] [PATCH] Fix xm block/network-detach command (take2)
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
|
|
|
|
|