From: "Daniel P. Berrangé" <berrange@redhat.com>
To: Ilya Dryomov <idryomov@gmail.com>
Cc: Fiona Ebner <f.ebner@proxmox.com>,
qemu-block@nongnu.org, qemu-devel@nongnu.org, armbru@redhat.com,
eblake@redhat.com, hreitz@redhat.com, kwolf@redhat.com,
pl@dlhnet.de
Subject: Re: [PATCH 1/2] block/rbd: support selected key-value-pairs via QAPI
Date: Mon, 16 Jun 2025 10:52:44 +0100 [thread overview]
Message-ID: <aE_pbAS_gS12Fp8f@redhat.com> (raw)
In-Reply-To: <CAOi1vP94WJ7r1vPXvcpGZTs2xf6TZ=p=EmVGQvwipftufaYAMw@mail.gmail.com>
On Mon, Jun 16, 2025 at 11:25:54AM +0200, Ilya Dryomov wrote:
> On Thu, May 15, 2025 at 1:29 PM Fiona Ebner <f.ebner@proxmox.com> wrote:
> >
> > Currently, most Ceph configuration options are not exposed via QAPI.
> > While it is possible to specify a dedicated Ceph configuration file,
> > specialized options are often only required for a selection of images
> > on the RBD storage, not all of them. To avoid the need to generate a
> > dedicated Ceph configuration file for each image (or for each required
> > combination of options), support a selection of key-value pairs via
> > QAPI.
> >
> > Initially, this is just 'rbd_cache_policy'. For example, this is
> > useful with small images used as a pflash for EFI variables. Setting
> > the 'rbd_cache_policy' to 'writeback' yields a substantial improvement
> > there [0].
> >
> > The function qemu_rbd_extract_key_value_pairs() was copied/adapted
> > from the existing qemu_rbd_extract_encryption_create_options().
> >
> > [0]: https://bugzilla.proxmox.com/show_bug.cgi?id=3329#c9
> >
> > Signed-off-by: Fiona Ebner <f.ebner@proxmox.com>
snip
> > ##
> > # @BlockdevOptionsRbd:
> > #
> > @@ -4327,6 +4360,9 @@
> > # authentication. This maps to Ceph configuration option "key".
> > # (Since 3.0)
> > #
> > +# @key-value-pairs: Key-value pairs for additional Ceph configuraton.
> > +# (Since 10.1)
> > +#
> > # @server: Monitor host address and port. This maps to the "mon_host"
> > # Ceph option.
> > #
> > @@ -4342,6 +4378,7 @@
> > '*user': 'str',
> > '*auth-client-required': ['RbdAuthMode'],
> > '*key-secret': 'str',
> > + '*key-value-pairs' : 'RbdKeyValuePairs',
>
> To side-step all of the above, have you considered implementing
> a straightforward passthrough to Ceph instead? Something like
>
> '*key-value-pairs': ['RbdKeyValuePair']
>
> where RbdKeyValuePair is just a pair arbitrary strings (and
> key-value-pairs is thus an optional list of those). rados_conf_set()
> would be called just the same but the user would be able to override
> any Ceph option they wish, not just a few that we thought of here.
Passing through arbitrary key/value pairs as strings is essentially
abdicating our design responsibility in QAPI. enums would no longer
be introspectable. Integers / booleans would require abnormal formatting
by clients. API stability / deprecation promises can no longer be made.
and more besides.
Given that limitation, if we did go the string pairs route, I would
expect it to be marked as "unstable" in the QAPI schema, so apps have
a suitable warning NOT to rely on this.
With regards,
Daniel
--
|: https://berrange.com -o- https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org -o- https://fstop138.berrange.com :|
|: https://entangle-photo.org -o- https://www.instagram.com/dberrange :|
next prev parent reply other threads:[~2025-06-16 9:57 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-05-15 11:29 [PATCH 0/2] block/rbd: support selected key-value-pairs via QAPI Fiona Ebner
2025-05-15 11:29 ` [PATCH 1/2] " Fiona Ebner
2025-06-16 9:25 ` Ilya Dryomov
2025-06-16 9:52 ` Daniel P. Berrangé [this message]
2025-06-16 10:28 ` Ilya Dryomov
2025-06-16 12:38 ` Fiona Ebner
2025-06-19 18:38 ` Ilya Dryomov
2025-06-19 21:20 ` Ilya Dryomov
2025-06-20 8:18 ` Fiona Ebner
2025-06-16 12:29 ` Fiona Ebner
2025-06-16 12:34 ` Daniel P. Berrangé
2025-06-16 9:41 ` Daniel P. Berrangé
2025-05-15 11:29 ` [PATCH 2/2] block/rbd: support keyring option " Fiona Ebner
2025-06-16 9:34 ` Ilya Dryomov
2025-06-16 12:51 ` Fiona Ebner
2025-06-19 18:56 ` Ilya Dryomov
2025-06-05 13:36 ` [PATCH 0/2] block/rbd: support selected key-value-pairs " 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=aE_pbAS_gS12Fp8f@redhat.com \
--to=berrange@redhat.com \
--cc=armbru@redhat.com \
--cc=eblake@redhat.com \
--cc=f.ebner@proxmox.com \
--cc=hreitz@redhat.com \
--cc=idryomov@gmail.com \
--cc=kwolf@redhat.com \
--cc=pl@dlhnet.de \
--cc=qemu-block@nongnu.org \
--cc=qemu-devel@nongnu.org \
/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.