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(a)redhat.com>
---
src/qemu/qemu_migration_cookie.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/src/qemu/qemu_migration_cookie.c b/src/qemu/qemu_migration_cookie.c
index 12887892d..559b1f0c1 100644
--- a/src/qemu/qemu_migration_cookie.c
+++ b/src/qemu/qemu_migration_cookie.c
@@ -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:
--
2.13.0