]> xenbits.xensource.com Git - people/liuw/libxenctrl-split/libvirt.git/commitdiff
Do not probe for power mgmt capabilities in lxc emulator
authorJán Tomko <jtomko@redhat.com>
Fri, 31 Oct 2014 09:02:22 +0000 (10:02 +0100)
committerJán Tomko <jtomko@redhat.com>
Tue, 4 Nov 2014 12:40:45 +0000 (13:40 +0100)
It fails after 30 seconds with this error:
error : virDBusCall:1429 : error from service: CanSuspend:
Did not receive a reply. Possible causes include: the remote
application did not send a reply, the message bus security
policy blocked the reply, the reply timeout expired, or the
network connection was broken.

Only probe for the power mgmt capabilities when driver is non-NULL.
This speeds up domain startup by 30 seconds.

https://bugzilla.redhat.com/show_bug.cgi?id=1159227

src/lxc/lxc_conf.c

index 17df7a84c0e6ffeedbfc02f51577deaeb0b91332..e713ff8ae58a87b4e372251ec3baa4358e2ee29f 100644 (file)
@@ -82,7 +82,9 @@ virCapsPtr virLXCDriverCapsInit(virLXCDriverPtr driver)
         VIR_WARN("Failed to query host NUMA topology, disabling NUMA capabilities");
     }
 
-    if (virNodeSuspendGetTargetMask(&caps->host.powerMgmt) < 0)
+    /* Only probe for power management capabilities in the driver,
+     * not in the emulator */
+    if (driver && virNodeSuspendGetTargetMask(&caps->host.powerMgmt) < 0)
         VIR_WARN("Failed to get host power management capabilities");
 
     if (virGetHostUUID(caps->host.host_uuid)) {