Description of problem: Resource type ocf:ceph:rbd is provided by ceph package (/src/ocf/rbd.in) and supports following options: name (required): Name of the RBD device. pool: Name of the RADOS pool where the RBD has been created snap: Name of the device snapshot to map. cephconf: Location of the Ceph configuration file mon: Address (or comma-separated list of addresses) of monitor servers to connect to. Overrides values from configuration file. user: Username to use when mapping the device. Required if Ceph authentication is enabled on the monitor. secret: File containing an authentication secret. Required if Ceph authentication is enabled on the monitor. However if user utilizes ceph cluster with rbd pool and namespaces he/she cannot create resource with namespace and therefore resource doesn't work. Add support of "namespace" parameter for ocf:ceph:rbd resource type. Version-Release number of selected component (if applicable): ceph-12.2.7-9.el8
Resetting to RHCS product / RBD component as this OCF resource agent is distributed under RHCS via the "ceph-resource-agents" package.
Verified the RFE. Steps followed are as below: [ceph: root@magna021 ~]# ceph osd pool application enable rbd rbd enabled application 'rbd' on pool 'rbd' [ceph: root@magna021 ~]# rbd pool init -p rbd [ceph: root@magna021 ~]# rbd namespace ls [ceph: root@magna021 ~]# rbd namespace create --namespace testnamespace [ceph: root@magna021 ~]# rbd namespace create --namespace othernamespace [ceph: root@magna021 ~]# rbd namespace ls --format=json [{"name":"othernamespace"},{"name":"testnamespace"}] [ceph: root@magna021 ~]# ceph auth get-or-create client.rbduser mon 'profile rbd' osd 'profile rbd pool=rbd namespace=testnamespace' -o /etc/ceph/client.rbduser.keyring [ceph: root@magna021 ~]# ceph auth get-or-create client.otheruser mon 'profile rbd' osd 'profile rbd pool=rbd namespace=othernamespace' -o /etc/ceph/client.otheruser.keyring [ceph: root@magna021 ~]# ceph auth get client.rbduser exported keyring for client.rbduser [client.rbduser] key = AQBGEU1gGcVGHxAAY/uKb+KieMfaar1xXxe2/g== caps mon = "profile rbd" caps osd = "profile rbd pool=rbd namespace=testnamespace" [ceph: root@magna021 ~]# ceph auth get client.otheruser exported keyring for client.otheruser [client.otheruser] key = AQBPEU1gg40yHxAAeRtTr++xahZJiCgS4PgIsA== caps mon = "profile rbd" caps osd = "profile rbd pool=rbd namespace=othernamespace" [ceph: root@magna021 ~]# rbd create --namespace testnamespace rbdimg1 --size 1G [ceph: root@magna021 ~]# rbd create --namespace othernamespace rbdimg2 --size 1G [ceph: root@magna021 ~]# rbd ls --long NAME SIZE PARENT FMT PROT LOCK data-disk1 200 GiB 2 fio_test 2 GiB 2 rbd_pool 1 GiB 2 [ceph: root@magna021 ~]# rbd --namespace testnamespace ls --long NAME SIZE PARENT FMT PROT LOCK rbdimg1 1 GiB 2 [ceph: root@magna021 ~]# rbd --namespace othernamespace ls --long NAME SIZE PARENT FMT PROT LOCK rbdimg2 1 GiB 2 [ceph: root@magna021 ~]# rbd map --namespace testnamespace rbdimg1 -n client.rbduser --keyring=/etc/ceph/client.rbduser.keyring /dev/rbd1 [ceph: root@magna021 ~]# rbd map --namespace othernamespace rbdimg2 -n client.otheruser --keyring=/etc/ceph/client.otheruser.keyring /dev/rbd2 [ceph: root@magna021 ~]# rbd showmapped id pool namespace image snap device 0 testbench image01 - /dev/rbd0 1 rbd testnamespace rbdimg1 - /dev/rbd1 2 rbd othernamespace rbdimg2 - /dev/rbd2
package missing have raised BZ: https://bugzilla.redhat.com/show_bug.cgi?id=1939231
Verified working as expected: change in the below command "namespace" should be "pool_namespace" # pcs resource create rbd_map_gsitlani ocf:ceph:rbd user=“admin” pool=“rbd” name="test-rbd" cephconf=“/etc/ceph/ceph.conf” pool_namespace="node1" op monitor interval=“10s” timeout=“20s” Thanks gsitlani++ for the help with steps.
Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory (Red Hat Ceph Storage 5.0 bug fix and enhancement), and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://access.redhat.com/errata/RHBA-2021:3294