File libvirt-qemu-Change-the-default-unix-monitor-timeout.patch of Package libvirt

From 1255fcd0c089dc2c9806eab1ea7cb9f89ca99ecf Mon Sep 17 00:00:00 2001
Message-Id: <1255fcd0c089dc2c9806eab1ea7cb9f89ca99ecf@dist-git>
From: Martin Kletzander <mkletzan@redhat.com>
Date: Mon, 7 Apr 2014 10:25:08 +0200
Subject: [PATCH] qemu: Change the default unix monitor timeout

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

There is a number of reported issues when we fail starting a domain.
Turns out that, in some scenarios like high load, 3 second timeout is
not enough for qemu to start up to the phase where the socket is
created.  Since there is no downside of waiting longer, raise the
timeout right to 30 seconds.

Signed-off-by: Martin Kletzander <mkletzan@redhat.com>
(cherry picked from commit fe89b687a02d1a8e1dce695a67b4f9d2c254d7b9)

Conflicts:
	src/qemu/qemu_monitor.c -- int i => size_t i

Signed-off-by: Martin Kletzander <mkletzan@redhat.com>
Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
---
 src/qemu/qemu_monitor.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/qemu/qemu_monitor.c b/src/qemu/qemu_monitor.c
index e14cd4b..85f2a89 100644
--- a/src/qemu/qemu_monitor.c
+++ b/src/qemu/qemu_monitor.c
@@ -259,7 +259,7 @@ qemuMonitorOpenUnix(const char *monitor, pid_t cpid)
 {
     struct sockaddr_un addr;
     int monfd;
-    int timeout = 3; /* In seconds */
+    int timeout = 30; /* In seconds */
     int ret, i = 0;
 
     if ((monfd = socket(AF_UNIX, SOCK_STREAM, 0)) < 0) {
-- 
1.9.1

openSUSE Build Service is sponsored by