[PATCH 0/2] qemu: fix migration with non-shared storage (incremental)

See patch 1/2. Peter Krempa (2): qemu: migration: Use correct flag constant for enabling storage migration NEWS: Mention implications of the bug in migration code NEWS.rst | 7 +++++++ src/qemu/qemu_migration.c | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) -- 2.31.1

The 'storageMigration' flag is supposed to be true if storage migration is requested, which is based on VIR_MIGRATE_NON_SHARED_DISK or VIR_MIGRATE_NON_SHARED_INC flags. The assignment to the variable used QEMU_MONITOR_MIGRATE_NON_SHARED_INC (0x04) instead of VIR_MIGRATE_NON_SHARED_INC (0x80), caused libvirtd to skip the actual copy of data. Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1978526 Fixes: da69f4b2084bff140238e450e264d6036ebef898 Signed-off-by: Peter Krempa <pkrempa@redhat.com> --- src/qemu/qemu_migration.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/qemu/qemu_migration.c b/src/qemu/qemu_migration.c index a199758feb..2ec7b7c48b 100644 --- a/src/qemu/qemu_migration.c +++ b/src/qemu/qemu_migration.c @@ -4016,7 +4016,7 @@ qemuMigrationSrcRun(virQEMUDriver *driver, bool abort_on_error = !!(flags & VIR_MIGRATE_ABORT_ON_ERROR); bool events = virQEMUCapsGet(priv->qemuCaps, QEMU_CAPS_MIGRATION_EVENT); bool bwParam = virQEMUCapsGet(priv->qemuCaps, QEMU_CAPS_MIGRATION_PARAM_BANDWIDTH); - bool storageMigration = flags & (VIR_MIGRATE_NON_SHARED_DISK | QEMU_MONITOR_MIGRATE_NON_SHARED_INC); + bool storageMigration = flags & (VIR_MIGRATE_NON_SHARED_DISK | VIR_MIGRATE_NON_SHARED_INC); bool cancel = false; unsigned int waitFlags; g_autoptr(virDomainDef) persistDef = NULL; -- 2.31.1

Wrong flag use could have user-visible implications. Mention the fix. Signed-off-by: Peter Krempa <pkrempa@redhat.com> --- NEWS.rst | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/NEWS.rst b/NEWS.rst index 2536955a4a..2a97b5ece4 100644 --- a/NEWS.rst +++ b/NEWS.rst @@ -17,6 +17,13 @@ v7.6.0 (unreleased) * **Bug fixes** + * qemu: Fix migration with VIR_MIGRATE_NON_SHARED_INC + + libvirt-7.3 introduced a bug where VIR_MIGRATE_NON_SHARED_INC would not + actually migrate the contents of the disk due to broken logic and at the + same time could trigger migration of storage when VIR_MIGRATE_TUNNELLED is + requested. This release fixes the bug. + v7.5.0 (2021-07-01) =================== -- 2.31.1

Wrong flag use could have user-visible implications. Mention the fix.
Signed-off-by: Peter Krempa <pkrempa@redhat.com> --- NEWS.rst | 7 +++++++ 1 file changed, 7 insertions(+)
diff --git a/NEWS.rst b/NEWS.rst index 2536955a4a..2a97b5ece4 100644 --- a/NEWS.rst +++ b/NEWS.rst @@ -17,6 +17,13 @@ v7.6.0 (unreleased)
* **Bug fixes**
+ * qemu: Fix migration with VIR_MIGRATE_NON_SHARED_INC + + libvirt-7.3 introduced a bug where VIR_MIGRATE_NON_SHARED_INC would not Would look nicer with the full version spelled out, even though
On a %A in %Y, Peter Krempa wrote: the last part is always 0: libvirt 7.3.0 introduced a bug where VIR_MIGRATE_NON_SHARED_INC would not
+ actually migrate the contents of the disk due to broken logic and at the + same time could trigger migration of storage when VIR_MIGRATE_TUNNELLED is + requested. This release fixes the bug. +
v7.5.0 (2021-07-01) ===================
Jano

On a %A in %Y, Peter Krempa wrote:
See patch 1/2.
Peter Krempa (2): qemu: migration: Use correct flag constant for enabling storage migration NEWS: Mention implications of the bug in migration code
NEWS.rst | 7 +++++++ src/qemu/qemu_migration.c | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-)
Reviewed-by: Ján Tomko <jtomko@redhat.com> Jano
participants (2)
-
Jano Tomko
-
Peter Krempa