aboutsummaryrefslogtreecommitdiff
path: root/qapi
diff options
context:
space:
mode:
authorFlorian Florensa <fflorensa@online.net>2020-01-10 12:15:13 +0100
committerKevin Wolf <kwolf@redhat.com>2020-03-06 17:21:28 +0100
commit19ae9ae014715529f6f50597821c5712bae6ab02 (patch)
treee7f615c91e762239937449e35ef9c01def8eac9f /qapi
parent2af282ec51a27116d0402cab237b8970800f870c (diff)
block/rbd: Add support for ceph namespaces
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> Message-Id: <20200110111513.321728-2-fflorensa@online.net> Reviewed-by: Jason Dillaman <dillaman@redhat.com> Reviewed-by: Stefano Garzarella <sgarzare@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Diffstat (limited to 'qapi')
-rw-r--r--qapi/block-core.json3
1 files changed, 3 insertions, 0 deletions
diff --git a/qapi/block-core.json b/qapi/block-core.json
index 48631218fa..9758fc48d2 100644
--- a/qapi/block-core.json
+++ b/qapi/block-core.json
@@ -3544,6 +3544,8 @@
#
# @pool: Ceph pool name.
#
+# @namespace: Rados namespace name in the Ceph pool. (Since 5.0)
+#
# @image: Image name in the Ceph pool.
#
# @conf: path to Ceph configuration file. Values
@@ -3570,6 +3572,7 @@
##
{ 'struct': 'BlockdevOptionsRbd',
'data': { 'pool': 'str',
+ '*namespace': 'str',
'image': 'str',
'*conf': 'str',
'*snapshot': 'str',