rpms/libvirt/devel libvirt-0.7.0-numa-ignore-fail.patch, NONE, 1.1 libvirt.spec, 1.167, 1.168

Daniel P. Berrange berrange at fedoraproject.org
Thu Aug 13 15:30:20 UTC 2009


Author: berrange

Update of /cvs/pkgs/rpms/libvirt/devel
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv23557

Modified Files:
	libvirt.spec 
Added Files:
	libvirt-0.7.0-numa-ignore-fail.patch 
Log Message:
Log and ignore NUMA topology problems (rhbz #506590)

libvirt-0.7.0-numa-ignore-fail.patch:
 capabilities.c |    1 +
 lxc_conf.c     |   12 ++++++++++--
 uml_conf.c     |   11 +++++++++--
 3 files changed, 20 insertions(+), 4 deletions(-)

--- NEW FILE libvirt-0.7.0-numa-ignore-fail.patch ---
commit 19bac57b26c2d46ac8a7601158f210f34acdceac
Author: Daniel P. Berrange <berrange at redhat.com>
Date:   Thu Aug 13 11:56:31 2009 +0100

    Make LXC / UML drivers robust against NUMA topology brokenness
    
    Some kernel versions expose broken NUMA topology for some machines.
    This causes the LXC/UML drivers to fail to start. QEMU driver was
    already fixed for this problem
    
    * src/lxc_conf.c: Log and ignore failure to populate NUMA info
    * src/uml_conf.c: Log and ignore failure to populate NUMA info
    * src/capabilities.c: Reset nnumaCell to 0 after freeing

diff --git a/src/capabilities.c b/src/capabilities.c
index c6766b6..193a9fe 100644
--- a/src/capabilities.c
+++ b/src/capabilities.c
@@ -139,6 +139,7 @@ virCapabilitiesFreeNUMAInfo(virCapsPtr caps)
     for (i = 0 ; i < caps->host.nnumaCell ; i++)
         virCapabilitiesFreeHostNUMACell(caps->host.numaCell[i]);
     VIR_FREE(caps->host.numaCell);
+    caps->host.nnumaCell = 0;
 }
 
 /**
diff --git a/src/lxc_conf.c b/src/lxc_conf.c
index d06a024..fef60ba 100644
--- a/src/lxc_conf.c
+++ b/src/lxc_conf.c
@@ -30,6 +30,8 @@
 #include "lxc_conf.h"
 #include "nodeinfo.h"
 #include "virterror_internal.h"
+#include "logging.h"
+
 
 #define VIR_FROM_THIS VIR_FROM_LXC
 
@@ -46,8 +48,14 @@ virCapsPtr lxcCapsInit(void)
                                    0, 0)) == NULL)
         goto no_memory;
 
-    if (nodeCapsInitNUMA(caps) < 0)
-        goto no_memory;
+    /* Some machines have problematic NUMA toplogy causing
+     * unexpected failures. We don't want to break the QEMU
+     * driver in this scenario, so log errors & carry on
+     */
+    if (nodeCapsInitNUMA(caps) < 0) {
+        virCapabilitiesFreeNUMAInfo(caps);
+        VIR_WARN0("Failed to query host NUMA topology, disabling NUMA capabilities");
+    }
 
     /* XXX shouldn't 'borrow' KVM's prefix */
     virCapabilitiesSetMacPrefix(caps, (unsigned char []){ 0x52, 0x54, 0x00 });
diff --git a/src/uml_conf.c b/src/uml_conf.c
index 48e05a8..4f756d4 100644
--- a/src/uml_conf.c
+++ b/src/uml_conf.c
@@ -45,6 +45,7 @@
 #include "nodeinfo.h"
 #include "verify.h"
 #include "bridge.h"
+#include "logging.h"
 
 #define VIR_FROM_THIS VIR_FROM_UML
 
@@ -63,8 +64,14 @@ virCapsPtr umlCapsInit(void) {
                                    0, 0)) == NULL)
         goto no_memory;
 
-    if (nodeCapsInitNUMA(caps) < 0)
-        goto no_memory;
+    /* Some machines have problematic NUMA toplogy causing
+     * unexpected failures. We don't want to break the QEMU
+     * driver in this scenario, so log errors & carry on
+     */
+    if (nodeCapsInitNUMA(caps) < 0) {
+        virCapabilitiesFreeNUMAInfo(caps);
+        VIR_WARN0("Failed to query host NUMA topology, disabling NUMA capabilities");
+    }
 
     if ((guest = virCapabilitiesAddGuest(caps,
                                          "uml",


Index: libvirt.spec
===================================================================
RCS file: /cvs/pkgs/rpms/libvirt/devel/libvirt.spec,v
retrieving revision 1.167
retrieving revision 1.168
diff -u -p -r1.167 -r1.168
--- libvirt.spec	13 Aug 2009 15:27:42 -0000	1.167
+++ libvirt.spec	13 Aug 2009 15:30:19 -0000	1.168
@@ -93,6 +93,9 @@ Patch02: libvirt-0.7.0-handle-kernels-wi
 # NB remove autoreconf hack & extra BRs when this goes away
 Patch03: libvirt-0.7.0-policy-kit-rewrite.patch
 
+# Log and ignore NUMA topology problems (rhbz #506590)
+Patch04: libvirt-0.7.0-numa-ignore-fail.patch
+
 # Temporary hack till PulseAudio autostart problems are sorted
 # out when SELinux enforcing (bz 486112)
 Patch200: libvirt-0.6.4-svirt-sound.patch
@@ -277,6 +280,7 @@ of recent versions of Linux (and other O
 %patch01 -p1
 %patch02 -p1
 %patch03 -p1
+%patch04 -p1
 
 %patch200 -p0
 
@@ -645,8 +649,9 @@ fi
 %endif
 
 %changelog
-* Thu Aug 13 2009  <berrange at dhcp-0-233.camlab.fab.redhat.com> - 0.7.0-4
+* Thu Aug 13 2009 Daniel P. Berrange <berrange at redhat.com> - 0.7.0-4
 - Rewrite policykit support (rhbz #499970)
+- Log and ignore NUMA topology problems (rhbz #506590)
 
 * Mon Aug 10 2009 Mark McLoughlin <markmc at redhat.com> - 0.7.0-3
 - Don't fail to start network if ipv6 modules is not loaded (#516497)




More information about the scm-commits mailing list