[libvirt] [PATCH 0/2] Fix spurious error when migrating with memory hotplug

Peter Krempa (2): qemu: migration: Properly parse memory hotplug migration flag qemu: migration: Actually error out on unsupported migration flag src/qemu/qemu_migration.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) -- 2.6.2

Since the flag was not enabled when 'eating' the migration cookie, libvirt reported a bogus error when memory hotplug was enabled: unsupported migration cookie feature memory-hotplug The error was ignored though due to a bug in the code so it slipped through testing. Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1278404 --- src/qemu/qemu_migration.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/qemu/qemu_migration.c b/src/qemu/qemu_migration.c index 2abf2ee..a53a533 100644 --- a/src/qemu/qemu_migration.c +++ b/src/qemu/qemu_migration.c @@ -3387,7 +3387,8 @@ qemuMigrationPrepareAny(virQEMUDriverPtr driver, if (!(mig = qemuMigrationEatCookie(driver, vm, cookiein, cookieinlen, QEMU_MIGRATION_COOKIE_LOCKSTATE | - QEMU_MIGRATION_COOKIE_NBD))) + QEMU_MIGRATION_COOKIE_NBD | + QEMU_MIGRATION_COOKIE_MEMORY_HOTPLUG))) goto cleanup; if (STREQ_NULLABLE(protocol, "rdma") && -- 2.6.2

The code reported that a migration flag is unsupported but didn't jump to the error label. Probably an oversight in commit f88af9dc that introduced the flag checking. --- 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 a53a533..e8ffde0 100644 --- a/src/qemu/qemu_migration.c +++ b/src/qemu/qemu_migration.c @@ -1236,6 +1236,7 @@ qemuMigrationCookieXMLParse(qemuMigrationCookiePtr mig, _("Unsupported migration cookie feature %s"), str); VIR_FREE(str); + goto error; } VIR_FREE(str); } -- 2.6.2

On Thu, Nov 05, 2015 at 15:38:41 +0100, Peter Krempa wrote:
Peter Krempa (2): qemu: migration: Properly parse memory hotplug migration flag qemu: migration: Actually error out on unsupported migration flag
src/qemu/qemu_migration.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
Oops, the bug fixed by patch 2 has been there for quite a few years :-) ACK series. Jirka

On Thu, Nov 05, 2015 at 20:37:09 +0100, Jiri Denemark wrote:
On Thu, Nov 05, 2015 at 15:38:41 +0100, Peter Krempa wrote:
Peter Krempa (2): qemu: migration: Properly parse memory hotplug migration flag qemu: migration: Actually error out on unsupported migration flag
src/qemu/qemu_migration.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
Oops, the bug fixed by patch 2 has been there for quite a few years :-)
Indeed.
ACK series.
Pushed; Thanks. Peter
participants (2)
-
Jiri Denemark
-
Peter Krempa