[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-changelog] [xen-unstable] [XEND] Fix pygrub when run server-side on a domain with blktap disks.



# HG changeset patch
# User kfraser@xxxxxxxxxxxxxxxxxxxxx
# Node ID bf0deb09facd847db87ab59ed377db6eb0f5a3ad
# Parent  b3cba293e61aae7594908dcd4b848022ceeeaf53
[XEND] Fix pygrub when run server-side on a domain with blktap disks.

For some slightly-crazy reason the blktap patches changed the name
of the SEXPR block containing the disk definition 'vbd' to 'tap', even
though merely changing the 'uname' fragement was sufficient. eg

 (vbd (backend 0) (dev hda:disk) (uname file:/xen/rhel4x86_64.img)
 (mode w) )

changes to

 (tap (backend 0) (dev hda:disk) (uname tap:aio:/xen/rhel4x86_64.img)
 (mode w) )

If you create a domain with xm, then xm runs pygrub client side which
works fine. If you create a domain by feeding a block of SEXPR to Xend
over its network port, then pygrub is run server side. The code in
XenD which decides which disk to run pygrub against only looks for
'device/vbd' in the SEXPR so fails to see any blktap disks.

Signed-off-by: Daniel P. Berrange <berrange@xxxxxxxxxx>
---
 tools/python/xen/xend/XendDomainInfo.py |    2 +-
 1 files changed, 1 insertion(+), 1 deletion(-)

diff -r b3cba293e61a -r bf0deb09facd tools/python/xen/xend/XendDomainInfo.py
--- a/tools/python/xen/xend/XendDomainInfo.py   Thu Oct 05 16:05:12 2006 +0100
+++ b/tools/python/xen/xend/XendDomainInfo.py   Thu Oct 05 16:14:50 2006 +0100
@@ -1745,7 +1745,7 @@ class XendDomainInfo:
         blcfg = None
         # FIXME: this assumes that we want to use the first disk device
         for (n,c) in self.info['device']:
-            if not n or not c or n != "vbd":
+            if not n or not c or not(n in ["vbd", "tap"]):
                 continue
             disk = sxp.child_value(c, "uname")
             if disk is None:

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


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.