]> 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, 13 Mar 2024 13:42:30 +0000 (19:12 +0530)
commit95e5b7cbaafe0fd1cc577232c4665c4ef27acf4e
treeb104160e118105ed98b0c949e51be1b93fd20609
parentf5620baf05ebcbd5d2713783903a2406227c636c
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:
qa/tasks/cephfs/test_admin.py
Lines surrounding the patch to be applied were absent in quincy
branch.

src/mds/MDSAuthCaps.cc
Conflict was due to the fact that "std:string" was replaced by
"string".
qa/tasks/cephfs/test_admin.py
src/mds/MDSAuthCaps.cc