rpms/libvirt/F-11 libvirt-0.6.2-numa-ignore-fail.patch, NONE, 1.1 libvirt.spec, 1.136, 1.137

Daniel P. Berrange berrange at fedoraproject.org
Thu Aug 13 16:07:23 UTC 2009


Author: berrange

Update of /cvs/pkgs/rpms/libvirt/F-11
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv30818

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

libvirt-0.6.2-numa-ignore-fail.patch:
 capabilities.c       |   16 +++++++++++++---
 capabilities.h       |    3 +++
 libvirt_private.syms |    1 +
 lxc_conf.c           |   11 +++++++++--
 qemu_conf.c          |   10 ++++++++--
 uml_conf.c           |   11 +++++++++--
 6 files changed, 43 insertions(+), 9 deletions(-)

--- NEW FILE libvirt-0.6.2-numa-ignore-fail.patch ---
diff -rup libvirt-0.6.2.orig/src/capabilities.c libvirt-0.6.2.new/src/capabilities.c
--- libvirt-0.6.2.orig/src/capabilities.c	2009-03-24 12:31:01.000000000 +0000
+++ libvirt-0.6.2.new/src/capabilities.c	2009-08-13 12:10:57.000000000 +0100
@@ -122,6 +122,18 @@ virCapabilitiesFreeGuest(virCapsGuestPtr
 }
 
 
+void
+virCapabilitiesFreeNUMAInfo(virCapsPtr caps)
+{
+    int i;
+
+    for (i = 0 ; i < caps->host.nnumaCell ; i++)
+        virCapabilitiesFreeHostNUMACell(caps->host.numaCell[i]);
+    VIR_FREE(caps->host.numaCell);
+    caps->host.nnumaCell = 0;
+}
+
+
 /**
  * virCapabilitiesFree:
  * @caps: object to free
@@ -141,9 +153,7 @@ virCapabilitiesFree(virCapsPtr caps) {
     for (i = 0 ; i < caps->host.nfeatures ; i++)
         VIR_FREE(caps->host.features[i]);
     VIR_FREE(caps->host.features);
-    for (i = 0 ; i < caps->host.nnumaCell ; i++)
-        virCapabilitiesFreeHostNUMACell(caps->host.numaCell[i]);
-    VIR_FREE(caps->host.numaCell);
+    virCapabilitiesFreeNUMAInfo(caps);
 
     for (i = 0 ; i < caps->host.nmigrateTrans ; i++)
         VIR_FREE(caps->host.migrateTrans[i]);
diff -rup libvirt-0.6.2.orig/src/capabilities.h libvirt-0.6.2.new/src/capabilities.h
--- libvirt-0.6.2.orig/src/capabilities.h	2009-03-24 12:31:01.000000000 +0000
+++ libvirt-0.6.2.new/src/capabilities.h	2009-08-13 11:50:46.000000000 +0100
@@ -118,6 +118,9 @@ extern void
 virCapabilitiesFree(virCapsPtr caps);
 
 extern void
+virCapabilitiesFreeNUMAInfo(virCapsPtr caps);
+
+extern void
 virCapabilitiesSetMacPrefix(virCapsPtr caps,
                             unsigned char *prefix);
 
diff -rup libvirt-0.6.2.orig/src/libvirt_private.syms libvirt-0.6.2.new/src/libvirt_private.syms
--- libvirt-0.6.2.orig/src/libvirt_private.syms	2009-04-03 15:04:28.000000000 +0100
+++ libvirt-0.6.2.new/src/libvirt_private.syms	2009-08-13 11:50:59.000000000 +0100
@@ -24,6 +24,7 @@ virCapabilitiesDefaultGuestEmulator;
 virCapabilitiesDefaultGuestMachine;
 virCapabilitiesFormatXML;
 virCapabilitiesFree;
+virCapabilitiesFreeNUMAInfo;
 virCapabilitiesNew;
 virCapabilitiesSetMacPrefix;
 virCapabilitiesGenerateMac;
diff -rup libvirt-0.6.2.orig/src/lxc_conf.c libvirt-0.6.2.new/src/lxc_conf.c
--- libvirt-0.6.2.orig/src/lxc_conf.c	2009-01-31 09:04:17.000000000 +0000
+++ libvirt-0.6.2.new/src/lxc_conf.c	2009-08-13 11:58:41.000000000 +0100
@@ -30,6 +30,7 @@
 #include "lxc_conf.h"
 #include "nodeinfo.h"
 #include "virterror_internal.h"
+#include "logging.h"
 
 #define VIR_FROM_THIS VIR_FROM_LXC
 
@@ -46,8 +47,14 @@ virCapsPtr lxcCapsInit(void)
                                    0, 0)) == NULL)
         goto no_memory;
 
-    if (virCapsInitNUMA(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 (virCapsInitNUMA(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 -rup libvirt-0.6.2.orig/src/qemu_conf.c libvirt-0.6.2.new/src/qemu_conf.c
--- libvirt-0.6.2.orig/src/qemu_conf.c	2009-08-13 11:44:11.000000000 +0100
+++ libvirt-0.6.2.new/src/qemu_conf.c	2009-08-13 11:45:34.000000000 +0100
@@ -376,8 +376,14 @@ virCapsPtr qemudCapsInit(void) {
     /* Using KVM's mac prefix for QEMU too */
     virCapabilitiesSetMacPrefix(caps, (unsigned char[]){ 0x52, 0x54, 0x00 });
 
