Description of problem:
-------------------------
Unable to create a ceph user for a cephfs which has "-" in the name, it is failing with "Error EINVAL: mon capability parse failed, stopped at '-ec' of 'allow r fsname=cephfs-ec'"
Followed the doc to generate a new ceph user :
---------------------------------------------- https://access.redhat.com/documentation/en-us/red_hat_ceph_storage/4/html-single/file_system_guide/index#creating-client-users-for-a-ceph-file-system_fs
Version : ceph version 16.0.0-9150.el8cp
Steps to Reproduce:
--------------------
Create a cephFS with default values (it created client.admin keyring file)
Create a 2nd filesystem (multifs is supported from RHCS5.0).
[root@magna030 ~]# ceph fs ls
name: cephfs-ec, metadata pool: cephfs-metadata-ec, data pools: [cephfs-data-ec ]
name: cephfs, metadata pool: cephfs.cephfs.meta, data pools: [cephfs.cephfs.data ]
User creation works for the existing fs with a single word without any special characters.
[root@magna030 ~]# ceph fs authorize cephfs client.admin /mnt/kcephfs30/ rwp
Error EINVAL: client.admin already has fs capabilities that differ from those supplied. To generate a new auth key for client.admin, first remove client.admin from configuration files, execute 'ceph auth rm client.admin', then execute this command again.
[root@magna030 ~]# ceph fs authorize cephfs client.admin1 /mnt/kcephfs30/ rwp
[client.admin1]
key = AQBNxRdg1vLmEBAAqOitUweGVdWI+T8qO4AOXg==
In order to mount the new FS (with "-" in it's name) on clients, I wanted to create another user with different capabilities by restricting it only to a particular path.
[root@magna030 ~]# ceph fs authorize cephfs-ec client.admin2 /mnt/kcephfs30/ rwp
Error EINVAL: mon capability parse failed, stopped at '-ec' of 'allow r fsname=cephfs-ec'
It's failing as the filesystem name was created with "cephfs-ec"
================================================================
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