mon/AuthMonitor: add osd w cap for superuser client#67406
mon/AuthMonitor: add osd w cap for superuser client#67406
Conversation
|
jenkins test api |
|
Hi @batrick Those tests execute: In case it helps when I merged the commit id of your change was 186f068 |
Apologies, please try again. |
|
jenkins test make check arm64 |
phlogistonjohn
left a comment
There was a problem hiding this comment.
I'm not a C++ expert, so take this review with a grain of salt.
However, I combined this PR with mine and did a teuthology run and it resolved this issues I was seeing.
|
jenkins test make check arm64 |
1 similar comment
|
jenkins test make check arm64 |
|
Hi all, I am waiting on having this get merged before I finally merge #64641 - is this just mainly waiting on teuthology? Anything else? |
|
This PR is under test in https://tracker.ceph.com/issues/75334. |
|
Pushed a fix. |
| err = -EINVAL; | ||
| goto done; | ||
| } | ||
| if (last == 'r' && c == 'w') { |
There was a problem hiding this comment.
I think issue was just that * wasn't handled,right? These changes restructures the loop, osd_cap_needs_w boolean, and rw-reset hack are all consequences of starting the loop at index 0 instead of 2. Instead could we just early exit for * and leave the rest untouched?
if (cap == "*") {
osd_cap_wanted = "rw";
mds_cap_string += mds_cap_string.empty() ? "" : ", ";
mds_cap_string += "allow *";
if (filesystem != "*" && filesystem != "all" && fs != nullptr)
mds_cap_string += " fsname=" + string(fs->get_mds_map().get_fs_name());
if (path != "/")
mds_cap_string += " path=" + path;
if (root_squash)
mds_cap_string += " root_squash";
continue;
}
// rest of existing logic unchangedThere was a problem hiding this comment.
Aren't you duplicating the code that way?
There was a problem hiding this comment.
I think the code restructure improved readability. Unfortunately, a bug got introduced and its nice that it was caught in testing :)
| } | ||
| osd_cap_wanted += 'w'; | ||
| break; | ||
| case 'w': |
There was a problem hiding this comment.
This causes malformed OSD caps to be generated for auth string "/ rw root_squash /dir1 rw".
See: /a/vshankar-2026-03-05_08:10:26-fs-wip-vshankar-testing-20260304.135307-testing-default-trial/87189
OSD caps get generated as "rww" which fails the "fs authorize" command.
| err = -EINVAL; | ||
| goto done; | ||
| } | ||
| if (last == 'r' && c == 'w') { |
There was a problem hiding this comment.
Aren't you duplicating the code that way?
Right now only a client with "rw" permissions on an MDS gets "rw" on an OSD. [@vshankar: fixed malformed OSD cap when authorizing multiple paths] Reported-by: John Mulligan <jmulligan@redhat.com> Fixes: https://tracker.ceph.com/issues/75013 Signed-off-by: Patrick Donnelly <pdonnell@ibm.com> Signed-off-by: Venky Shankar <vshankar@redhat.com>
Error string validation is prone to failures when error string changes. errno (retval) validation suffices for tests. Signed-off-by: Venky Shankar <vshankar@redhat.com>
* refs/pull/67406/head: Reviewed-by: John Mulligan <jmulligan@redhat.com> Reviewed-by: Venky Shankar <vshankar@redhat.com>
|
Fixing and validating a test case change. |
|
jenkins test api |
Right now only a client with "rw" permissions on an MDS gets "rw" on an OSD.
Reported-by: John Mulligan jmulligan@redhat.com
Fixes: https://tracker.ceph.com/issues/75013
Contribution Guidelines
To sign and title your commits, please refer to Submitting Patches to Ceph.
If you are submitting a fix for a stable branch (e.g. "quincy"), please refer to Submitting Patches to Ceph - Backports for the proper workflow.
When filling out the below checklist, you may click boxes directly in the GitHub web UI. When entering or editing the entire PR message in the GitHub web UI editor, you may also select a checklist item by adding an
xbetween the brackets:[x]. Spaces and capitalization matter when checking off items this way.Checklist
Show available Jenkins commands
jenkins test classic perfJenkins Job | Jenkins Job Definitionjenkins test crimson perfJenkins Job | Jenkins Job Definitionjenkins test signedJenkins Job | Jenkins Job Definitionjenkins test make checkJenkins Job | Jenkins Job Definitionjenkins test make check arm64Jenkins Job | Jenkins Job Definitionjenkins test submodulesJenkins Job | Jenkins Job Definitionjenkins test dashboardJenkins Job | Jenkins Job Definitionjenkins test dashboard cephadmJenkins Job | Jenkins Job Definitionjenkins test apiJenkins Job | Jenkins Job Definitionjenkins test docsReadTheDocs | Github Workflow Definitionjenkins test ceph-volume allJenkins Jobs | Jenkins Jobs Definitionjenkins test windowsJenkins Job | Jenkins Job Definitionjenkins test rook e2eJenkins Job | Jenkins Job DefinitionYou must only issue one Jenkins command per-comment. Jenkins does not understand
comments with more than one command.