]> xenbits.xensource.com Git - libvirt.git/commitdiff
Don't fail qemu driver intialization if we can't determine hugepage size
authorGuido Günther <agx@sigxcpu.org>
Sun, 10 Aug 2014 10:42:37 +0000 (12:42 +0200)
committerGuido Günther <agx@sigxcpu.org>
Mon, 11 Aug 2014 20:23:48 +0000 (22:23 +0200)
Otherwise we fail like

  libvirt version: 1.2.7, package: 6 (root 2014-08-08-16:09:22 bogon)
  virAuditOpen:62 : Unable to initialize audit layer: Protocol not supported
  virFileGetDefaultHugepageSize:2958 : internal error: Unable to parse /proc/meminfo
  virStateInitialize:749 : Initialization of QEMU state driver failed: internal error: Unable to parse /proc/meminfo
  daemonRunStateInit:922 : Driver state initialization failed

if the data can't be determined.

Reference: http://bugs.debian.org/757609

src/util/virfile.c

index f9efc65eb0f504ee27e4a836089b3a83efa6679b..b6f5e3f2cbbcc6768d764009b238b2349bee3fee 100644 (file)
@@ -2953,8 +2953,9 @@ virFileGetDefaultHugepageSize(unsigned long long *size)
         goto cleanup;
 
     if (!(c = strstr(meminfo, HUGEPAGESIZE_STR))) {
-        virReportError(VIR_ERR_INTERNAL_ERROR,
-                       _("Unable to parse %s"),
+        virReportError(VIR_ERR_NO_SUPPORT,
+                       _("%s not found in %s"),
+                       HUGEPAGESIZE_STR,
                        PROC_MEMINFO);
         goto cleanup;
     }