9119d9
From 977ca1a312cd9ade47cac3a9168894a4d796f637 Mon Sep 17 00:00:00 2001
9119d9
Message-Id: <977ca1a312cd9ade47cac3a9168894a4d796f637@dist-git>
9119d9
From: =?UTF-8?q?J=C3=A1n=20Tomko?= <jtomko@redhat.com>
9119d9
Date: Tue, 4 Nov 2014 13:47:29 +0100
9119d9
Subject: [PATCH] Do not probe for power mgmt capabilities in lxc emulator
9119d9
MIME-Version: 1.0
9119d9
Content-Type: text/plain; charset=UTF-8
9119d9
Content-Transfer-Encoding: 8bit
9119d9
9119d9
It fails after 30 seconds with this error:
9119d9
error : virDBusCall:1429 : error from service: CanSuspend:
9119d9
Did not receive a reply. Possible causes include: the remote
9119d9
application did not send a reply, the message bus security
9119d9
policy blocked the reply, the reply timeout expired, or the
9119d9
network connection was broken.
9119d9
9119d9
Only probe for the power mgmt capabilities when driver is non-NULL.
9119d9
This speeds up domain startup by 30 seconds.
9119d9
9119d9
https://bugzilla.redhat.com/show_bug.cgi?id=1159227
9119d9
(cherry picked from commit 7ead1a5d91a93b5614deeef7b0227bffcea9740d)
9119d9
Signed-off-by: Ján Tomko <jtomko@redhat.com>
9119d9
Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
9119d9
---
9119d9
 src/lxc/lxc_conf.c | 4 +++-
9119d9
 1 file changed, 3 insertions(+), 1 deletion(-)
9119d9
9119d9
diff --git a/src/lxc/lxc_conf.c b/src/lxc/lxc_conf.c
9119d9
index 17df7a8..e713ff8 100644
9119d9
--- a/src/lxc/lxc_conf.c
9119d9
+++ b/src/lxc/lxc_conf.c
9119d9
@@ -82,7 +82,9 @@ virCapsPtr virLXCDriverCapsInit(virLXCDriverPtr driver)
9119d9
         VIR_WARN("Failed to query host NUMA topology, disabling NUMA capabilities");
9119d9
     }
9119d9
 
9119d9
-    if (virNodeSuspendGetTargetMask(&caps->host.powerMgmt) < 0)
9119d9
+    /* Only probe for power management capabilities in the driver,
9119d9
+     * not in the emulator */
9119d9
+    if (driver && virNodeSuspendGetTargetMask(&caps->host.powerMgmt) < 0)
9119d9
         VIR_WARN("Failed to get host power management capabilities");
9119d9
 
9119d9
     if (virGetHostUUID(caps->host.host_uuid)) {
9119d9
-- 
9119d9
2.1.3
9119d9