]> xenbits.xensource.com Git - libvirt.git/commitdiff
qemu: Fix reporting completed migration stats on destination
authorJiri Denemark <jdenemar@redhat.com>
Fri, 1 Jun 2018 08:32:49 +0000 (10:32 +0200)
committerJiri Denemark <jdenemar@redhat.com>
Fri, 1 Jun 2018 15:55:44 +0000 (17:55 +0200)
This has been broken since commit v4.0.0-165-g93412bb827 which added
jobInfo->statsType enum to distinguish various statistics types. During
migration the type will always be QEMU_DOMAIN_JOB_STATS_TYPE_MIGRATION,
however the destination code consuming the statistics data from
migration cookie failed to properly set the type. So even though
everything was filled in, the type remained *_NONE and any attempt to
fetch the statistics data of a completed migration on the destination
host failed.

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

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

index 68663eac47a71a7dcd472e23be502b79b4717c45..70616b568efe9fb38d66cc13f70327003ee6fce7 100644 (file)
@@ -5160,6 +5160,7 @@ qemuMigrationDstFinish(virQEMUDriverPtr driver,
         if (jobInfo) {
             VIR_STEAL_PTR(priv->job.completed, jobInfo);
             priv->job.completed->status = QEMU_DOMAIN_JOB_STATUS_COMPLETED;
+            priv->job.completed->statsType = QEMU_DOMAIN_JOB_STATS_TYPE_MIGRATION;
         }
 
         if (qemuMigrationBakeCookie(mig, driver, vm,