mds: allow all types of mds caps#51317
Conversation
gregsfortytwo
left a comment
There was a problem hiding this comment.
This was a good discovery (of something that scares me) and a nice start. Still need some improvements to testing to make sure the fix is complete. :)
|
jenkins test make check |
174b7db to
087f92b
Compare
0b313d5 to
2a4afce
Compare
|
jenkins test api |
23dd800 to
f5f58cf
Compare
|
Strange the ceph API tests failed because it looks like test runner exited with success - |
|
@gregsfortytwo @vshankar Should an MDS caps with GID should be allowed? IMO it should be. If a CephFS user wants to allow 5 Linux users to access a certain CephFS, he/she can simply add all of the users to a group and then create an MDS cap mentioning the GID. The cap would look like this Obviously, former style is easier on eyes and is also better scalable and manageable. |
|
jenkins test api |
|
This pull request can no longer be automatically merged: a rebase is needed and changes have to be manually resolved |
f5f58cf to
ec32c3b
Compare
|
Rebased and resolved the merge conflicts. |
|
@rishabh-d-dave please run this through QA and post the result. |
@rishabh-d-dave In your results, the cap with only |
I am confused by what you mean. We expect only GIDs |
rishabh-d-dave
left a comment
There was a problem hiding this comment.
Tests were successful - https://tracker.ceph.com/projects/cephfs/wiki/Main#13-Jul-2023
@vshankar This PR is ready for merge but an approval is needed. |
|
This pull request can no longer be automatically merged: a rebase is needed and changes have to be manually resolved |
MDS caps can contain 5 components: name of a CephFS, a path inside CephFS, a flag for enabling root squashing mechanism, a UID and list of GIDs. These 5 components result in 31 combinations, so there can be 31 types of MDS caps. Out of these, the current main branch only allows 11 combinations. This restriction is strange and inappropriate. Ideally, all combinations should be allowed. This strange restriction must've been created unintentionally by previous developers while adding FS name and root squash to MDS caps. A TODO for a allowing a subset of these combination was also left in codebase: https://github.com/ceph/ceph/blob/reef/src/mds/MDSAuthCaps.cc#L69 Fixes: https://tracker.ceph.com/issues/59388 Signed-off-by: Rishabh Dave <ridave@redhat.com>
Signed-off-by: Rishabh Dave <ridave@redhat.com>
Currently we check if the right caps parse successfully and the wrong caps fail to parse. Increase the test coverage by adding one more tests -- dump the right caps in to a string after the parsing is successfully and then re-parse the caps and check if re-parsed caps dumps to the exact same string. Signed-off-by: Rishabh Dave <ridave@redhat.com>
ec32c3b to
bfacee1
Compare
|
Rebased PR branch to resolve the conflict. I'll merge as soon as the CI tests finish running successfully. |
|
jenkins test make check |
Fixes: https://tracker.ceph.com/issues/59388
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. "pacific"), please refer to Submitting Patches to Ceph - Backports for the proper workflow.
Checklist
Show available Jenkins commands
jenkins retest this pleasejenkins test classic perfjenkins test crimson perfjenkins test signedjenkins test make checkjenkins test make check arm64jenkins test submodulesjenkins test dashboardjenkins test dashboard cephadmjenkins test apijenkins test docsjenkins render docsjenkins test ceph-volume alljenkins test ceph-volume toxjenkins test windows