[libvirt] [PATCH] qemu: Reset post-copy capability after migration

Unlike other migration capabilities, post-copy is also set on the destination host which means it doesn't disappear once domain is migrated. As a result of that other functionality which internally uses migration to a file (virDomainManagedSave, virDomainSave, virDomainCoreDump) may fail after migration because the post-copy capability is still set. https://bugzilla.redhat.com/show_bug.cgi?id=1374718 Signed-off-by: Jiri Denemark <jdenemar@redhat.com> --- Notes: We need a more generic way to store and reset migration capabilities and parameters on both sides of migration since we need to reset them in case migration fails. But it will need a little bit more work, so let's start with this simple patch fixing the most visible issue. I'll work on the generic solution later. src/qemu/qemu_migration.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/qemu/qemu_migration.c b/src/qemu/qemu_migration.c index 1c4a80c..d4a55d8 100644 --- a/src/qemu/qemu_migration.c +++ b/src/qemu/qemu_migration.c @@ -6418,6 +6418,9 @@ qemuMigrationFinish(virQEMUDriverPtr driver, */ if (inPostCopy) VIR_FREE(priv->job.completed); + + qemuMigrationSetPostCopy(driver, vm, false, + QEMU_ASYNC_JOB_MIGRATION_IN); } qemuMigrationJobFinish(driver, vm); -- 2.10.2

On Wed, Nov 02, 2016 at 03:01:41PM +0100, Jiri Denemark wrote:
Unlike other migration capabilities, post-copy is also set on the destination host which means it doesn't disappear once domain is migrated. As a result of that other functionality which internally uses migration to a file (virDomainManagedSave, virDomainSave, virDomainCoreDump) may fail after migration because the post-copy capability is still set.
https://bugzilla.redhat.com/show_bug.cgi?id=1374718
Signed-off-by: Jiri Denemark <jdenemar@redhat.com> ---
Notes: We need a more generic way to store and reset migration capabilities and parameters on both sides of migration since we need to reset them in case migration fails. But it will need a little bit more work, so let's start with this simple patch fixing the most visible issue. I'll work on the generic solution later.
I wonder how many times have I said something like this =) Well, let's start with an ACK for now, I guess. Martin

On Wed, Nov 02, 2016 at 15:31:12 +0100, Martin Kletzander wrote:
On Wed, Nov 02, 2016 at 03:01:41PM +0100, Jiri Denemark wrote:
Unlike other migration capabilities, post-copy is also set on the destination host which means it doesn't disappear once domain is migrated. As a result of that other functionality which internally uses migration to a file (virDomainManagedSave, virDomainSave, virDomainCoreDump) may fail after migration because the post-copy capability is still set.
https://bugzilla.redhat.com/show_bug.cgi?id=1374718
Signed-off-by: Jiri Denemark <jdenemar@redhat.com> ---
Notes: We need a more generic way to store and reset migration capabilities and parameters on both sides of migration since we need to reset them in case migration fails. But it will need a little bit more work, so let's start with this simple patch fixing the most visible issue. I'll work on the generic solution later.
I wonder how many times have I said something like this =)
Well, let's start with an ACK for now, I guess.
Pushed, thanks. Jirka
participants (2)
-
Jiri Denemark
-
Martin Kletzander