render / rpms / libvirt

Forked from rpms/libvirt 10 months ago
Clone
3e5111
From e94894df02d97bac7169433fdcf595bd526eafd1 Mon Sep 17 00:00:00 2001
3e5111
Message-Id: <e94894df02d97bac7169433fdcf595bd526eafd1@dist-git>
3e5111
From: Jiri Denemark <jdenemar@redhat.com>
3e5111
Date: Fri, 28 Apr 2017 15:56:44 +0200
3e5111
Subject: [PATCH] qemu: Don't reset "events" migration capability
3e5111
3e5111
When creating v3.2.0-77-g8be3ccd04 commit, I completely forgot that one
3e5111
migration capability is very special. It's the "events" capability which
3e5111
tells QEMU to report "MIGRATION" events. Since libvirt always wants the
3e5111
events, it is enabled in qemuConnectMonitor and the rest of the code
3e5111
should not touch it.
3e5111
3e5111
https://bugzilla.redhat.com/show_bug.cgi?id=1439841
3e5111
https://bugzilla.redhat.com/show_bug.cgi?id=1441165
3e5111
3e5111
Messed-up-by: Jiri Denemark <jdenemar@redhat.com>
3e5111
Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
3e5111
(cherry picked from commit fc48fc7930f560c4341f4afe1285848dfdb60278)
3e5111
Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
3e5111
---
3e5111
 src/qemu/qemu_migration.c | 5 +++++
3e5111
 1 file changed, 5 insertions(+)
3e5111
3e5111
diff --git a/src/qemu/qemu_migration.c b/src/qemu/qemu_migration.c
3e5111
index cadbf9b97..ac7e27319 100644
3e5111
--- a/src/qemu/qemu_migration.c
3e5111
+++ b/src/qemu/qemu_migration.c
3e5111
@@ -5888,6 +5888,11 @@ qemuMigrationReset(virQEMUDriverPtr driver,
3e5111
         goto cleanup;
3e5111
 
3e5111
     for (cap = 0; cap < QEMU_MONITOR_MIGRATION_CAPS_LAST; cap++) {
3e5111
+        /* "events" capability is set (when supported) in qemuConnectMonitor
3e5111
+         * and should never be cleared */
3e5111
+        if (cap == QEMU_MONITOR_MIGRATION_CAPS_EVENTS)
3e5111
+            continue;
3e5111
+
3e5111
         if (qemuMigrationSetOption(driver, vm, cap, false, job) < 0)
3e5111
             goto cleanup;
3e5111
     }
3e5111
-- 
3e5111
2.12.2
3e5111