Re: [PATCH 13/16] Close all sockets before cancelling QEMU migration

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 05/12/2011 10:04 AM, Daniel P. Berrange wrote:
> 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 0eefe5c..ef18ded 100644
> --- a/src/qemu/qemu_migration.c
> +++ b/src/qemu/qemu_migration.c
> @@ -1494,6 +1494,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);

ACK.

-- 
Eric Blake   eblake@xxxxxxxxxx    +1-801-349-2682
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list

[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]