]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
qemu: Set operation on completed migration job
authorJiri Denemark <jdenemar@redhat.com>
Wed, 31 May 2017 08:08:28 +0000 (10:08 +0200)
committerJiri Denemark <jdenemar@redhat.com>
Wed, 7 Jun 2017 07:14:02 +0000 (09:14 +0200)
Without this patch libvirt would just report the operation of a
completed job as "unknown" instead of "incoming migration".

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

Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
src/qemu/qemu_migration_cookie.c

index 12887892db9e2a28353f59af74074ba472393b16..559b1f0c15d682945dc5176320cf20849927452b 100644 (file)
@@ -1292,6 +1292,7 @@ qemuMigrationEatCookie(virQEMUDriverPtr driver,
                        int cookieinlen,
                        unsigned int flags)
 {
+    qemuDomainObjPrivatePtr priv = dom->privateData;
     qemuMigrationCookiePtr mig = NULL;
 
     /* Parse & validate incoming cookie (if any) */
@@ -1340,6 +1341,9 @@ qemuMigrationEatCookie(virQEMUDriverPtr driver,
         }
     }
 
+    if (flags & QEMU_MIGRATION_COOKIE_STATS && mig->jobInfo)
+        mig->jobInfo->operation = priv->job.current->operation;
+
     return mig;
 
  error: