From nobody Fri Nov 21 10:12:04 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.libvirt.org designates 8.43.85.245 as permitted sender) client-ip=8.43.85.245; envelope-from=devel-bounces@lists.libvirt.org; helo=lists.libvirt.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of lists.libvirt.org designates 8.43.85.245 as permitted sender) smtp.mailfrom=devel-bounces@lists.libvirt.org; dmarc=pass(p=reject dis=none) header.from=lists.libvirt.org ARC-Seal: i=1; a=rsa-sha256; t=1762515105; cv=none; d=zohomail.com; s=zohoarc; b=QJ+uLmfnyXdDzq0tAJgtfWMzJHDLiPALyErj1V2NtC2Yw+zMkmc/dIrMg74q1YhXLbuhYGpmdG3G7ee8yBd052x8qN2OlRoX/IeNXWvIwlbravUCmm6Kmlmjj5W4KhdJd7IPwZpOx86Dol9zDubNyE+36GL0GZlKawxShEOOBIg= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1762515105; h=Content-Type:Content-Transfer-Encoding:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Owner:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:Reply-To:References:Subject:Subject:To:To:Message-Id:Cc; bh=CRFp1r9WWQGseXjAxG3FhQET2Pteg9tynHJsKa55yhw=; b=iRbI2feSChMVannpiIEYBdpVARsAFYlGBpPh8euTRjI3vKzUx+uCNi6zzDX/Oweqr4n3D52iAlTc+nWqCrkphbDlgLVCuepi3PjEBct/pqMY8OeZ958W9RtxyIOX77n5jI6oydjOYjRLgasYX6RTu3V4rIJ7JsgVD+O0wv3vG/Y= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of lists.libvirt.org designates 8.43.85.245 as permitted sender) smtp.mailfrom=devel-bounces@lists.libvirt.org; dmarc=pass header.from= (p=reject dis=none) Return-Path: Received: from lists.libvirt.org (lists.libvirt.org [8.43.85.245]) by mx.zohomail.com with SMTPS id 1762515105829610.8419399071435; Fri, 7 Nov 2025 03:31:45 -0800 (PST) Received: by lists.libvirt.org (Postfix, from userid 993) id 26F54446DA; Fri, 7 Nov 2025 06:31:45 -0500 (EST) Received: from [172.19.199.29] (lists.libvirt.org [8.43.85.245]) by lists.libvirt.org (Postfix) with ESMTP id 4C7474478C; Fri, 7 Nov 2025 06:26:55 -0500 (EST) Received: by lists.libvirt.org (Postfix, from userid 993) id E8F9B41AB5; Fri, 7 Nov 2025 06:25:10 -0500 (EST) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (3072 bits) server-digest SHA256) (No client certificate requested) by lists.libvirt.org (Postfix) with ESMTPS id 50B1944049 for ; Fri, 7 Nov 2025 06:25:08 -0500 (EST) Received: from mx-prod-mc-06.mail-002.prod.us-west-2.aws.redhat.com (ec2-35-165-154-97.us-west-2.compute.amazonaws.com [35.165.154.97]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-577-JpyT_uLBM1qsOIVAR7Ty8w-1; Fri, 07 Nov 2025 06:25:06 -0500 Received: from mx-prod-int-08.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-08.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.111]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-06.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id D146C180034A for ; Fri, 7 Nov 2025 11:25:05 +0000 (UTC) Received: from moe (unknown [10.43.3.236]) by mx-prod-int-08.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 2790918002A6 for ; Fri, 7 Nov 2025 11:25:04 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-26) on lists.libvirt.org X-Spam-Level: X-Spam-Status: No, score=-5.0 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,RCVD_IN_VALIDITY_RPBL_BLOCKED, RCVD_IN_VALIDITY_SAFE_BLOCKED,SPF_PASS autolearn=unavailable autolearn_force=no version=4.0.1 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1762514708; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=CRFp1r9WWQGseXjAxG3FhQET2Pteg9tynHJsKa55yhw=; b=QEIAJy0U141O9fts3Hf4FsXnmO55oCLeA5uF6OhW1QWpOZUfMIZ7aF50JTKZyfm8MDiq8f 0QLHLlVdiVru5RaywAmXsjYm606qGHxJAkstDjo89yOrlkBe6aT5ToFNrnfLh8XQ0/KgFM LDdCpWxo50JENS2I088mN9nRJpFNp5w= X-MC-Unique: JpyT_uLBM1qsOIVAR7Ty8w-1 X-Mimecast-MFC-AGG-ID: JpyT_uLBM1qsOIVAR7Ty8w_1762514706 To: devel@lists.libvirt.org Subject: [PATCH 3/5] ch: Set transient domain definition Date: Fri, 7 Nov 2025 12:24:57 +0100 Message-ID: In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.4.1 on 10.30.177.111 X-Mimecast-Spam-Score: 0 X-Mimecast-MFC-PROC-ID: sS7EpYdBNNpSdTf_m1Bh14_d7mgNPkP5S4GkKtaStu0_1762514706 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable Message-ID-Hash: IDZA7MMXQ6GQ7IYXXZSTTRWQ7NG5WXSK X-Message-ID-Hash: IDZA7MMXQ6GQ7IYXXZSTTRWQ7NG5WXSK X-MailFrom: mprivozn@redhat.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; loop; banned-address; header-match-devel.lists.libvirt.org-0; emergency; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.10 Precedence: list List-Id: Development discussions about the libvirt library & tools Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: From: Michal Privoznik via Devel Reply-To: Michal Privoznik X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZM-MESSAGEID: 1762515108089154100 Content-Type: text/plain; charset="utf-8"; x-default="true" From: Michal Privoznik Libvirt's philosophy is that for a running domain there are two (in general distinct) definitions: live definition (reflects the running state) and inactive definition (used to seed the live definition when domain is being created). That's why we have VIR_DOMAIN_AFFECT_LIVE and VIR_DOMAIN_AFFECT_CONFIG flags to APIs that modify domain definitions. Well, the CH driver doesn't do this distinction. Fix this by making the domain definition transient when it's being created. Signed-off-by: Michal Privoznik --- src/ch/ch_process.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/ch/ch_process.c b/src/ch/ch_process.c index 4ebb261805..f16f2b3916 100644 --- a/src/ch/ch_process.c +++ b/src/ch/ch_process.c @@ -951,6 +951,10 @@ virCHProcessStart(virCHDriver *driver, return -1; } =20 + VIR_DEBUG("Setting current domain def as transient"); + if (virDomainObjSetDefTransient(driver->xmlopt, vm, NULL) < 0) + return -1; + VIR_DEBUG("Creating domain log file for %s domain", vm->def->name); if (!(logCtxt =3D domainLogContextNew(cfg->stdioLogD, cfg->logDir, CH_DRIVER_NAME, @@ -1100,6 +1104,7 @@ virCHProcessStop(virCHDriver *driver, virHostdevReAttachDomainDevices(driver->hostdevMgr, CH_DRIVER_NAME, de= f, hostdev_flags); =20 + virDomainObjRemoveTransientDef(vm); virErrorRestore(&orig_err); return 0; } --=20 2.51.0