client: Fix leading / issue with mds_check_access#58878
Conversation
|
I need to add a test for this. |
2a8c6e8 to
f00af71
Compare
src/client/Client.cc
Outdated
| path = path.substr(1); // drop leading / | ||
|
|
||
| // drop any leading / (it might contain leadin '//') | ||
| while (path.length() && path[0] == '/') { |
There was a problem hiding this comment.
What do you think about having this is mds_check_access() itself?
f00af71 to
9a7693f
Compare
|
jenkins test make check |
9a7693f to
5eb4f6b
Compare
|
This PR is under test in https://tracker.ceph.com/issues/67252. |
|
I see a test failure on my run https://pulpito.ceph.com/khiremat-2024-07-30_06:33:39-fs:functional-wip-khiremat-58878-use-mds-auth-caps-issue-0-distro-default-smithi/ Investigating. I will update on findings. |
711a9d4 to
26a2f6b
Compare
It was a test bug. The new_file creation path was in correct w.r.t the mountpoint. Fixed that. |
db90f1f to
a40b089
Compare
Fixes: https://tracker.ceph.com/issues/67212 Signed-off-by: Kotresh HR <khiremat@redhat.com>
The "Client::mds_check_access" expects the target_path without leading '/' as it eventually calls the "MDSCapMatch::match_path" which expects the target_path passed to be with out leading '/' as well. The single leading '/' was being removed. But absolute path constructed did have leading '//', so removing all the leading '/' was necessary. This causes the clients not to be able to access a particular path even though it has a rw permission on the specific path. The patche fixes the leading '//' issue. Fixes: https://tracker.ceph.com/issues/67212 Signed-off-by: Kotresh HR <khiremat@redhat.com>
a40b089 to
2e2adb2
Compare
|
The test has passed. But there is different warning not related to test. See below. |
|
jenkins retest this please |
Sorry, what warning? |
* refs/pull/58878/head: client: Fix leading / issue with mds_check_access qa: Add mds caps test for testing fs read and a path rw Reviewed-by: Xiubo Li <xiubli@redhat.com> Reviewed-by: Patrick Donnelly <pdonnell@redhat.com> Reviewed-by: Venky Shankar <vshankar@redhat.com>
|
That's a known issue - https://tracker.ceph.com/issues/66639 |
|
jenkins test docs |
|
jenkins test make check |
|
jenkins test make check arm64 |
* refs/pull/58878/head: client: Fix leading / issue with mds_check_access qa: Add mds caps test for testing fs read and a path rw Reviewed-by: Patrick Donnelly <pdonnell@redhat.com> Reviewed-by: Xiubo Li <xiubli@redhat.com> Reviewed-by: Venky Shankar <vshankar@redhat.com>
|
The above run is with |
|
Oh, these unrelated jenkins failures are annoying. |
|
jenkins test make check |
|
jenkins test windows |
1 similar comment
|
jenkins test windows |
vshankar
left a comment
There was a problem hiding this comment.
From /a/vshankar-2024-07-31_07:55:21-fs-wip-vshankar-testing-20240730.074544-debug-testing-default-smithi/7828173 (which is still running)
2024-07-31T08:48:19.401 INFO:tasks.cephfs_test_runner:Tests the file creation using 'touch' cmd on a specific path ... ok
The test has passed. I'm comfortable merging this change albeit prematurely.
|
Just FYI - fs suite run: https://tracker.ceph.com/projects/cephfs/wiki/Main#wip-vshankar-testing-20240731064922-debug |
The "Client::mds_check_access" expects the target_path without leading '/' as it eventually calls the "MDSCapMatch::match_path" which expects the target_path passed to be with out leading '/' as well.
The single leading '/' was being removed. But absolute path constructed did have leading '//', so removing all the leading '/' was necessary.
This causes the clients not to be able to access a particular path even though it has a rw permission on the specific path.
The patches fixes the leading '//' issue.
Fixes: https://tracker.ceph.com/issues/67212
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 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 windowsjenkins test rook e2e