]> xenbits.xensource.com Git - libvirt.git/commitdiff
Increase timeout for initial monitor poll, to prevent a guest from failing to start...
authorCole Robinson <crobinso@redhat.com>
Thu, 4 Dec 2008 14:47:12 +0000 (14:47 +0000)
committerCole Robinson <crobinso@redhat.com>
Thu, 4 Dec 2008 14:47:12 +0000 (14:47 +0000)
ChangeLog
src/qemu_driver.c

index 338ad8975b347326a36037b21b1a79fd5ec2c280..781848305883f55b82343518b2537c683e7207bb 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+Thu Dec  4 09:42:00 EST 2008 Cole Robinson <crobinso@redhat.com>
+
+       * src/qemu_driver.c: Increase timeout for initial monitor poll
+
 Thu Dec  4 15:36:42 CET 2008 Daniel Veillard <veillard@redhat.com>
 
        * src/bridge.c: patch setting MTU on tap interface to be the same
index 9aaadf2fb1230c6af9610e80b34a05e96f3419d6..e666efc379c6ad61a0fe7c42639492f16412bea4 100644 (file)
@@ -360,9 +360,9 @@ qemudReadMonitorOutput(virConnectPtr conn,
                        char *buf,
                        int buflen,
                        qemudHandlerMonitorOutput func,
-                       const char *what)
+                       const char *what,
+                       int timeout)
 {
-#define MONITOR_TIMEOUT 3000
     int got = 0;
     buf[0] = '\0';
 
@@ -388,7 +388,7 @@ qemudReadMonitorOutput(virConnectPtr conn,
                 return -1;
             }
 
-            ret = poll(&pfd, 1, MONITOR_TIMEOUT);
+            ret = poll(&pfd, 1, timeout);
             if (ret == 0) {
                 qemudReportError(conn, NULL, NULL, VIR_ERR_INTERNAL_ERROR,
                                  _("Timed out while reading %s startup output"), what);
@@ -422,7 +422,6 @@ qemudReadMonitorOutput(virConnectPtr conn,
                      _("Out of space while reading %s startup output"), what);
     return -1;
 
-#undef MONITOR_TIMEOUT
 }
 
 static int
@@ -468,7 +467,7 @@ static int qemudOpenMonitor(virConnectPtr conn,
                                  driver, vm, monfd,
                                  buf, sizeof(buf),
                                  qemudCheckMonitorPrompt,
-                                 "monitor");
+                                 "monitor", 10000);
 
     /* Keep monitor open upon success */
     if (ret == 0)
@@ -579,7 +578,7 @@ static int qemudWaitForMonitor(virConnectPtr conn,
                                      driver, vm, vm->stderr_fd,
                                      buf, sizeof(buf),
                                      qemudFindCharDevicePTYs,
-                                     "console");
+                                     "console", 3000);
 
     buf[sizeof(buf)-1] = '\0';