From nobody Sun May 5 15:52:22 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; dkim=fail; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 1512013269181302.16583169724595; Wed, 29 Nov 2017 19:41:09 -0800 (PST) Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 228EDC0587C0; Thu, 30 Nov 2017 03:41:07 +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 35F7B5C888; Thu, 30 Nov 2017 03:41:05 +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 AE459180474A; Thu, 30 Nov 2017 03:41:01 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id vAU3f07f023834 for ; Wed, 29 Nov 2017 22:41:00 -0500 Received: by smtp.corp.redhat.com (Postfix) id 1FC0A600D5; Thu, 30 Nov 2017 03:41:00 +0000 (UTC) Received: from mx1.redhat.com (ext-mx02.extmail.prod.ext.phx2.redhat.com [10.5.110.26]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 1B145600D1 for ; Thu, 30 Nov 2017 03:40:57 +0000 (UTC) Received: from m15-112.126.com (m15-112.126.com [220.181.15.112]) by mx1.redhat.com (Postfix) with ESMTP id B96287CB84 for ; Thu, 30 Nov 2017 03:40:50 +0000 (UTC) Received: from localhost.localdomain (unknown [58.213.111.46]) by smtp2 (Coremail) with SMTP id DMmowAC3Hjtpdh9ap+k5BA--.5195S2; Thu, 30 Nov 2017 11:09:37 +0800 (CST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=126.com; s=s110527; h=From:Subject:Date:Message-Id; bh=wy5BoNG0thhT1AyrW4 rbA2uGQVThDFcN0g334hwtBKY=; b=TuXakUxe/b3R2XqRBBQVSGJwqgrx5HTLLL BqME8Ymu2dMZZUckltvlePRdbNwXY57HXcGs0T1vqQsNZwrkQIi4XI9Fn7jQ7sUn 26Nxu7h+U0k2An6go4xvLX1Cv6q4bSV2DgHYusuWipoq58n67VFkAQPr7+lvgweG IAG1usqJU= From: Chen Hanxiao To: libvir-list@redhat.com Date: Thu, 30 Nov 2017 11:08:13 +0800 Message-Id: <20171130030813.20238-1-chen_han_xiao@126.com> X-CM-TRANSID: DMmowAC3Hjtpdh9ap+k5BA--.5195S2 X-Coremail-Antispam: 1Uf129KBjvdXoWrtFyUZr48AF1rCF18JF1DWrg_yoWfuFX_A3 40yw1kGrW5JrnrCa9F9F13Aw48Xwn5Gr48Ga1kKrZxKrW5Cr4rGa1xZ398ur1DXFWakryx WFnYvFWkA3s7XjkaLaAFLSUrUUUUUb8apTn2vfkv8UJUUUU8Yxn0WfASr-VFAUDa7-sFnT 9fnUUvcSsGvfC2KfnxnUUI43ZEXa7IUjCtC7UUUUU== X-Originating-IP: [58.213.111.46] X-CM-SenderInfo: xfkh0spkdqs5xldrqiyswou0bp/1tbitBKgrlUJe3DEsQAAsK X-Greylist: Delayed for 00:31:13 by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.26]); Thu, 30 Nov 2017 03:40:56 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.26]); Thu, 30 Nov 2017 03:40:56 +0000 (UTC) for IP:'220.181.15.112' DOMAIN:'m15-112.126.com' HELO:'m15-112.126.com' FROM:'chen_han_xiao@126.com' RCPT:'' X-RedHat-Spam-Score: 1.99 * (DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, FREEMAIL_FROM, RCVD_IN_PSBL, SPF_PASS, T_RP_MATCHES_RCVD) 220.181.15.112 m15-112.126.com 220.181.15.112 m15-112.126.com X-Scanned-By: MIMEDefang 2.78 on 10.5.110.26 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-loop: libvir-list@redhat.com Cc: Chen Hanxiao Subject: [libvirt] [PATCH] qemu_agent: report VIR_ERR_AGENT_UNSYNCED if guest_sync failed. 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.79 on 10.5.11.16 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.32]); Thu, 30 Nov 2017 03:41:08 +0000 (UTC) X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZohoMail: RDKM_2 RSF_0 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" From: Chen Hanxiao Commit 5e5019bf removed this kind of error. But we've already protected race condition by qemuDomainObjEnterAgent, it was very unlikely to revieve a sync from other calls. For call from virDomain*, it's better to show this error if we really got a mismatch sync. Signed-off-by: Chen Hanxiao --- src/qemu/qemu_agent.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/qemu/qemu_agent.c b/src/qemu/qemu_agent.c index 5d125c413..cdcacf5c8 100644 --- a/src/qemu/qemu_agent.c +++ b/src/qemu/qemu_agent.c @@ -354,7 +354,9 @@ qemuAgentIOProcessLine(qemuAgentPtr mon, if (msg->id !=3D id) { VIR_DEBUG("Guest agent returned ID: %llu instead of %l= lu", id, msg->id); - ret =3D 0; + virReportError(VIR_ERR_AGENT_UNSYNCED, + _("Guest agent returned ID: %llu " + "instead of %llu"), id, msg->id); goto cleanup; } } --=20 2.14.3 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list