[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

[libvirt] [PATCH] Inhibit daemon shutdown during capabilities probing



As of 1a50ba2cb07d8bb2aa724062889deb9efd7ad9e9 qemu capabilities probing
takes longer since we timeout waiting for the monitor socket. When
probing qemu for different architectures this can add up so the daemon
auto shutdown timeout is reached and the client doesn't have a chance
to connect. To avoid that inhibit daemon shutdown during capabilities
probing.

This fixes

	http://honk.sigxcpu.org:8001/job/libvirt-tck-debian-wheezy-qemu-session/227/
---
 src/qemu/qemu_driver.c |    7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c
index e099c5c..7e26fcd 100644
--- a/src/qemu/qemu_driver.c
+++ b/src/qemu/qemu_driver.c
@@ -640,6 +640,8 @@ qemuStartup(bool privileged,
     /* Don't have a dom0 so start from 1 */
     qemu_driver->nextvmid = 1;
 
+    qemu_driver->inhibitCallback(true, qemu_driver->inhibitOpaque);
+
     if (virDomainObjListInit(&qemu_driver->domains) < 0)
         goto out_of_memory;
 
@@ -917,6 +919,7 @@ qemuStartup(bool privileged,
     if (!qemu_driver->workerPool)
         goto error;
 
+    qemu_driver->inhibitCallback(false, qemu_driver->inhibitOpaque);
     qemuDriverUnlock(qemu_driver);
 
     qemuAutostartDomains(qemu_driver);
@@ -930,8 +933,10 @@ qemuStartup(bool privileged,
 out_of_memory:
     virReportOOMError();
 error:
-    if (qemu_driver)
+    if (qemu_driver) {
+        qemu_driver->inhibitCallback(false, qemu_driver->inhibitOpaque);
         qemuDriverUnlock(qemu_driver);
+    }
     if (conn)
         virConnectClose(conn);
     VIR_FREE(base);
-- 
1.7.10.4


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]