From: Masaki Kanno Subject: Re: [PATCH] Fix xm block/network-detach command (take2) Date: Fri, 10 Aug 2007 17:59:19 +0900 Message-ID: <29C7DB2CBD08C6kanno.masaki@jp.fujitsu.com> References: <46BB61A3.7010903@novell.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="Boundary-LemTKSQEr6WSI76O1KD1M" Return-path: In-Reply-To: <46BB61A3.7010903@novell.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: Jim Fehlig Cc: xen-devel@lists.xensource.com, mats@planetcatfish.com List-Id: xen-devel@lists.xenproject.org --Boundary-LemTKSQEr6WSI76O1KD1M Content-Type: text/plain; charset=iso-2022-jp Content-Transfer-Encoding: 7bit Content-Description: Mail message body Hi Jim, Thanks for your tests. >I tested your patch briefly on c/s 15672. >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): >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 Best regards, Kan --Boundary-LemTKSQEr6WSI76O1KD1M Content-Type: application/octet-stream; name="fix_staging_cs15716.patch" Content-Disposition: attachment; filename="fix_staging_cs15716.patch" Content-Transfer-Encoding: base64 ZGlmZiAtciA5NWY5MGYyNGYzYjEgdG9vbHMvcHl0aG9uL3hlbi94ZW5kL1hlbmREb21haW5J bmZvLnB5Ci0tLSBhL3Rvb2xzL3B5dGhvbi94ZW4veGVuZC9YZW5kRG9tYWluSW5mby5weQlU aHUgQXVnIDA5IDE2OjIxOjQxIDIwMDcgKzAxMDAKKysrIGIvdG9vbHMvcHl0aG9uL3hlbi94 ZW5kL1hlbmREb21haW5JbmZvLnB5CUZyaSBBdWcgMTAgMTc6MTI6MDggMjAwNyArMDkwMApA QCAtNjA3LDYgKzYwNyw5IEBAIGNsYXNzIFhlbmREb21haW5JbmZvOgogICAgICAgICAgICAg ICAgICAgICBfLCBkZXZfaW5mbyA9IHN4cHJzW2Rldl0KICAgICAgICAgICAgIGVsc2U6ICAj ICd2YmQnIG9yICd0YXAnCiAgICAgICAgICAgICAgICAgZGV2X2luZm8gPSBzZWxmLmdldERl dmljZUluZm9fdmJkKGRldikKKyAgICAgICAgICAgICAgICAjIFRvIHJlbW92ZSB0aGUgVVVJ RCBvZiB0aGUgZGV2aWNlIGZyb20gcmVmcywKKyAgICAgICAgICAgICAgICAjIGRldmljZUNs YXNzIG11c3QgYmUgYWx3YXlzICd2YmQnLgorICAgICAgICAgICAgICAgIGRldmljZUNsYXNz ID0gJ3ZiZCcKICAgICAgICAgICAgIGlmIGRldl9pbmZvIGlzIE5vbmU6CiAgICAgICAgICAg ICAgICAgcmV0dXJuIHJjCiAK --Boundary-LemTKSQEr6WSI76O1KD1M Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel --Boundary-LemTKSQEr6WSI76O1KD1M--