From: Jiri Denemark Date: Thu, 8 Sep 2016 13:22:28 +0000 (+0200) Subject: qemu: Remove stale transient def when migration fails X-Git-Tag: v2.3.0-rc1~192 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=66278d4bc38aecff6661c91ce9cd3fff26e54a91;p=thirdparty%2Flibvirt.git qemu: Remove stale transient def when migration fails If a migration of a domain which is already defined on the destination host failed early (before we tried to start QEMU), we would forget to remove the incoming transient definition. Later on when someone starts the domain on the destination host, we will use the stale incoming definition and the persistent definition will just be ignored. https://bugzilla.redhat.com/show_bug.cgi?id=1368774 Signed-off-by: Jiri Denemark --- diff --git a/src/qemu/qemu_migration.c b/src/qemu/qemu_migration.c index e451ef6f87..07f18db635 100644 --- a/src/qemu/qemu_migration.c +++ b/src/qemu/qemu_migration.c @@ -3872,6 +3872,7 @@ qemuMigrationPrepareAny(virQEMUDriverPtr driver, if (nbdPort == 0) virPortAllocatorRelease(driver->migrationPorts, priv->nbdPort); priv->nbdPort = 0; + virDomainObjRemoveTransientDef(vm); qemuDomainRemoveInactive(driver, vm); } virDomainObjEndAPI(&vm);