PATCH: Disable xm_internal.c on newer XenD

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

 



The xm_internal.c driver (that processes /etc/xen config files) is only ever
intended to be used on XenD <= 3.0.3  There are impls of all the methods in
xend_internal.c that take priority on newer XenD, since the xend driver is
before it in the stack. The only flaw is that upon failure of one of the
xend method libvirt will carry on & invoke the xm_internal driver method.
The attached patch addresses this by completely disabling the xm_internal
driver on XenD >= 3.0.4

Dan.
-- 
|=- Red Hat, Engineering, Emerging Technologies, Boston.  +1 978 392 2496 -=|
|=-           Perl modules: http://search.cpan.org/~danberr/              -=|
|=-               Projects: http://freshmeat.net/~danielpb/               -=|
|=-  GnuPG: 7D3B9505   F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505  -=| 
Index: xen_unified.c
===================================================================
RCS file: /data/cvs/libvirt/src/xen_unified.c,v
retrieving revision 1.6
diff -u -p -r1.6 xen_unified.c
--- xen_unified.c	30 Apr 2007 16:57:15 -0000	1.6
+++ xen_unified.c	1 May 2007 12:29:22 -0000
@@ -111,6 +111,11 @@ xenUnifiedOpen (virConnectPtr conn, cons
     for (i = 0; i < XEN_UNIFIED_NR_DRIVERS; ++i) {
         priv->opened[i] = 0;
 
+        /* Only use XM driver for Xen <= 3.0.3 (ie xendConfigVersion <= 2) */
+        if (drivers[i] == &xenXMDriver &&
+            priv->xendConfigVersion > 2)
+            continue;
+
         /* Ignore proxy for root */
         if (i == proxy_offset && getuid() == 0)
             continue;

[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]