From nobody Sun Feb 8 20:00:01 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
Return-Path:
Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by
mx.zohomail.com
with SMTPS id 154878616199719.397899914663753;
Tue, 29 Jan 2019 10:22:41 -0800 (PST)
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 17FB319D39B;
Tue, 29 Jan 2019 18:22:40 +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 C3E7C84EF;
Tue, 29 Jan 2019 18:22:39 +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 6608818033CB;
Tue, 29 Jan 2019 18:22:39 +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 x0TIMGD1002159 for ;
Tue, 29 Jan 2019 13:22:16 -0500
Received: by smtp.corp.redhat.com (Postfix)
id 323B019745; Tue, 29 Jan 2019 18:22:16 +0000 (UTC)
Received: from unknown0050b6a41c42.attlocal.net.com
(ovpn-116-45.phx2.redhat.com [10.3.116.45])
by smtp.corp.redhat.com (Postfix) with ESMTP id DD7F116E25
for ; Tue, 29 Jan 2019 18:22:15 +0000 (UTC)
From: John Ferlan
To: libvir-list@redhat.com
Date: Tue, 29 Jan 2019 13:22:08 -0500
Message-Id: <20190129182208.23788-10-jferlan@redhat.com>
In-Reply-To: <20190129182208.23788-1-jferlan@redhat.com>
References: <20190129182208.23788-1-jferlan@redhat.com>
MIME-Version: 1.0
X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23
X-loop: libvir-list@redhat.com
Subject: [libvirt] [PATCH v5 9/9] rbd: Utilize storage pool namespace to
manage config options
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.29]);
Tue, 29 Jan 2019 18:22:40 +0000 (UTC)
Content-Type: text/plain; charset="utf-8"
Allow for adjustment of RBD configuration options via Storage
Pool XML Namespace adjustments. When namespace arguments are
used to start the pool, add a VIR_WARN to indicate that the
startup was tainted by custom config_opts.
Based off original patch/concept:
https://www.redhat.com/archives/libvir-list/2014-May/msg00940.html
Signed-off-by: John Ferlan
Reviewed-by: Daniel P. Berrang=C3=A9
---
docs/formatstorage.html.in | 52 +++++-
docs/schemas/storagepool.rng | 23 +++
src/storage/storage_backend_rbd.c | 169 +++++++++++++++++-
.../pool-rbd-ns-configopts.xml | 17 ++
.../pool-rbd-ns-configopts.xml | 20 +++
tests/storagepoolxml2xmltest.c | 1 +
6 files changed, 278 insertions(+), 4 deletions(-)
create mode 100644 tests/storagepoolxml2xmlin/pool-rbd-ns-configopts.xml
create mode 100644 tests/storagepoolxml2xmlout/pool-rbd-ns-configopts.xml
diff --git a/docs/formatstorage.html.in b/docs/formatstorage.html.in
index 7a79ec82d8..d19bc579a4 100644
--- a/docs/formatstorage.html.in
+++ b/docs/formatstorage.html.in
@@ -516,7 +516,8 @@
XML syntax targeted solely for the needs of the specific pool type
which is not otherwise supported in standard XML. For the "fs" and
"netfs" pool types this provides a mechanism to provide additional
- mount options on the command line.
+ mount options on the command line. For the "rbd" pool this provides
+ a mechanism to override default settings for RBD configuration optio=
ns.
Usage of namespaces comes with no support guarantees. It is intended
@@ -569,6 +570,55 @@
=20
Since 5.1.0.
=20
+
rbd:config_opts
+
Provides an XML namespace mechanism to optionally utilize
+ specifically named options for the RBD configuration options
+ via the rados_conf_set API for the rbd type
+ storage pools. In order to designate that the Storage Pool
+ will be using the mechanism, the pool element
+ must be modified to provide the XML namespace attribute
+ syntax as follows:
+
+
+ The rbd:config_opts defines the configuration options
+ by specifying multiple rbd:option subelements with
+ the attribute name specifying the configuration option
+ to be added and value specifying the configuration
+ option value. The name and value for each option is only checked
+ to be not empty. The name and value provided are not checked since
+ it's possible options don't exist on all distributions. It is
+ expected that proper and valid options will be supplied for the
+ target host.
+
+
+ The following XML snippet shows the syntax required in order to
+ utilize
+