[libvirt] [PATCH] qemu: Don't reset "events" migration capability

Jiri Denemark posted 1 patch 6 years, 11 months ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/libvirt tags/patchew/0faf4b448f3445f9857df4bb97c85c712f749f3d.1493389763.git.jdenemar@redhat.com
src/qemu/qemu_migration.c | 5 +++++
1 file changed, 5 insertions(+)
[libvirt] [PATCH] qemu: Don't reset "events" migration capability
Posted by Jiri Denemark 6 years, 11 months ago
When creating v3.2.0-77-g8be3ccd04 commit, I completely forgot that one
migration capability is very special. It's the "events" capability which
tells QEMU to report "MIGRATION" events. Since libvirt always wants the
events, it is enabled in qemuConnectMonitor and the rest of the code
should not touch it.

https://bugzilla.redhat.com/show_bug.cgi?id=1439841
https://bugzilla.redhat.com/show_bug.cgi?id=1441165

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

diff --git a/src/qemu/qemu_migration.c b/src/qemu/qemu_migration.c
index b4507a3ae..30f98da1e 100644
--- a/src/qemu/qemu_migration.c
+++ b/src/qemu/qemu_migration.c
@@ -5919,6 +5919,11 @@ qemuMigrationReset(virQEMUDriverPtr driver,
         goto cleanup;
 
     for (cap = 0; cap < QEMU_MONITOR_MIGRATION_CAPS_LAST; cap++) {
+        /* "events" capability is set (when supported) in qemuConnectMonitor
+         * and should never be cleared */
+        if (cap == QEMU_MONITOR_MIGRATION_CAPS_EVENTS)
+            continue;
+
         if (qemuMigrationSetOption(driver, vm, cap, false, job) < 0)
             goto cleanup;
     }
-- 
2.12.2

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list
Re: [libvirt] [PATCH] qemu: Don't reset "events" migration capability
Posted by Pavel Hrdina 6 years, 11 months ago
On Fri, Apr 28, 2017 at 04:29:23PM +0200, Jiri Denemark wrote:
> When creating v3.2.0-77-g8be3ccd04 commit, I completely forgot that one
> migration capability is very special. It's the "events" capability which
> tells QEMU to report "MIGRATION" events. Since libvirt always wants the
> events, it is enabled in qemuConnectMonitor and the rest of the code
> should not touch it.
> 
> https://bugzilla.redhat.com/show_bug.cgi?id=1439841
> https://bugzilla.redhat.com/show_bug.cgi?id=1441165
> 
> Messed-up-by: Jiri Denemark <jdenemar@redhat.com>
> Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
> ---
>  src/qemu/qemu_migration.c | 5 +++++
>  1 file changed, 5 insertions(+)

Reviewed-by: Pavel Hrdina <phrdina@redhat.com>
--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list