Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
This project is now read‑only. Starting Monday, February 2, please use https://ibm-ceph.atlassian.net/ for all bug tracking management.

Bug 1923893

Summary: creating a cephfs user for client in which a filesystem name has "-" fails
Product: [Red Hat Storage] Red Hat Ceph Storage Reporter: Hemanth Kumar <hyelloji>
Component: CephFSAssignee: Ram Raja <rraja>
Status: CLOSED ERRATA QA Contact: Hemanth Kumar <hyelloji>
Severity: high Docs Contact:
Priority: medium    
Version: 5.0CC: akupczyk, bhubbard, ceph-eng-bugs, kdreyer, nojha, pdonnell, rzarzyns, sseshasa, sweil, vumrao
Target Milestone: ---Flags: hyelloji: needinfo-
Target Release: 5.0   
Hardware: All   
OS: All   
Whiteboard:
Fixed In Version: ceph-16.1.0-1323.el8cp Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2021-08-30 08:28:17 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Hemanth Kumar 2021-02-02 07:23:09 UTC
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"

================================================================

Comment 2 Brad Hubbard 2021-02-02 07:45:06 UTC
Sorry, prematurely submitted the last comment.

https://tracker.ceph.com/issues/45521 provides details of recent work in this area.

Comment 14 errata-xmlrpc 2021-08-30 08:28:17 UTC
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