summaryrefslogtreecommitdiff
path: root/libraries/libvirt/patches/0001-Don-t-fail-qemu-driver-intialization-if-we-can-t-det.patch
blob: ce9a62b4ad52562dacd3f9a3fa7b0fb42c934c14 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
From ee2a7c5483c9dc746ad439340925947f393b919a Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Guido=20G=C3=BCnther?= <agx@sigxcpu.org>
Date: Sun, 10 Aug 2014 12:42:37 +0200
Subject: [PATCH] Don't fail qemu driver intialization if we can't determine
 hugepage size

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 | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/src/util/virfile.c b/src/util/virfile.c
index f9efc65..b6f5e3f 100644
--- a/src/util/virfile.c
+++ b/src/util/virfile.c
@@ -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;
     }
-- 
2.0.3