From nobody Sun Apr 28 23:01:37 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) client-ip=209.132.183.28; envelope-from=libvir-list-bounces@redhat.com; helo=mx1.redhat.com; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 1527842790806850.3530843256293; Fri, 1 Jun 2018 01:46:30 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx11.intmail.prod.int.phx2.redhat.com [10.5.11.26]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id BA84A30D299B; Fri, 1 Jun 2018 08:46:28 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 8818C30012B7; Fri, 1 Jun 2018 08:46:28 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id 383B34CA84; Fri, 1 Jun 2018 08:46:28 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.rdu2.redhat.com [10.11.54.3]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id w518k8fS031921 for ; Fri, 1 Jun 2018 04:46:08 -0400 Received: by smtp.corp.redhat.com (Postfix) id 9DB3510F1BEC; Fri, 1 Jun 2018 08:46:08 +0000 (UTC) Received: from mamuti.net (ovpn-204-153.brq.redhat.com [10.40.204.153]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 7939D10F1BE9 for ; Fri, 1 Jun 2018 08:46:06 +0000 (UTC) Received: by mamuti.net (Postfix, from userid 500) id 1355B101FF0; Fri, 1 Jun 2018 10:46:05 +0200 (CEST) From: Jiri Denemark To: libvir-list@redhat.com Date: Fri, 1 Jun 2018 10:46:02 +0200 Message-Id: In-Reply-To: References: In-Reply-To: References: X-Scanned-By: MIMEDefang 2.78 on 10.11.54.3 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH 1/2] qemu: Report error on unexpected job stats type X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.84 on 10.5.11.26 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.40]); Fri, 01 Jun 2018 08:46:30 +0000 (UTC) X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" If we ever fail to properly set jobinfo->statsType, qemuDomainJobInfoToParams would return -1 without setting an error. Signed-off-by: Jiri Denemark --- src/qemu/qemu_domain.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/qemu/qemu_domain.c b/src/qemu/qemu_domain.c index 2c51e4c0d8..360379b26c 100644 --- a/src/qemu/qemu_domain.c +++ b/src/qemu/qemu_domain.c @@ -717,10 +717,12 @@ qemuDomainJobInfoToParams(qemuDomainJobInfoPtr jobInf= o, return qemuDomainDumpJobInfoToParams(jobInfo, type, params, nparam= s); =20 case QEMU_DOMAIN_JOB_STATS_TYPE_NONE: - break; + default: + virReportError(VIR_ERR_INTERNAL_ERROR, + _("unexpected type of job stats: %d"), + jobInfo->statsType); + return -1; } - - return -1; } =20 =20 --=20 2.17.1 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list From nobody Sun Apr 28 23:01:37 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) client-ip=209.132.183.28; envelope-from=libvir-list-bounces@redhat.com; helo=mx1.redhat.com; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 1527842775065473.83333323777504; Fri, 1 Jun 2018 01:46:15 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 5AE2AA0C12; Fri, 1 Jun 2018 08:46:13 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.20]) by smtp.corp.redhat.com (Postfix) with ESMTPS id E338917CC8; Fri, 1 Jun 2018 08:46:12 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id D0B861800FC1; Fri, 1 Jun 2018 08:46:11 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.rdu2.redhat.com [10.11.54.5]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id w518k80j031916 for ; Fri, 1 Jun 2018 04:46:08 -0400 Received: by smtp.corp.redhat.com (Postfix) id 707091C5B0; Fri, 1 Jun 2018 08:46:08 +0000 (UTC) Received: from mamuti.net (ovpn-204-153.brq.redhat.com [10.40.204.153]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 4D0AB8442C for ; Fri, 1 Jun 2018 08:46:06 +0000 (UTC) Received: by mamuti.net (Postfix, from userid 500) id 0FE0A100CC8; Fri, 1 Jun 2018 10:46:05 +0200 (CEST) From: Jiri Denemark To: libvir-list@redhat.com Date: Fri, 1 Jun 2018 10:46:03 +0200 Message-Id: <1ccdefc543f7cce66f8929320faba6dc3b6cb201.1527842720.git.jdenemar@redhat.com> In-Reply-To: References: In-Reply-To: References: X-Scanned-By: MIMEDefang 2.79 on 10.11.54.5 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH 2/2] qemu: Fix reporting completed migration stats on destination X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.39]); Fri, 01 Jun 2018 08:46:14 +0000 (UTC) X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" 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=3D1584071 Signed-off-by: Jiri Denemark --- src/qemu/qemu_migration.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/qemu/qemu_migration.c b/src/qemu/qemu_migration.c index 68663eac47..70616b568e 100644 --- a/src/qemu/qemu_migration.c +++ b/src/qemu/qemu_migration.c @@ -5160,6 +5160,7 @@ qemuMigrationDstFinish(virQEMUDriverPtr driver, if (jobInfo) { VIR_STEAL_PTR(priv->job.completed, jobInfo); priv->job.completed->status =3D QEMU_DOMAIN_JOB_STATUS_COMPLET= ED; + priv->job.completed->statsType =3D QEMU_DOMAIN_JOB_STATS_TYPE_= MIGRATION; } =20 if (qemuMigrationBakeCookie(mig, driver, vm, --=20 2.17.1 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list