From nobody Mon Feb 9 02:12:55 2026 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 ARC-Seal: i=1; a=rsa-sha256; t=1563947780; cv=none; d=zoho.com; s=zohoarc; b=cNMMz7w2Onj2cg6rxvuY93zdW7MX1I1hiFWVHeJZXmt7KO87rV8l5+KbGcyuG9LULpODXKoj6E8yrSt9WJGIgW+SU7Zw2rSNuR0EXwq+F1f07t0+qmHxf/z4UkyDE6jZan3LYAknku/wu5Pkjy+z4O4TmKRirnUSDt0BASqyJlc= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1563947780; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To:ARC-Authentication-Results; bh=n6ouKwcdRm0fVrb/KZYoc4wrdOuAsSge5ZH3cEXS4sA=; b=Gj/8VKJxtYhGILKYGYHuIZk/rKUcepUGsGXR37MZQUw2CRKhAy+m4i0pk5TU7TrjlKBbsB0OxDKXfN1Msph1ZIdslP5b7Cba78B3HToKTxJ9X5cCHxSGIKC7PxU4LpcM5d8FGkxMKT1/Crc4Lc1gNoaq7mah9KoN9ho9w8y4QjE= ARC-Authentication-Results: i=1; mx.zoho.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 header.from= (p=none dis=none) header.from= Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 1563947780240374.78717334469457; Tue, 23 Jul 2019 22:56:20 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id BFC6E81F1B; Wed, 24 Jul 2019 05:56:18 +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 8F6E76012D; Wed, 24 Jul 2019 05:56:18 +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 E7C621800208; Wed, 24 Jul 2019 05:56:16 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id x6O5uDM5029093 for ; Wed, 24 Jul 2019 01:56:13 -0400 Received: by smtp.corp.redhat.com (Postfix) id DD47D60BF7; Wed, 24 Jul 2019 05:56:13 +0000 (UTC) Received: from blue.redhat.com (ovpn-116-93.phx2.redhat.com [10.3.116.93]) by smtp.corp.redhat.com (Postfix) with ESMTP id 6D37760BEC; Wed, 24 Jul 2019 05:56:13 +0000 (UTC) From: Eric Blake To: libvir-list@redhat.com Date: Wed, 24 Jul 2019 00:55:52 -0500 Message-Id: <20190724055609.30691-3-eblake@redhat.com> In-Reply-To: <20190724055609.30691-1-eblake@redhat.com> References: <20190724055609.30691-1-eblake@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 X-loop: libvir-list@redhat.com Cc: nsoffer@redhat.com, eshenitz@redhat.com, pkrempa@redhat.com Subject: [libvirt] [PATCH v10 02/19] snapshot: Saner error message for duplicate create 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: , 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.11 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.27]); Wed, 24 Jul 2019 05:56:19 +0000 (UTC) Content-Type: text/plain; charset="utf-8" Any message that is easy to trigger (as evidenced by the testsuite update) should not use 'internal error' as its category. Signed-off-by: Eric Blake Reviewed-by: Daniel P. Berrang=C3=A9 --- src/conf/virdomainmomentobjlist.c | 4 ++-- tests/virsh-snapshot | 3 +++ 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/src/conf/virdomainmomentobjlist.c b/src/conf/virdomainmomentob= jlist.c index 5c147bdbbf..c8dd8f8e01 100644 --- a/src/conf/virdomainmomentobjlist.c +++ b/src/conf/virdomainmomentobjlist.c @@ -242,8 +242,8 @@ virDomainMomentAssignDef(virDomainMomentObjListPtr mome= nts, virDomainMomentObjPtr moment; if (virHashLookup(moments->objs, def->name) !=3D NULL) { - virReportError(VIR_ERR_INTERNAL_ERROR, - _("unexpected domain moment %s already exists"), + virReportError(VIR_ERR_OPERATION_FAILED, + _("domain moment %s already exists"), def->name); return NULL; } diff --git a/tests/virsh-snapshot b/tests/virsh-snapshot index 510904f470..c31da52ef9 100755 --- a/tests/virsh-snapshot +++ b/tests/virsh-snapshot @@ -34,6 +34,7 @@ $abs_top_builddir/tools/virsh --connect test:///default >= out 2>err ' # Create a series of snapshots, with names that intentionally sort # differently by topology than by name. Use revert to create fanout. snapshot-create-as test s1 + snapshot-create-as test s1 snapshot-create-as test s3 snapshot-create-as test s2 snapshot-revert test s3 @@ -90,6 +91,7 @@ sed -n '/MarkerB/,/MarkerC/p' < out > s2.xml || fail=3D1 cat <<\EOF > exp || fail=3D1 Domain snapshot s1 created + Domain snapshot s3 created Domain snapshot s2 created @@ -171,6 +173,7 @@ EOF compare exp out.cooked || fail=3D1 cat < exp || fail=3D1 +error: operation failed: domain moment s1 already exists error: marker error: domain 'test' has no current snapshot error: marker --=20 2.20.1 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list