Masaki Kanno
2007-Aug-09 13:12 UTC
[Xen-devel] [PATCH] Fix xm block/network-detach command (take2)
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 Signed-off-by: Masaki Kanno <kanno.masaki@jp.fujitsu.com> Best regards, Kan _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Jim Fehlig
2007-Aug-09 18:49 UTC
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@lists.xensource.com http://lists.xensource.com/xen-devel
Masaki Kanno
2007-Aug-10 08:59 UTC
Re: [Xen-devel] [PATCH] Fix xm block/network-detach command (take2)
Hi Jim, Thanks for your tests.>I tested your patch briefly on c/s 15672.<snip>>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''.I tested blktap with the same way as your operation. But I did not encounter the command error as follows. But your thinking is right, so I wrote a small patch to remove the error message. Could you test the patch again? # xm list Name ID Mem VCPUs State Time(s) Domain-0 0 747 2 r----- 89.9 vm1 1 256 1 -b---- 0.7 # xm block-list vm1 Vdev BE handle state evt-ch ring-ref BE-path 769 0 0 4 6 8 /local/domain/0/backend/vbd/1/769 # xm block-attach vm1 tap:aio:/xen/second.img xvdb r # xm block-list vm1 Vdev BE handle state evt-ch ring-ref BE-path 769 0 0 4 6 8 /local/domain/0/backend/vbd/1/769 51728 0 0 4 8 836 /local/domain/0/backend/tap/1/51728 # xm block-detach vm1 xvdb # xm block-list vm1 Vdev BE handle state evt-ch ring-ref BE-path 769 0 0 4 6 8 /local/domain/0/backend/vbd/1/769>Also, when trying to detach a disk that a pv domU has mounted, I get >this error (after 100 second timeout):<snip>>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.I''d like to improve the error message. Could you give me thinking time about 2 weeks? Signed-off-by: Masaki Kanno <kanno.masaki@jp.fujitsu.com> Best regards, Kan _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Jim Fehlig
2007-Aug-10 22:08 UTC
Re: [Xen-devel] [PATCH] Fix xm block/network-detach command (take2)
Masaki Kanno wrote:> Hi Jim, > > Thanks for your tests. > > >> I tested your patch briefly on c/s 15672. >> > <snip> > >> 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''. >> > > I tested blktap with the same way as your operation. But I did not > encounter the command error as follows. > But your thinking is right, so I wrote a small patch to remove the > error message. Could you test the patch again? >Looks good with your additional patch. Thanks. <snip>>> 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. >> > > I''d like to improve the error message. Could you give me thinking > time about 2 weeks? >Sure. I just noticed it while testing but spent no time investigating. Regards, Jim _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Masaki Kanno
2007-Aug-17 08:24 UTC
Re: [Xen-devel] [PATCH] Fix xm block/network-detach command (take2)
Hi Jim, Thanks for your review. Best regards, Kan Fri, 10 Aug 2007 16:08:23 -0600, Jim Fehlig wrote:>Masaki Kanno wrote: >> Hi Jim, >> >> Thanks for your tests. >> >> >>> I tested your patch briefly on c/s 15672. >>> >> <snip> >> >>> 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''. >>> >> >> I tested blktap with the same way as your operation. But I did not >> encounter the command error as follows. >> But your thinking is right, so I wrote a small patch to remove the >> error message. Could you test the patch again? >> > >Looks good with your additional patch. Thanks. > ><snip> >>> 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. >>> >> >> I''d like to improve the error message. Could you give me thinking >> time about 2 weeks? >> > >Sure. I just noticed it while testing but spent no time investigating. > >Regards, >Jim > > >_______________________________________________ >Xen-devel mailing list >Xen-devel@lists.xensource.com >http://lists.xensource.com/xen-devel_______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Masaki Kanno
2007-Aug-17 08:25 UTC
Re: [Xen-devel] [PATCH] Fix xm block/network-detach command (take2)
Hi Keir, I send a patch. It resolves the problem that Jim found. Could you apply it? Signed-off-by: Masaki Kanno <kanno.masaki@jp.fujitsu.com> Best regards, Kan Fri, 10 Aug 2007 17:59:19 +0900, Masaki Kanno wrote:>Hi Jim, > >Thanks for your tests. > >>I tested your patch briefly on c/s 15672. ><snip> >>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''. > >I tested blktap with the same way as your operation. But I did not >encounter the command error as follows. >But your thinking is right, so I wrote a small patch to remove the >error message. Could you test the patch again? > ># xm list >Name ID Mem VCPUs State >Time(s) >Domain-0 0 747 2 r----- >89.9 >vm1 1 256 1 -b---- >0.7 ># xm block-list vm1 >Vdev BE handle state evt-ch ring-ref BE-path >769 0 0 4 6 8 /local/domain/0/backend/vbd/1/769 ># xm block-attach vm1 tap:aio:/xen/second.img xvdb r ># xm block-list vm1 >Vdev BE handle state evt-ch ring-ref BE-path >769 0 0 4 6 8 /local/domain/0/backend/vbd/1/769 >51728 0 0 4 8 836 /local/domain/0/backend/tap/1/51728 ># xm block-detach vm1 xvdb ># xm block-list vm1 >Vdev BE handle state evt-ch ring-ref BE-path >769 0 0 4 6 8 /local/domain/0/backend/vbd/1/769 > > >>Also, when trying to detach a disk that a pv domU has mounted, I get >>this error (after 100 second timeout): ><snip> >>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. > >I''d like to improve the error message. Could you give me thinking >time about 2 weeks? > > >Signed-off-by: Masaki Kanno <kanno.masaki@jp.fujitsu.com> > >Best regards, > Kan > > >-------------------------------text/plain------------------------------- >_______________________________________________ >Xen-devel mailing list >Xen-devel@lists.xensource.com >http://lists.xensource.com/xen-devel_______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel