From: Fiona Ebner <f.ebner@proxmox.com>
To: pve-devel@lists.proxmox.com
Subject: [pve-devel] [RFC v2 qemu 02/10] block/rbd: support keyring option via QAPI
Date: Fri, 23 May 2025 15:31:48 +0200 [thread overview]
Message-ID: <20250523133156.617227-3-f.ebner@proxmox.com> (raw)
In-Reply-To: <20250523133156.617227-1-f.ebner@proxmox.com>
In Proxmox VE, it is not always required to have a dedicated Ceph
configuration file, and using the 'key-secret' QAPI option would
require obtaining a key from the keyring first. The keyring location
is readily available however, so having support for the 'keyring'
configuration option is most convenient.
Signed-off-by: Fiona Ebner <f.ebner@proxmox.com>
---
New in v2.
block/rbd.c | 8 ++++++++
qapi/block-core.json | 5 ++++-
2 files changed, 12 insertions(+), 1 deletion(-)
diff --git a/block/rbd.c b/block/rbd.c
index 3928d8fee4..0eac4c1d3e 100644
--- a/block/rbd.c
+++ b/block/rbd.c
@@ -301,6 +301,14 @@ static int qemu_rbd_set_key_value_pairs(rados_t cluster,
return 0;
}
+ if (key_value_pairs->keyring) {
+ int r = rados_conf_set(cluster, "keyring", key_value_pairs->keyring);
+ if (r < 0) {
+ error_setg_errno(errp, -r, "could not set 'keyring'");
+ return -EINVAL;
+ }
+ }
+
if (key_value_pairs->has_rbd_cache_policy) {
RbdCachePolicy value = key_value_pairs->rbd_cache_policy;
int r = rados_conf_set(cluster, "rbd_cache_policy",
diff --git a/qapi/block-core.json b/qapi/block-core.json
index 360f467f6e..781a762768 100644
--- a/qapi/block-core.json
+++ b/qapi/block-core.json
@@ -4671,12 +4671,15 @@
#
# Key-value pairs for Ceph configuration.
#
+# @keyring: Ceph configuration option 'keyring'.
+#
# @rbd-cache-policy: Ceph configuration option 'rbd_cache_policy'.
#
# Since 10.1
##
{ 'struct': 'RbdKeyValuePairs',
- 'data': { '*rbd-cache-policy': 'RbdCachePolicy' } }
+ 'data': { '*keyring': 'str',
+ '*rbd-cache-policy': 'RbdCachePolicy' } }
##
# @BlockdevOptionsRbd:
--
2.39.5
_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel
next prev parent reply other threads:[~2025-05-23 13:32 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-05-23 13:31 [pve-devel] [RFC v2 qemu/storage 00/10] storage plugin method to get qemu blockdevice options for volume Fiona Ebner
2025-05-23 13:31 ` [pve-devel] [RFC v2 qemu 01/10] block/rbd: support selected key-value-pairs via QAPI Fiona Ebner
2025-05-23 13:31 ` Fiona Ebner [this message]
2025-05-23 13:31 ` [pve-devel] [RFC v2 storage 03/10] plugin: add method to get qemu blockdevice options for volume Fiona Ebner
2025-05-23 13:31 ` [pve-devel] [RFC v2 storage 04/10] iscsi direct plugin: implement method to get qemu blockdevice options Fiona Ebner
2025-05-23 13:31 ` [pve-devel] [RFC v2 storage 05/10] zfs iscsi plugin: implement new " Fiona Ebner
2025-05-23 13:31 ` [pve-devel] [RFC v2 storage 06/10] zfs pool plugin: implement " Fiona Ebner
2025-05-23 13:31 ` [pve-devel] [RFC v2 storage 07/10] rbd plugin: implement new " Fiona Ebner
2025-05-23 13:31 ` [pve-devel] [RFC v2 storage 08/10] plugin: qemu block device: add hints option and EFI disk hint Fiona Ebner
2025-05-23 13:31 ` [pve-devel] [RFC v2 storage 09/10] plugin: qemu block device: add support for snapshot option Fiona Ebner
2025-05-23 13:31 ` [pve-devel] [RFC v2 storage 10/10] plugin api: bump api version and age Fiona Ebner
2025-06-02 16:12 ` [pve-devel] [RFC v2 qemu/storage 00/10] storage plugin method to get qemu blockdevice options for volume DERUMIER, Alexandre via pve-devel
[not found] ` <9d08a1aab040d04a6f3096dfd1b3dabd30fa9315.camel@groupe-cyllene.com>
2025-06-02 16:24 ` DERUMIER, Alexandre via pve-devel
2025-06-03 8:02 ` Fiona Ebner
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20250523133156.617227-3-f.ebner@proxmox.com \
--to=f.ebner@proxmox.com \
--cc=pve-devel@lists.proxmox.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.