All of lore.kernel.org
 help / color / mirror / Atom feed
From: Eric Blake <eblake@redhat.com>
To: Florian Florensa <fflorensa@online.net>, qemu-devel@nongnu.org
Cc: kwolf@redhat.com, dillaman@redhat.com, armbru@redhat.com,
	mreitz@redhat.com
Subject: Re: [PATCH] block/rbd: Add support for ceph namespaces
Date: Fri, 20 Dec 2019 15:02:29 -0600	[thread overview]
Message-ID: <1625c5ab-e65f-68b7-a35c-9370cca5494e@redhat.com> (raw)
In-Reply-To: <20191219133416.671431-1-fflorensa@online.net>

On 12/19/19 7:34 AM, Florian Florensa wrote:
> Starting from ceph Nautilus, RBD has support for namespaces, allowing
> for finer grain ACLs on images inside a pool, and tenant isolation.
> 
> In the rbd cli tool documentation, the new image-spec and snap-spec are :
>   - [pool-name/[namespace-name/]]image-name
>   - [pool-name/[namespace-name/]]image-name@snap-name
> 
> When using an non namespace's enabled qemu, it complains about not
> finding the image called namespace-name/image-name, thus we only need to
> parse the image once again to find if there is a '/' in its name, and if
> there is, use what is before it as the name of the namespace to later
> pass it to rados_ioctx_set_namespace.
> rados_ioctx_set_namespace if called with en empty string or a null
> pointer as the namespace parameters pretty much does nothing, as it then
> defaults to the default namespace.
> 
> The namespace is extracted inside qemu_rbd_parse_filename, stored in the
> qdict, and used in qemu_rbd_connect to make it work with both qemu-img,
> and qemu itself.
> 
> Signed-off-by: Florian Florensa <fflorensa@online.net>
> ---

> +++ b/qapi/block-core.json
> @@ -3657,6 +3657,8 @@
>   #
>   # @pool:               Ceph pool name.
>   #
> +# @nspace:             Rados namespace name in the Ceph pool.
> +#

Needs a '(since 5.0)' tag.

>   # @image:              Image name in the Ceph pool.
>   #
>   # @conf:               path to Ceph configuration file.  Values
> @@ -3683,6 +3685,7 @@
>   ##
>   { 'struct': 'BlockdevOptionsRbd',
>     'data': { 'pool': 'str',
> +            'nspace': 'str',

This makes a new argument mandatory, which breaks expectations of older 
clients that failed to provide it. You probably want to make it 
'*nspace', and have a sane default when the argument is not present.

-- 
Eric Blake, Principal Software Engineer
Red Hat, Inc.           +1-919-301-3226
Virtualization:  qemu.org | libvirt.org



      parent reply	other threads:[~2019-12-20 21:03 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-12-19 13:34 [PATCH] block/rbd: Add support for ceph namespaces Florian Florensa
2019-12-19 14:15 ` Jason Dillaman
2019-12-19 14:51 ` Stefano Garzarella
2019-12-20 14:11   ` Florian Florensa
2019-12-20 14:56     ` Jason Dillaman
2019-12-20 15:09       ` Stefano Garzarella
2019-12-20 17:17       ` Florian Florensa
2019-12-20 21:05         ` Eric Blake
2019-12-20 21:02 ` Eric Blake [this message]

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=1625c5ab-e65f-68b7-a35c-9370cca5494e@redhat.com \
    --to=eblake@redhat.com \
    --cc=armbru@redhat.com \
    --cc=dillaman@redhat.com \
    --cc=fflorensa@online.net \
    --cc=kwolf@redhat.com \
    --cc=mreitz@redhat.com \
    --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.