提交 2dd650e5 编写于 作者: D Daniel P. Berrange 提交者: Anthony Liguori

Avoid permanently disabled QEMU monitor when UNIX migration fails

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.
Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
上级 092493be
......@@ -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;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册