[pve-devel] [RFC qemu 1/1] block/rbd: add @keyring-file option to BlockdevOptionsRbd
Fiona Ebner
f.ebner at proxmox.com
Fri May 9 16:15:29 CEST 2025
Signed-off-by: Fiona Ebner <f.ebner at proxmox.com>
---
I'll also submit this upstream.
block/rbd.c | 8 ++++++++
qapi/block-core.json | 4 ++++
2 files changed, 12 insertions(+)
diff --git a/block/rbd.c b/block/rbd.c
index 24e820d056..53a9a785f0 100644
--- a/block/rbd.c
+++ b/block/rbd.c
@@ -272,6 +272,14 @@ static int qemu_rbd_set_auth(rados_t cluster, BlockdevOptionsRbd *opts,
}
}
+ if (opts->keyring_file) {
+ r = rados_conf_set(cluster, "keyring", opts->keyring_file);
+ if (r < 0) {
+ error_setg_errno(errp, -r, "Could not set 'keyring'");
+ return r;
+ }
+ }
+
if (opts->has_auth_client_required) {
accu = g_string_new("");
for (auth = opts->auth_client_required; auth; auth = auth->next) {
diff --git a/qapi/block-core.json b/qapi/block-core.json
index 02c043f0f7..100277b371 100644
--- a/qapi/block-core.json
+++ b/qapi/block-core.json
@@ -4671,6 +4671,9 @@
# authentication. This maps to Ceph configuration option "key".
# (Since 3.0)
#
+# @keyring-file: File for the keyring used for cephx authentication.
+# This maps to Ceph configuration option "keyring". (Since 10.1)
+#
# @server: Monitor host address and port. This maps to the "mon_host"
# Ceph option.
#
@@ -4686,6 +4689,7 @@
'*user': 'str',
'*auth-client-required': ['RbdAuthMode'],
'*key-secret': 'str',
+ '*keyring-file': 'str',
'*server': ['InetSocketAddressBase'] } }
##
--
2.39.5
More information about the pve-devel
mailing list