All of lore.kernel.org
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH] Avoid permanently disabled QEMU monitor when UNIX migration fails
@ 2009-12-11 20:49 Daniel P. Berrange
  2009-12-11 20:56 ` [Qemu-devel] " Daniel P. Berrange
  0 siblings, 1 reply; 2+ messages in thread
From: Daniel P. Berrange @ 2009-12-11 20:49 UTC (permalink / raw)
  To: qemu-devel

If a UNIX migration command is attempt to a UNIX socket which does
not exist, then the monitor is suspended, but never resumed. This
prevents any further use of the monitor

* migration-unix.c: Only call migrate_fd_monitor_suspend() once
  connected to the UNIX socket.
---
 migration-unix.c |   12 +++++++-----
 1 files changed, 7 insertions(+), 5 deletions(-)

diff --git a/migration-unix.c b/migration-unix.c
index 783228b..a141dbb 100644
--- a/migration-unix.c
+++ b/migration-unix.c
@@ -112,10 +112,6 @@ MigrationState *unix_start_outgoing_migration(Monitor *mon,
 
     socket_set_nonblock(s->fd);
 
-    if (!detach) {
-        migrate_fd_monitor_suspend(s, mon);
-    }
-
     do {
         ret = connect(s->fd, (struct sockaddr *)&addr, sizeof(addr));
         if (ret == -1)
@@ -128,7 +124,13 @@ MigrationState *unix_start_outgoing_migration(Monitor *mon,
     if (ret < 0 && ret != -EINPROGRESS && ret != -EWOULDBLOCK) {
         dprintf("connect failed\n");
         goto err_after_open;
-    } else if (ret >= 0)
+    }
+
+    if (!detach) {
+        migrate_fd_monitor_suspend(s, mon);
+    }
+
+    if (ret >= 0)
         migrate_fd_connect(s);
 
     return &s->mig_state;
-- 
1.6.5.2

^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2009-12-11 20:56 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-12-11 20:49 [Qemu-devel] [PATCH] Avoid permanently disabled QEMU monitor when UNIX migration fails Daniel P. Berrange
2009-12-11 20:56 ` [Qemu-devel] " Daniel P. Berrange

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.