-    if (virCapsInitNUMA(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 (virCapsInitNUMA(caps) < 0) {
+        virCapabilitiesFreeNUMAInfo(caps);
+        VIR_WARN0("Failed to query host NUMA topology, disabling NUMA capabilities");
+    }
 
     /* First the pure HVM guests */
     for (i = 0 ; i < ARRAY_CARDINALITY(arch_info_hvm) ; i++)
diff -rup libvirt-0.6.2.orig/src/uml_conf.c libvirt-0.6.2.new/src/uml_conf.c
--- libvirt-0.6.2.orig/src/uml_conf.c	2009-01-31 09:04:18.000000000 +0000
+++ libvirt-0.6.2.new/src/uml_conf.c	2009-08-13 11:58:47.000000000 +0100
@@ -44,6 +44,7 @@
 #include "memory.h"
 #include "nodeinfo.h"
 #include "verify.h"
+#include "logging.h"
 
 #define VIR_FROM_THIS VIR_FROM_UML
 
@@ -62,8 +63,14 @@ virCapsPtr umlCapsInit(void) {
                                    0, 0)) == NULL)
         goto no_memory;
 
-    if (virCapsInitNUMA(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 (virCapsInitNUMA(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/F-11/libvirt.spec,v
retrieving revision 1.136
retrieving revision 1.137
diff -u -p -r1.136 -r1.137
--- libvirt.spec	5 Aug 2009 15:48:14 -0000	1.136
+++ libvirt.spec	13 Aug 2009 16:07:23 -0000	1.137
@@ -66,7 +66,7 @@
 Summary: Library providing a simple API virtualization
 Name: libvirt
 Version: 0.6.2
-Release: 14%{?dist}%{?extra_release}
+Release: 15%{?dist}%{?extra_release}
 License: LGPLv2+
 Group: Development/Libraries
 Source: libvirt-%{version}.tar.gz
@@ -116,6 +116,8 @@ Patch20: libvirt-0.6.2-pci-device-crash.
 Patch21: libvirt-0.6.2-qemu-name-uniqueness.patch
 # rhbz #479517
 Patch22: libvirt-0.6.2-buf-locale-escape.patch
+# rhbz #506590
+Patch23: libvirt-0.6.2-numa-ignore-fail.patch
 
 # Not for upstream. Temporary hack till PulseAudio autostart
 # problems are sorted out when SELinux enforcing
@@ -290,6 +292,7 @@ of recent versions of Linux (and other O
 %patch20 -p1
 %patch21 -p1
 %patch22 -p1
+%patch23 -p1
 
 %patch200 -p0
 
@@ -613,6 +616,9 @@ fi
 %endif
 
 %changelog
+* Thu Aug 13 2009 Daniel P. Berrange <berrange at redhat.com> - 0.6.2-15.fc11
+- Log and ignore NUMA topology problems (rhbz #506590)
+
 * Wed Aug  5 2009 Daniel P. Berrange <berrange at redhat.com> - 0.6.2-14.fc11
 - Fix crash when attaching/detaching non-existant PCI device (rhbz #510907)
 - Fix QEMU guest name/uuid uniqueness checks (rhbz #507405)




More information about the fedora-extras-commits mailing list