[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]
[libvirt] [PATCH 13/16] Close all sockets before cancelling QEMU migration
- From: "Daniel P. Berrange" <berrange redhat com>
- To: libvir-list redhat com
- Subject: [libvirt] [PATCH 13/16] Close all sockets before cancelling QEMU migration
- Date: Wed, 11 May 2011 10:09:59 +0100
Cancelling the QEMU migration may cause QEMU to flush pending
data on the migration socket. This may in turn block QEMU if
nothing reads from the other end of the socket. Closing the
socket before cancelling QEMU migration avoids this possible
deadlock.
* src/qemu/qemu_migration.c: Close sockets before cancelling
migration on failure
---
src/qemu/qemu_migration.c | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/src/qemu/qemu_migration.c b/src/qemu/qemu_migration.c
index a39ebcf..1c86373 100644
--- a/src/qemu/qemu_migration.c
+++ b/src/qemu/qemu_migration.c
@@ -1496,6 +1496,8 @@ static int doTunnelMigrate(struct qemud_driver *driver,
cancel:
if (ret != 0 && virDomainObjIsActive(vm)) {
+ VIR_FORCE_CLOSE(client_sock);
+ VIR_FORCE_CLOSE(qemu_sock);
qemuDomainObjEnterMonitorWithDriver(driver, vm);
qemuMonitorMigrateCancel(priv->mon);
qemuDomainObjExitMonitorWithDriver(driver, vm);
--
1.7.4.4
[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]