]> git.apps.os.sepia.ceph.com Git - ceph.git/commit
MDSAuthCaps: print a special error message for wrong permissions
authorRishabh Dave <ridave@redhat.com>
Fri, 9 Jun 2023 18:54:12 +0000 (00:24 +0530)
committerRishabh Dave <ridave@redhat.com>
Wed, 3 Apr 2024 17:32:08 +0000 (23:02 +0530)
commit9e3f16ab73b28d23036f3d375587f2671da60d43
treea8f017562274e5abbd0b59d365a5e44a1c2c47b3
parent88b543a3cdfbc7dd2e7048fd0446176d114425ec
MDSAuthCaps: print a special error message for wrong permissions

Permissions mentioned in MDS caps flags can either begin with "r" or
"rw", or can be "*" and "all". But it can't start with or be just "w" or
something else. This is confusing for some CephFS users since MON caps
can be just "w".

Command "ceph fs authorize" complains about this to the user. But other
commands (specifically, "ceph auth add", "ceph auth caps",
"ceph auth get-or-create" and "ceph auth get-or-create-key") don't. Make
these commands too print a helpful message, the way "ceph fs authorize"
command does.

Fixes: https://tracker.ceph.com/issues/61666
Signed-off-by: Rishabh Dave <ridave@redhat.com>
(cherry picked from commit f163dd3ef1fd9f05f05fa50eda9993225770d524)

Conflicts:
src/mds/MDSAuthCaps.cc
"std::string" was replace "string" in main but that's not the case
in Reef.
qa/tasks/cephfs/test_admin.py
src/mds/MDSAuthCaps.cc