at least in my case changing the value to 30 seconds is not enough, we had to change it to 5 minutes I suggest you let the user change it as he wishes.
Pushed, thanks.On Thu, Jan 16, 2014 at 04:11:07PM +0000, Daniel P. Berrange wrote:
> On Thu, Jan 09, 2014 at 09:22:06AM +0100, Martin Kletzander wrote:
> > 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 the timeout is configurable and there is no downside
> > of waiting longer, raise the timeout right to 30 seconds.
> > Signed-off-by: Martin Kletzander <mkletzan redhat com>
> > ---
> > src/qemu/qemu.conf | 2 +-
> > src/qemu/qemu_monitor.c | 2 +-
> > 2 files changed, 2 insertions(+), 2 deletions(-)
> > diff --git a/src/qemu/qemu.conf b/src/qemu/qemu.conf
> > index 6217b49..4936d88 100644
> > --- a/src/qemu/qemu.conf
> > +++ b/src/qemu/qemu.conf
> > @@ -472,6 +472,6 @@
> > # such file or directory" that could be because libvirt did not wait
> > # enough time, you can try increasing this timeout.
> > #
> > -# Default is 3
> > +# Default is 30
> > #
> > #monitor_socket_open_timeout = 60
> > diff --git a/src/qemu/qemu_monitor.c b/src/qemu/qemu_monitor.c
> > index f34527a..6a437b1 100644
> > --- a/src/qemu/qemu_monitor.c
> > +++ b/src/qemu/qemu_monitor.c
> > @@ -273,7 +273,7 @@ qemuMonitorOpenUnix(const char *monitor, pid_t cpid, virQEMUDriverPtr driver)
> > virQEMUDriverConfigPtr cfg = NULL;
> > struct sockaddr_un addr;
> > int monfd;
> > - int timeout = 3; /* In seconds */
> > + int timeout = 30; /* In seconds */
> > int ret;
> > size_t i = 0;
> It is safe to wait longer, since in the loop we kill() to check if
> QEMU is still running or not.