From nobody Tue Apr 30 14:26:43 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 216.205.24.124 as permitted sender) client-ip=216.205.24.124; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-delivery-124.mimecast.com; Authentication-Results: mx.zohomail.com; spf=pass (zohomail.com: domain of redhat.com designates 216.205.24.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=fail(p=none dis=none) header.from=yadro.com Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [216.205.24.124]) by mx.zohomail.com with SMTPS id 162507145026171.36688773491574; Wed, 30 Jun 2021 09:44:10 -0700 (PDT) Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-215-LYHaWQgvM2yTJJ-4W3PAlQ-1; Wed, 30 Jun 2021 12:44:07 -0400 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id BECFB804142; Wed, 30 Jun 2021 16:44:00 +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 094C960C17; Wed, 30 Jun 2021 16:44:00 +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 8AE7E4EA2A; Wed, 30 Jun 2021 16:43:55 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.rdu2.redhat.com [10.11.54.6]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 15UGMIS2023091 for ; Wed, 30 Jun 2021 12:22:18 -0400 Received: by smtp.corp.redhat.com (Postfix) id 0B74C202875D; Wed, 30 Jun 2021 16:22:18 +0000 (UTC) Received: from mimecast-mx02.redhat.com (mimecast01.extmail.prod.ext.rdu2.redhat.com [10.11.55.17]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 069672028759 for ; Wed, 30 Jun 2021 16:22:13 +0000 (UTC) Received: from us-smtp-1.mimecast.com (us-smtp-1.mimecast.com [205.139.110.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id C38AD857AAA for ; Wed, 30 Jun 2021 16:22:13 +0000 (UTC) Received: from mta-01.yadro.com (mta-02.yadro.com [89.207.88.252]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-594--irZRIWtNEGSTI-VPXeN6Q-1; Wed, 30 Jun 2021 12:22:10 -0400 Received: from localhost (unknown [127.0.0.1]) by mta-01.yadro.com (Postfix) with ESMTP id F002845C91 for ; Wed, 30 Jun 2021 16:16:37 +0000 (UTC) Received: from mta-01.yadro.com ([127.0.0.1]) by localhost (mta-01.yadro.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id FLxl6GIDf2YZ for ; Wed, 30 Jun 2021 19:16:36 +0300 (MSK) Received: from T-EXCH-03.corp.yadro.com (t-exch-03.corp.yadro.com [172.17.100.103]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by mta-01.yadro.com (Postfix) with ESMTPS id 954A746226 for ; Wed, 30 Jun 2021 19:16:36 +0300 (MSK) Received: from localhost (172.17.128.60) by T-EXCH-03.corp.yadro.com (172.17.100.103) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.669.32; Wed, 30 Jun 2021 19:16:36 +0300 X-MC-Unique: LYHaWQgvM2yTJJ-4W3PAlQ-1 X-MC-Unique: -irZRIWtNEGSTI-VPXeN6Q-1 X-Virus-Scanned: amavisd-new at yadro.com From: Roman Bolshakov To: Subject: [PATCH] lib: Specify domain redefinition requirements Date: Wed, 30 Jun 2021 19:16:33 +0300 Message-ID: <20210630161633.37591-1-r.bolshakov@yadro.com> MIME-Version: 1.0 X-Originating-IP: [172.17.128.60] X-ClientProxiedBy: T-EXCH-01.corp.yadro.com (172.17.10.101) To T-EXCH-03.corp.yadro.com (172.17.100.103) X-Mimecast-Impersonation-Protect: Policy=CLT - Impersonation Protection Definition; Similar Internal Domain=false; Similar Monitored External Domain=false; Custom External Domain=false; Mimecast External Domain=false; Newly Observed Domain=false; Internal User Name=false; Custom Display Name List=false; Reply-to Address Mismatch=false; Targeted Threat Dictionary=false; Mimecast Threat Dictionary=false; Custom Threat Dictionary=false X-Scanned-By: MIMEDefang 2.78 on 10.11.54.6 X-MIME-Autoconverted: from quoted-printable to 8bit by lists01.pubmisc.prod.ext.phx2.redhat.com id 15UGMIS2023091 X-loop: libvir-list@redhat.com Cc: Roman Bolshakov 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: , Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=libvir-list-bounces@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" There might be misunderstanding [1] when libvirt permits domain redefinition and if it's a valid case at all. 1. https://github.com/ansible-collections/community.libvirt/blob/b973d7c4b4= 05818b9fe77bbb0432c67acc12e82f/plugins/modules/virt.py#L533 Signed-off-by: Roman Bolshakov Reviewed-by: Michal Privoznik --- src/libvirt-domain.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/libvirt-domain.c b/src/libvirt-domain.c index 750e32f0ca..e48f3cdb02 100644 --- a/src/libvirt-domain.c +++ b/src/libvirt-domain.c @@ -6290,8 +6290,8 @@ virDomainGetBlockInfo(virDomainPtr domain, const char= *disk, * * Define a domain, but does not start it. * This definition is persistent, until explicitly undefined with - * virDomainUndefine(). A previous definition for this domain would be - * overridden if it already exists. + * virDomainUndefine(). A previous definition for this domain with the same + * UUID and name would be overridden if it already exists. * * virDomainFree should be used to free the resources after the * domain object is no longer needed. @@ -6333,8 +6333,8 @@ virDomainDefineXML(virConnectPtr conn, const char *xm= l) * * Defines a domain, but does not start it. * This definition is persistent, until explicitly undefined with - * virDomainUndefine(). A previous definition for this domain would be - * overridden if it already exists. + * virDomainUndefine(). A previous definition for this domain with the same + * UUID and name would be overridden if it already exists. * * virDomainFree should be used to free the resources after the * domain object is no longer needed. --=20 2.32.0