From nobody Sun May 5 08:40:21 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 ARC-Seal: i=1; a=rsa-sha256; t=1561038681; cv=none; d=zoho.com; s=zohoarc; b=KraUu0RoIzDrWjKS/GtfjFClpkHtPNGUGhsOd1z6RIn5GIuG7scwetB06KRyIvtl+lbCSIl1lfjQsUaJfsGz4PPYHsGPdjZCn6EtDSZGkPrTVAgz3+kzCgF5jXUqkUsqZXVtgkzn2dRm5H8E9pmDHPsbzmScRd5n5nAt4v97dbM= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1561038681; h=Content-Type:Content-Transfer-Encoding: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=jAD1GSBHoi/7qnoiPiQaESa47Fty4xAISa/H4A1Rw0Y=; b=UIOGuGyRzk5WLyAzughnRILRKimUHY4/Lhhwgxz1/Knf27DUW41jwQ+ZSa5A6/AIunNjqD6f2S/IUVI98R5AJ5rT3hD7QxNp0Jo0KPvhDDGjtP3pJDF0XLZthgsJFsCHobr14VhrryEkEV+vzA2IY0W52NnmntjRhnpbaWlf4f0= 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 15610386818451011.0198434754766; Thu, 20 Jun 2019 06:51:21 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 2C33430C1CC0; Thu, 20 Jun 2019 13:51:18 +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 079C45D96E; Thu, 20 Jun 2019 13:51:17 +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 BA6D5206D2; Thu, 20 Jun 2019 13:51:15 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id x5KDpBB4000998 for ; Thu, 20 Jun 2019 09:51:11 -0400 Received: by smtp.corp.redhat.com (Postfix) id 9DDF55C221; Thu, 20 Jun 2019 13:51:11 +0000 (UTC) Received: from angien.brq.redhat.com (unknown [10.43.2.229]) by smtp.corp.redhat.com (Postfix) with ESMTP id 02B335C1A1; Thu, 20 Jun 2019 13:51:10 +0000 (UTC) From: Peter Krempa To: libvir-list@redhat.com Date: Thu, 20 Jun 2019 15:51:03 +0200 Message-Id: In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH 1/3] docs: snapshot: Encourage people ot use disk 'target' to refer to disks 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.14 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.46]); Thu, 20 Jun 2019 13:51:18 +0000 (UTC) Content-Type: text/plain; charset="utf-8" Change the example and add a recommendation to use disk target rather than path. Signed-off-by: Peter Krempa Reviewed-by: Martin Kletzander --- docs/formatsnapshot.html.in | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/formatsnapshot.html.in b/docs/formatsnapshot.html.in index 1bbbf06205..a19e91b4d5 100644 --- a/docs/formatsnapshot.html.in +++ b/docs/formatsnapshot.html.in @@ -140,8 +140,8 @@
This sub-element describes the snapshot properties of a specific disk. The attribute name is mandatory, and must match either the <target - dev=3D'name'/> or an unambiguous <source - file=3D'name'/> of one of + dev=3D'name'/> (recommended) or an unambiguous + <source file=3D'name'/> of one of the disk devices specified for the domain at the time of the snapshot. The attribute snapshot is @@ -255,7 +255,7 @@ <domainsnapshot> <description>Snapshot of OS install and updates</description> <disks> - <disk name=3D'/path/to/old'> + <disk name=3D'vda'> <source file=3D'/path/to/new'/> </disk> <disk name=3D'vdb' snapshot=3D'no'/> --=20 2.21.0 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list From nobody Sun May 5 08:40:21 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 ARC-Seal: i=1; a=rsa-sha256; t=1561038678; cv=none; d=zoho.com; s=zohoarc; b=KpbZ5a3t6n40yGVWLFrUtRNmYQHnLgBlv2INNGE3ZjtgVUl6obaiEp2lDSW4HQ0UBw/bhAoyGPj17QGOc9NwD6M6epJPm6iVN4c7avqIZaaijShRzArCGaGkZrKHPPolNcABF1ofdV/jFWOejD2+uxpU3usxvW9VTMjmgvMPA8g= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1561038678; h=Content-Type:Content-Transfer-Encoding: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=yEVkWD1i/Vnk6L34NpTvNRRxRimOs6Vwz1uqs9OeaDk=; b=YI5vAYT3b/GzfLiGqdyCsTyY/QfloBax7ZN+I+CWxsRcV8xwiVGYcJxlUlSt2gqB/hRt1VfTJNAhMQtB4L8Bvr+gSs8Hv0gfi14gz8S5ww3yMf2Q1UBtvzlg9hPOhE3a2+PFghDRM5kqzbdDaO+SUcjFkPmwm+smp7FjGbCgfIs= 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 1561038678642959.0686722424985; Thu, 20 Jun 2019 06:51:18 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 9C0B530C0DEA; Thu, 20 Jun 2019 13:51:16 +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 73F0C5D71C; Thu, 20 Jun 2019 13:51:16 +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 3701C1806B12; Thu, 20 Jun 2019 13:51:15 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id x5KDpCEk001006 for ; Thu, 20 Jun 2019 09:51:12 -0400 Received: by smtp.corp.redhat.com (Postfix) id 8E7ED5C221; Thu, 20 Jun 2019 13:51:12 +0000 (UTC) Received: from angien.brq.redhat.com (unknown [10.43.2.229]) by smtp.corp.redhat.com (Postfix) with ESMTP id E8BA55C1A1; Thu, 20 Jun 2019 13:51:11 +0000 (UTC) From: Peter Krempa To: libvir-list@redhat.com Date: Thu, 20 Jun 2019 15:51:04 +0200 Message-Id: <2dd3c868a6af335cd1b3a75de2e3efaba4616527.1561038533.git.pkrempa@redhat.com> In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH 2/3] docs: schemas: Add 'seclabel' for external disk snapshot 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.15 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.45]); Thu, 20 Jun 2019 13:51:17 +0000 (UTC) Content-Type: text/plain; charset="utf-8" Allow using seclabels the same way as disk images allow it. Currently the snapshot code copies the seclabels from the original image if no seclabel is provided. Also there's no code change required as the snapshot XML parser actually uses parts of the disk parser thus seclabels are already parsed and formatted and even applied thus this is just a formalization of our support for this. Signed-off-by: Peter Krempa Reviewed-by: Martin Kletzander --- docs/formatsnapshot.html.in | 12 ++++++++++++ docs/schemas/domainsnapshot.rng | 6 ++++++ .../{disk-seclabel-invalid.xml =3D> disk-seclabel.xml} | 0 3 files changed, 18 insertions(+) rename tests/domainsnapshotxml2xmlin/{disk-seclabel-invalid.xml =3D> disk-= seclabel.xml} (100%) diff --git a/docs/formatsnapshot.html.in b/docs/formatsnapshot.html.in index a19e91b4d5..92cc566467 100644 --- a/docs/formatsnapshot.html.in +++ b/docs/formatsnapshot.html.in @@ -170,6 +170,12 @@ snapshots, the original file name becomes the read-only snapshot, and the new file name contains the read-write delta of all disk changes since the snapshot. +

