[libvirt/f20] Backport increase default qemu monitor timeout from 3 to 30

Richard W.M. Jones rjones at fedoraproject.org
Mon Jan 20 22:18:06 UTC 2014


commit 553c795477e527579d2d0ac7a43a7dcb26a977aa
Author: Richard W.M. Jones <rjones at redhat.com>
Date:   Mon Jan 20 22:17:59 2014 +0000

    Backport increase default qemu monitor timeout from 3 to 30
    
      seconds (bz #987088)

 ...u-Change-the-default-unix-monitor-timeout.patch |   33 ++++++++++++++++++++
 libvirt.spec                                       |   11 ++++++-
 2 files changed, 43 insertions(+), 1 deletions(-)
---
diff --git a/0001-qemu-Change-the-default-unix-monitor-timeout.patch b/0001-qemu-Change-the-default-unix-monitor-timeout.patch
new file mode 100644
index 0000000..77809f4
--- /dev/null
+++ b/0001-qemu-Change-the-default-unix-monitor-timeout.patch
@@ -0,0 +1,33 @@
+From 844476f1f21fc3ea4d13aa3ea01ac56a155432a8 Mon Sep 17 00:00:00 2001
+From: Martin Kletzander <mkletzan at redhat.com>
+Date: Thu, 9 Jan 2014 07:57:59 +0100
+Subject: [PATCH] qemu: Change the default unix monitor timeout
+
+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 at redhat.com>
+(cherry picked from commit fe89b687a02d1a8e1dce695a67b4f9d2c254d7b9)
+---
+ 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 7e26377..55d0ad1 100644
+--- a/src/qemu/qemu_monitor.c
++++ b/src/qemu/qemu_monitor.c
+@@ -268,7 +268,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;
+     size_t i = 0;
+ 
+-- 
+1.8.4.2
+
diff --git a/libvirt.spec b/libvirt.spec
index a91ffd5..f97db69 100644
--- a/libvirt.spec
+++ b/libvirt.spec
@@ -367,7 +367,7 @@
 Summary: Library providing a simple virtualization API
 Name: libvirt
 Version: 1.1.3.3
-Release: 1%{?dist}%{?extra_release}
+Release: 2%{?dist}%{?extra_release}
 License: LGPLv2+
 Group: Development/Libraries
 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
@@ -378,6 +378,9 @@ URL: http://libvirt.org/
 %endif
 Source: http://libvirt.org/sources/%{?mainturl}libvirt-%{version}.tar.gz
 
+# Increase default qemu monitor timeout from 3 to 30 seconds (upstream).
+Patch0001: 0001-qemu-Change-the-default-unix-monitor-timeout.patch
+
 %if %{with_libvirtd}
 Requires: libvirt-daemon = %{version}-%{release}
     %if %{with_network}
@@ -1161,6 +1164,8 @@ of recent versions of Linux (and other OSes).
 %prep
 %setup -q
 
+%patch0001 -p1
+
 %build
 %if ! %{with_xen}
     %define _without_xen --without-xen
@@ -2118,6 +2123,10 @@ fi
 %endif
 
 %changelog
+* Mon Jan 20 2014 Richard W.M. Jones <rjones at redhat.com> - 1.1.3.3-2
+- Backport increase default qemu monitor timeout from 3 to 30
+  seconds (bz #987088)
+
 * Thu Jan 16 2014 Cole Robinson <crobinso at redhat.com> - 1.1.3.3-1
 - Rebased to version 1.1.3.3
 - Fix crash in virDBusAddWatch (bz #885445)


More information about the scm-commits mailing list