render / rpms / libvirt

Forked from rpms/libvirt 10 months ago
Clone
3e5111
From 3a9924b5ea76945b0df16cd21fd0acbb6fe152fc Mon Sep 17 00:00:00 2001
3e5111
Message-Id: <3a9924b5ea76945b0df16cd21fd0acbb6fe152fc@dist-git>
3e5111
From: Jiri Denemark <jdenemar@redhat.com>
3e5111
Date: Wed, 31 May 2017 10:08:28 +0200
3e5111
Subject: [PATCH] qemu: Set operation on completed migration job
3e5111
3e5111
Without this patch libvirt would just report the operation of a
3e5111
completed job as "unknown" instead of "incoming migration".
3e5111
3e5111
https://bugzilla.redhat.com/show_bug.cgi?id=1457052
3e5111
3e5111
Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
3e5111
(cherry picked from commit 49d30bc2e292785bf2edc121c12bc5c10264d1d4)
3e5111
Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
3e5111
---
3e5111
 src/qemu/qemu_migration_cookie.c | 4 ++++
3e5111
 1 file changed, 4 insertions(+)
3e5111
3e5111
diff --git a/src/qemu/qemu_migration_cookie.c b/src/qemu/qemu_migration_cookie.c
3e5111
index 12887892db..559b1f0c15 100644
3e5111
--- a/src/qemu/qemu_migration_cookie.c
3e5111
+++ b/src/qemu/qemu_migration_cookie.c
3e5111
@@ -1292,6 +1292,7 @@ qemuMigrationEatCookie(virQEMUDriverPtr driver,
3e5111
                        int cookieinlen,
3e5111
                        unsigned int flags)
3e5111
 {
3e5111
+    qemuDomainObjPrivatePtr priv = dom->privateData;
3e5111
     qemuMigrationCookiePtr mig = NULL;
3e5111
 
3e5111
     /* Parse & validate incoming cookie (if any) */
3e5111
@@ -1340,6 +1341,9 @@ qemuMigrationEatCookie(virQEMUDriverPtr driver,
3e5111
         }
3e5111
     }
3e5111
 
3e5111
+    if (flags & QEMU_MIGRATION_COOKIE_STATS && mig->jobInfo)
3e5111
+        mig->jobInfo->operation = priv->job.current->operation;
3e5111
+
3e5111
     return mig;
3e5111
 
3e5111
  error:
3e5111
-- 
3e5111
2.13.1
3e5111