From nobody Fri May 3 10:18:55 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 207.211.31.120 as permitted sender) client-ip=207.211.31.120; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-1.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 207.211.31.120 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=1586856332; cv=none; d=zohomail.com; s=zohoarc; b=bmjeTmGRGQZfC2ohqSl691FYQXs4x43jY58gOG4qoPK+1aGJYI66sItM/zySoiBrFy7Zfp7ZxKgHebTSUklJW1QLl22sD+yqrBslF1MvvS6MJ9AuO+s9G7ffyOiQDngKQZSTz3FBrtMxMGsyfClWNStRWfEyZryidKS8doIsSyE= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1586856332; 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; bh=x5HktNrvuNyHFNvQfoKwNdlskERZQCtml4whrSfQkr8=; b=BAwT2dcM5LZUjgsqdXYyQKQnHReylUP0MHf+NhSo5i252mJ5ApJ8BQziznpfKXnAKp3kVDQ5BjvEAbAVyLLh1SykfbZq0ZwcjZlOm8zjmqRtXlcNJJ9RdYVl/oau5vbzNZEsKv9gbFF2T6kn8kGv9dBZNWDN0oVu2XiVtOCpPP4= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 207.211.31.120 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from us-smtp-1.mimecast.com (us-smtp-delivery-1.mimecast.com [207.211.31.120]) by mx.zohomail.com with SMTPS id 1586856332060658.5841137618544; Tue, 14 Apr 2020 02:25:32 -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-419-1YFCqp_XONqfVhvqNyTVIQ-1; Tue, 14 Apr 2020 05:25:28 -0400 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 mimecast-mx01.redhat.com (Postfix) with ESMTPS id 18F9218C8C12; Tue, 14 Apr 2020 09:25:21 +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 DA76C5C1B0; Tue, 14 Apr 2020 09:25:20 +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 6F836938E4; Tue, 14 Apr 2020 09:25:20 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 03E9MpdE018075 for ; Tue, 14 Apr 2020 05:22:51 -0400 Received: by smtp.corp.redhat.com (Postfix) id A7DC9271A3; Tue, 14 Apr 2020 09:22:51 +0000 (UTC) Received: from localhost.localdomain.com (unknown [10.40.208.94]) by smtp.corp.redhat.com (Postfix) with ESMTP id 1AEAE38F for ; Tue, 14 Apr 2020 09:22:48 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1586856330; h=from:from:sender:sender: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:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=x5HktNrvuNyHFNvQfoKwNdlskERZQCtml4whrSfQkr8=; b=bWSIt5BHNFxTOaUIAnpfFPzv328Ykl9a5+Fpcvxf+Krlug5gPoPz/R6I7hNYaEDbw7I6OW PCytAwBMK8wZ+2EEpTkt5XXa7Ep9uzrPHT2Hz/r6cJrV0vXRXGFtfyUA25D7Qr77leJEv+ GavKiUiYg7LVcDAtWuNfkIqBSJIofoE= X-MC-Unique: 1YFCqp_XONqfVhvqNyTVIQ-1 From: Peter Krempa To: libvir-list@redhat.com Subject: [PATCH 1/2] docs: backup: Remove references to push backup to network disk Date: Tue, 14 Apr 2020 11:22:43 +0200 Message-Id: In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 X-loop: libvir-list@redhat.com 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.16 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) Content-Type: text/plain; charset="utf-8" It was never implemented and for now I don't think there's demand to do it. Remove the reference. https://bugzilla.redhat.com/show_bug.cgi?id=3D1812100 Signed-off-by: Peter Krempa Reviewed-by: J=C3=A1n Tomko --- docs/formatbackup.html.in | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/docs/formatbackup.html.in b/docs/formatbackup.html.in index 55acd13ddc..87744bac98 100644 --- a/docs/formatbackup.html.in +++ b/docs/formatbackup.html.in @@ -97,12 +97,11 @@
type
A mandatory attribute to describe the type of the disk, except when backup=3D'no' is - used. Valid values include file, - block, or network. + used. Valid values include file, or + block. Similar to a disk declaration for a domain, the choice of = type controls what additional sub-elements are needed to descri= be - the destination (such as protocol for a - network destination).
+ the destination.
target
Valid only for push mode backups, this is the primary sub-element that describes the file name of --=20 2.26.0 From nobody Fri May 3 10:18:55 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 207.211.31.120 as permitted sender) client-ip=207.211.31.120; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-1.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 207.211.31.120 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=1586856278; cv=none; d=zohomail.com; s=zohoarc; b=SLW6eKLwE1w36mwExS6X83Pk8HEAefXFYbSDgp0rSXB5tfNyqfUai16PE7HAV0I2AqkjX2JPbzMEdq3J/jKBjRcU1xcA0QB4KEQSCzHvchXDNNYAk4ZvSREB5qK5T49hlwfKsvnPG85PUYYnrVPxLwRODWVP5VbNm4IsqgbDaJI= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1586856278; 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; bh=1B5q8mF516Pgp7MQZaX/DED4ypdtV1vdjare5WRpptM=; b=HIiL4kYrZRAYHirrMf2lP1qmAKeR1nr9qtOyvYR9kj/uayECrJ7rtGj/Phw5Xjs6Cw/lIZkI1kTgUKdMyI1QfVY9leFyWrWM48ksoO3ETkdoHoU/RKdgUaUs6pLi3z4WZ/r06gGVDaxOxjCu3T6ZVNyXiQSJ30VHYDcWqDE0NpA= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 207.211.31.120 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from us-smtp-1.mimecast.com (us-smtp-delivery-1.mimecast.com [207.211.31.120]) by mx.zohomail.com with SMTPS id 158685627827991.80065215327261; Tue, 14 Apr 2020 02:24:38 -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-125-nLIswmaCNei7FdpICnOD9g-1; Tue, 14 Apr 2020 05:24:34 -0400 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 694D01922020; Tue, 14 Apr 2020 09:24:29 +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 029E89F99D; Tue, 14 Apr 2020 09:24:28 +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 097CA180CB3B; Tue, 14 Apr 2020 09:24:26 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 03E9Ms1q018085 for ; Tue, 14 Apr 2020 05:22:54 -0400 Received: by smtp.corp.redhat.com (Postfix) id 5D974196AE; Tue, 14 Apr 2020 09:22:54 +0000 (UTC) Received: from localhost.localdomain.com (unknown [10.40.208.94]) by smtp.corp.redhat.com (Postfix) with ESMTP id 99BFB38F for ; Tue, 14 Apr 2020 09:22:51 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1586856277; h=from:from:sender:sender: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:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=1B5q8mF516Pgp7MQZaX/DED4ypdtV1vdjare5WRpptM=; b=iqkOWwbbcNhTBdnkrHJz9fqV47DRuHa0ubiJwtvZG47VeBO0DxKbxQmLEM/G4hOePUivDI YJpaFAzw5F1Q+V/W4bF4CQl/9/rWj4NUwgL9H8AEN1Ptp5cSss6Ws8Wz9gvsQlWtLx2g8k wZoxZ/CRkznBgW/tEeR3uPEMvke3djY= X-MC-Unique: nLIswmaCNei7FdpICnOD9g-1 From: Peter Krempa To: libvir-list@redhat.com Subject: [PATCH 2/2] backup: Allow 'encryption' of backups and scratch images Date: Tue, 14 Apr 2020 11:22:44 +0200 Message-Id: <8822b554716ca68df8e21b179d891e92465e03e6.1586856084.git.pkrempa@redhat.com> In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 X-loop: libvir-list@redhat.com 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.13 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) Content-Type: text/plain; charset="utf-8" Add the appropriate entries into the schema to allow encryption of the backup or scratch image. Since we use blockdev internals for everything no changes to the code are actually necessary. https://bugzilla.redhat.com/show_bug.cgi?id=3D1811906 Signed-off-by: Peter Krempa Reviewed-by: Erik Skultety Reviewed-by: J=C3=A1n Tomko --- docs/formatbackup.html.in | 14 +++- docs/schemas/domainbackup.rng | 65 +++++++++++++++---- .../backup-pull-encrypted.xml | 30 +++++++++ .../backup-push-encrypted.xml | 29 +++++++++ .../backup-pull-encrypted.xml | 30 +++++++++ .../backup-push-encrypted.xml | 29 +++++++++ tests/genericxml2xmltest.c | 3 + 7 files changed, 185 insertions(+), 15 deletions(-) create mode 100644 tests/domainbackupxml2xmlin/backup-pull-encrypted.xml create mode 100644 tests/domainbackupxml2xmlin/backup-push-encrypted.xml create mode 100644 tests/domainbackupxml2xmlout/backup-pull-encrypted.xml create mode 100644 tests/domainbackupxml2xmlout/backup-push-encrypted.xml diff --git a/docs/formatbackup.html.in b/docs/formatbackup.html.in index 87744bac98..9e69d8f7d3 100644 --- a/docs/formatbackup.html.in +++ b/docs/formatbackup.html.in @@ -101,7 +101,7 @@ block. Similar to a disk declaration for a domain, the choice of = type controls what additional sub-elements are needed to descri= be - the destination. + the destination.
target
Valid only for push mode backups, this is the primary sub-element that describes the file name of @@ -110,7 +110,8 @@ disk. An optional sub-element driver can also be used, with an attribute type to specify a destination format different from - qcow2.
+ qcow2. See documentation for scratch below for + additional configuration.
scratch
Valid only for pull mode backups, this is the primary sub-element that describes the file name of @@ -130,7 +131,14 @@ used without modification. The file is not deleted after t= he backup but the contents of the file don't make sense outsi= de of the backup. The same applies for the block device which - must be formatted appropriately.
+ must be formatted appropriately. + + Similarly to the domain + disk + definition scratch and target can + contain seclabel and/or encryption + subelements to configure the corresponding properties. + diff --git a/docs/schemas/domainbackup.rng b/docs/schemas/domainbackup.rng index 395ea841f9..ac5b12c463 100644 --- a/docs/schemas/domainbackup.rng +++ b/docs/schemas/domainbackup.rng @@ -7,6 +7,27 @@ + + + + + luks + + + + + + + + + + + + + + + + @@ -123,9 +144,14 @@ - - - + + + + + + + + @@ -142,9 +168,14 @@ - - - + + + + + + + + @@ -192,9 +223,14 @@ - - - + + + + + + + + @@ -210,9 +246,14 @@ - - - + + + + + + + + diff --git a/tests/domainbackupxml2xmlin/backup-pull-encrypted.xml b/tests/= domainbackupxml2xmlin/backup-pull-encrypted.xml new file mode 100644 index 0000000000..1469189a37 --- /dev/null +++ b/tests/domainbackupxml2xmlin/backup-pull-encrypted.xml @@ -0,0 +1,30 @@ + + 1525889631 + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/tests/domainbackupxml2xmlin/backup-push-encrypted.xml b/tests/= domainbackupxml2xmlin/backup-push-encrypted.xml new file mode 100644 index 0000000000..121cfd7fa9 --- /dev/null +++ b/tests/domainbackupxml2xmlin/backup-push-encrypted.xml @@ -0,0 +1,29 @@ + + 1525889631 + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/tests/domainbackupxml2xmlout/backup-pull-encrypted.xml b/tests= /domainbackupxml2xmlout/backup-pull-encrypted.xml new file mode 100644 index 0000000000..81519bfcb5 --- /dev/null +++ b/tests/domainbackupxml2xmlout/backup-pull-encrypted.xml @@ -0,0 +1,30 @@ + + 1525889631 + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/tests/domainbackupxml2xmlout/backup-push-encrypted.xml b/tests= /domainbackupxml2xmlout/backup-push-encrypted.xml new file mode 100644 index 0000000000..a955340964 --- /dev/null +++ b/tests/domainbackupxml2xmlout/backup-push-encrypted.xml @@ -0,0 +1,29 @@ + + 1525889631 + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/tests/genericxml2xmltest.c b/tests/genericxml2xmltest.c index 501bcdb0a1..74e520522b 100644 --- a/tests/genericxml2xmltest.c +++ b/tests/genericxml2xmltest.c @@ -192,8 +192,11 @@ mymain(void) DO_TEST_BACKUP("empty"); DO_TEST_BACKUP("backup-pull"); DO_TEST_BACKUP("backup-pull-seclabel"); + DO_TEST_BACKUP("backup-pull-encrypted"); DO_TEST_BACKUP("backup-push"); DO_TEST_BACKUP("backup-push-seclabel"); + DO_TEST_BACKUP("backup-push-encrypted"); + virObjectUnref(caps); virObjectUnref(xmlopt); --=20 2.26.0