]> git.apps.os.sepia.ceph.com Git - ceph.git/commit
mon/AuthMonitor: make "ceph auth caps" print error messsages...
authorRishabh Dave <ridave@redhat.com>
Mon, 11 Sep 2023 20:01:37 +0000 (01:31 +0530)
committerRishabh Dave <ridave@redhat.com>
Thu, 28 Sep 2023 14:22:03 +0000 (19:52 +0530)
commite404413e89dcc02b13ce0c1a67dbe3b03f8ce346
treef45d0ded780d04b10710a9c5f8298d3bafc79b33
parent9fedc1e062027dbce66747e5d0dc11319615ab8a
mon/AuthMonitor: make "ceph auth caps" print error messsages...

generated by MDSAuthCaps::parse(). Specifically, in this case, this
command is supposed to print an error message when permission flag passed
for MDS capability is incorrect.

This needs the method AuthMonitor::_update_or_create_entity() to be
fixed. The issue is that stderr stream is not passed from the block under
"else if" clause of "ceph auth caps" command to MDSAuthCaps::_parse()
method. Let's fix this by adding a parameter for stderr stream to every
method in stack that is between this block and MDSAuthCaps::parse()
method.

qa.tasks.cephfs.test_admin.TestPermErrMsg contains tests that checks
whether or not all the Ceph commands that accept MDS capabilites print
the error message when permission flag in this capaibility is incorrect.
Add a test to this class to check if "ceph auth caps" also print an error
message when perm flag in MDS capability sting is incorrect.

Fixes: https://tracker.ceph.com/issues/63020
Signed-off-by: Rishabh Dave <ridave@redhat.com>
qa/tasks/cephfs/test_admin.py
src/mon/AuthMonitor.cc
src/mon/AuthMonitor.h