Bug 1816909

Summary: RFE: Support Rados namespace in libvirt
Product: Red Hat Enterprise Linux 9 Reporter: Han Han <hhan>
Component: libvirtAssignee: Virtualization Maintenance <virt-maint>
Status: CLOSED WONTFIX QA Contact: Han Han <hhan>
Severity: medium Docs Contact:
Priority: medium    
Version: 9.0CC: jdenemar, jen, jsuchane, lmen, support, virt-maint, xuzhang
Target Milestone: rcKeywords: FutureFeature, Triaged
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2021-09-25 07:26:51 UTC Type: Feature Request
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Han Han 2020-03-25 04:29:12 UTC
Description of problem:
Refer to the commit of qemu 5.0:
commit 19ae9ae0
Author: Florian Florensa <fflorensa>
Date:   Fri Jan 10 12:15:13 2020 +0100

    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>
    Message-Id: <20200110111513.321728-2-fflorensa>
    Reviewed-by: Jason Dillaman <dillaman>
    Reviewed-by: Stefano Garzarella <sgarzare>
    Signed-off-by: Kevin Wolf <kwolf>

Comment 3 John Ferlan 2021-09-08 13:31:28 UTC
Bulk update: Move RHEL-AV bugs to RHEL9. If necessary to resolve in RHEL8, then clone to the current RHEL8 release.

Comment 4 RHEL Program Management 2021-09-25 07:26:51 UTC
After evaluating this issue, there are no plans to address it further or fix it in an upcoming release.  Therefore, it is being closed.  If plans change such that this issue will be fixed in an upcoming release, then the bug can be reopened.

Comment 5 support 2023-06-13 15:02:03 UTC
@RHEL Program Management: What were the considerations to not support this feature?

This feature might look like a minor issue, but having this support could actually bring big performance gains to Ceph clusters. If a Ceph cluster is used to host multiple tenants, using separate pools (each pool representing a tenant) Placement Groups (PGs) have to be allocated for each pool. Each PG has a cost in terms of cpu and memory of an OSD, so it's a limited resource. With multiple tenants the total amount of PGs has to be divided over all pools. Over the course of time these pools might grow, or shrink their usage. To maintain optimal performance the amount of PGs might have to be adjusted per pool. Ceph can increase the amount of PGs a pool can use (PG split) or reduce the amount of PGs (PG merge). However, this process is not free. It involves data movement in the cluster, and this can be quite substantial. The RBD namespace feature would eliminate the need for separate pools to split tenants, as all tenants can use the same pool, with each tenant using it's own namespace. The PGs are now also used more efficiently.

The code to support this feature in Libvirt is already present. See this commit: https://gitlab.com/hhan2/libvirt/-/commit/b3136bb003cb1d83a4772ed983ef2554e0a259e2

Virtualization stacks like OpenStack, Ovirt, Cloudstack and OpenNebula could benefit from this support.

Please reconsider supporting this feature.