[libvirt] [PATCH] qemu: Unlock monitor when connecting to dest qemu fails

Eric Blake eblake at redhat.com
Wed Feb 15 22:26:05 UTC 2012


On 02/15/2012 09:06 AM, Jiri Denemark wrote:
> When migrating a qemu domain, we enter the monitor, send some commands,
> try to connect to destination qemu, send other commands, end exit the
> monitor. However, if we couldn't connect to destination qemu we forgot
> to exit the monitor.
> 
> Bug introduced by commit d9d518b1c8ef3b65658cc91f85ba33a63c0959a4.

Bummer - that means 0.9.10 can lock up on a botched migration.

> ---
>  src/qemu/qemu_migration.c |    4 +++-
>  1 files changed, 3 insertions(+), 1 deletions(-)
> 
> diff --git a/src/qemu/qemu_migration.c b/src/qemu/qemu_migration.c
> index 12cfbde..ea4185e 100644
> --- a/src/qemu/qemu_migration.c
> +++ b/src/qemu/qemu_migration.c
> @@ -1624,8 +1624,10 @@ qemuMigrationRun(struct qemud_driver *driver,
>  
>      /* connect to the destination qemu if needed */
>      if (spec->destType == MIGRATION_DEST_CONNECT_HOST &&
> -        qemuMigrationConnect(driver, vm, spec) < 0)
> +        qemuMigrationConnect(driver, vm, spec) < 0) {
> +        qemuDomainObjExitMonitorWithDriver(driver, vm);
>          goto cleanup;
> +    }

ACK.

-- 
Eric Blake   eblake at redhat.com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 620 bytes
Desc: OpenPGP digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20120215/dbcce121/attachment-0001.sig>


More information about the libvir-list mailing list