[libvirt] [PATCH v2 12/73] qemu: Reset migration parameters in qemuMigrationSrcCleanup

Jiri Denemark posted 73 patches 7 years, 1 month ago
[libvirt] [PATCH v2 12/73] qemu: Reset migration parameters in qemuMigrationSrcCleanup
Posted by Jiri Denemark 7 years, 1 month ago
When connection to the client which controls a non-p2p migration gets
closed between Perform and Confirm phase, we don't know whether the
domain was successfully migrated or not. Thus, we have to leave the
domain paused and just cleanup the migration job and reset migration
parameters.

Previously we didn't reset the parameters and future save or snapshot
operations would see wrong environment (and could fail because of it) in
case the domain stayed running on the source host.

Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
---
 src/qemu/qemu_migration.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/src/qemu/qemu_migration.c b/src/qemu/qemu_migration.c
index 055d8a674a..b7ef535b5d 100644
--- a/src/qemu/qemu_migration.c
+++ b/src/qemu/qemu_migration.c
@@ -1834,6 +1834,7 @@ qemuMigrationSrcCleanup(virDomainObjPtr vm,
         VIR_WARN("Migration of domain %s finished but we don't know if the"
                  " domain was successfully started on destination or not",
                  vm->def->name);
+        qemuMigrationParamsReset(driver, vm, QEMU_ASYNC_JOB_MIGRATION_OUT);
         /* clear the job and let higher levels decide what to do */
         qemuDomainObjDiscardAsyncJob(driver, vm);
         break;
-- 
2.17.0

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list
Re: [libvirt] [PATCH v2 12/73] qemu: Reset migration parameters in qemuMigrationSrcCleanup
Posted by Ján Tomko 7 years, 1 month ago
On Wed, Apr 11, 2018 at 04:41:02PM +0200, Jiri Denemark wrote:
>When connection to the client which controls a non-p2p migration gets
>closed between Perform and Confirm phase, we don't know whether the
>domain was successfully migrated or not. Thus, we have to leave the
>domain paused and just cleanup the migration job and reset migration
>parameters.
>
>Previously we didn't reset the parameters and future save or snapshot
>operations would see wrong environment (and could fail because of it) in
>case the domain stayed running on the source host.
>
>Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
>---
> src/qemu/qemu_migration.c | 1 +
> 1 file changed, 1 insertion(+)
>

Reviewed-by: Ján Tomko <jtomko@redhat.com>

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