+ The source element also may contain the + seclabel element (described in the + domain XML documentat= ion) + which can be used to override the domain security labeling p= olicy + for source.

driver
An optional sub-element driver, @@ -177,6 +183,7 @@ as qcow2), of the new file created by the external snapshot of the new file.
+
seclabel
Since 1.2.2 the disk= element @@ -259,6 +266,11 @@ <source file=3D'/path/to/new'/> </disk> <disk name=3D'vdb' snapshot=3D'no'/> + <disk name=3D'vdc'> + <source file=3D'/path/to/newc'> + <seclabel model=3D'dac' relabel=3D'no'/> + </source> + </disk> </disks> </domainsnapshot> diff --git a/docs/schemas/domainsnapshot.rng b/docs/schemas/domainsnapshot.= rng index 8863d99578..8e39feb229 100644 --- a/docs/schemas/domainsnapshot.rng +++ b/docs/schemas/domainsnapshot.rng @@ -157,6 +157,9 @@ + + + @@ -173,6 +176,9 @@ + + + diff --git a/tests/domainsnapshotxml2xmlin/disk-seclabel-invalid.xml b/test= s/domainsnapshotxml2xmlin/disk-seclabel.xml similarity index 100% rename from tests/domainsnapshotxml2xmlin/disk-seclabel-invalid.xml rename to tests/domainsnapshotxml2xmlin/disk-seclabel.xml --=20 2.21.0 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list From nobody Sun May 5 08:40:21 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 ARC-Seal: i=1; a=rsa-sha256; t=1561038697; cv=none; d=zoho.com; s=zohoarc; b=VFuf/tebs4nwgVr9syb1m2IO8ai9hwogNweOhfe20cIts44ZVCdaO/8x6B828aKcgi4JMBR3dIdYLqSd6ktpP66bGwDPOBsh6IesJ+km2b03xatvHQpDrisaYMKDS0PWmyP8cD4fgG0QSXYVXk91M0jbIYVILsoXzyUqstVMH0U= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1561038697; h=Content-Type:Content-Transfer-Encoding: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=vPZtthgEjipqS0XLt8jXKJTNmGnMahDthSju5P1k+ik=; b=GVa8/QvNti3cgz9ZGR5SvfnVklRJb/ZOnXKV1QexUNGIhDU1f2MvKAlvNCixhZEZW+K2MhxHEYcSAU4t2teE6r1ENmosu7uIqhNnZ8jycTUwt7gUBJWoW15eR0Q7jH1dXyEHIAPvBXFbOVKg6kx0BWLq3sqhubdoeMinuN2NmeY= 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 1561038697215460.0148411127674; Thu, 20 Jun 2019 06:51:37 -0700 (PDT) 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 mx1.redhat.com (Postfix) with ESMTPS id 8A2267E422; Thu, 20 Jun 2019 13:51:35 +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 6180D60BE0; Thu, 20 Jun 2019 13:51:35 +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 225541806B15; Thu, 20 Jun 2019 13:51:35 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id x5KDpD4b001015 for ; Thu, 20 Jun 2019 09:51:13 -0400 Received: by smtp.corp.redhat.com (Postfix) id 80E0C5C22B; Thu, 20 Jun 2019 13:51:13 +0000 (UTC) Received: from angien.brq.redhat.com (unknown [10.43.2.229]) by smtp.corp.redhat.com (Postfix) with ESMTP id DA3845C1A1; Thu, 20 Jun 2019 13:51:12 +0000 (UTC) From: Peter Krempa To: libvir-list@redhat.com Date: Thu, 20 Jun 2019 15:51:05 +0200 Message-Id: <77a015214dfbca8e507b1e1077ef310d2e71aea3.1561038533.git.pkrempa@redhat.com> In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH 3/3] tests: domainsnapshotxml2xml: make 'disk-seclabel' test operational 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.12 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.27]); Thu, 20 Jun 2019 13:51:36 +0000 (UTC) Content-Type: text/plain; charset="utf-8" Now that we added the seclabels to the schema we can test that they are parsed and formatted correctly. Signed-off-by: Peter Krempa Reviewed-by: Martin Kletzander --- tests/domainsnapshotxml2xmlout/disk-seclabel.xml | 15 +++++++++++++++ tests/domainsnapshotxml2xmltest.c | 1 + 2 files changed, 16 insertions(+) create mode 100644 tests/domainsnapshotxml2xmlout/disk-seclabel.xml diff --git a/tests/domainsnapshotxml2xmlout/disk-seclabel.xml b/tests/domai= nsnapshotxml2xmlout/disk-seclabel.xml new file mode 100644 index 0000000000..989cfc4964 --- /dev/null +++ b/tests/domainsnapshotxml2xmlout/disk-seclabel.xml @@ -0,0 +1,15 @@ + + my snap name + !@#$%^ + 581484660 + + + + + + + + + 9d37b878-a7cc-9f9a-b78f-49b3abad25a8 + + diff --git a/tests/domainsnapshotxml2xmltest.c b/tests/domainsnapshotxml2xm= ltest.c index c2c7bedb56..c34ab0bc89 100644 --- a/tests/domainsnapshotxml2xmltest.c +++ b/tests/domainsnapshotxml2xmltest.c @@ -183,6 +183,7 @@ mymain(void) DO_TEST_INOUT("external_vm", NULL, 1555419243, 0); DO_TEST_INOUT("disk_snapshot", NULL, 1555419243, 0); DO_TEST_INOUT("disk_driver_name_null", NULL, 1555419243, 0); + DO_TEST_INOUT("disk-seclabel", "9d37b878-a7cc-9f9a-b78f-49b3abad25a8",= 581484660, 0); DO_TEST_IN("name_and_description", NULL); DO_TEST_IN("description_only", NULL); --=20 2.21.0 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list