squid: pybind/cephfs, mgr/volumes: introduce non-recursive rmtree(), refactor purge() to use it and add MDS optimizations#65817
Open
rishabh-d-dave wants to merge 10 commits intoceph:squidfrom
Open
Conversation
Method purge() in trash.py calls rmtree() which is recursive method. To avoid Python's recurision limit, switch to non-recursive approach. Path to directory along directory handle are clubbed in to a tuple and that tuple is stored on the stack. Storing directory handle reduces call to opendir() dramatically. Fixes: https://tracker.ceph.com/issues/71648 Signed-off-by: Rishabh Dave <ridave@redhat.com> (cherry picked from commit f9046ca)
Signed-off-by: Rishabh Dave <ridave@redhat.com> (cherry picked from commit 05082a9)
Member
|
@rishabh-d-dave |
d3109fd to
898cce6
Compare
Contributor
Author
|
jenkins test make check |
898cce6 to
db7e737
Compare
Contributor
Author
|
jenkins test make check |
Contributor
Author
|
jenkins test docs |
7afc5fa to
1b0103d
Compare
Contributor
Author
|
jenkins test make check |
Contributor
Author
|
jenkins test windows |
Member
|
jenkins test make check |
Member
|
This PR is under test in https://tracker.ceph.com/issues/73560. |
Run test_python.sh with non-root user. This makes it necessary to change the owner user and group of file system root to be same as this non-root user. This brings testing closer to the real-world scenario and also allows exercising negative tests where an FS op would fail for a non-root user but it would pass for root user. There are few tests that exercise FS operations where root user is needed. Group these tests under a separate class and add extra code for this class that allows these tests to run with root UID and GID. Signed-off-by: Rishabh Dave <ridave@redhat.com> (cherry picked from commit 6021dda) Conflicts: src/test/pybind/test_cephfs.py - PR ceph#64999 is merged in main but not in Squid, causing this branch to have less tests that need to be moved to class TestWithRootUser.
Generating full absolute path for inodes for printing in MDS logs slows down the FS to a great extent especially when the path is very long (imagine a path with 2000 components). Also printing such long paths in MDS logs is not only pointless but also greatly reduces the readability of the MDS logs. Therefore, generate only 10 final components of inode paths for logging. Fixes: https://tracker.ceph.com/issues/72779 Signed-off-by: Rishabh Dave <ridave@redhat.com> (cherry picked from commit 1518690) Conflicts: src/mds/CDir.cc - Certain code region where trimmed inode path was generated was modified to generated inode path but that code region is absent on this branch.
Generating full absolute path for dentries for printing in MDS logs slows the down the FS to a great extent especially when the path is very long (imagine a path with 2000 components). Printing such long paths in MDS logs is not only pointless but also greatly reduces the readability of MDS logs. Therefore, generate only 10 final components of the dentry paths for logging. Fixes: https://tracker.ceph.com/issues/72779 Signed-off-by: Rishabh Dave <ridave@redhat.com> (cherry picked from commit 1430cd6) Conflicts: src/include/filepath.cc - Unlike main branch, this file is absent in squid
Signed-off-by: Rishabh Dave <ridave@redhat.com> (cherry picked from commit 11de1e5) Conflicts: src/mds/MDSAuthCaps.cc src/test/mds/TestMDSAuthCaps.cc - is_capable takes one less argument in Squid compared to main branch version. src/mds/Server.cc src/mds/SessionMap.cc - There is lesser including of other header files in both these files leading to difficulty in patch application in this region.
Path can be virtually infinitely long and logging a long long path (imagine around 2000 path components) is un-useful as well as lowers readability of the log. Therefore, trim before logging. Fixes: https://tracker.ceph.com/issues/72993 Signed-off-by: Rishabh Dave <ridave@redhat.com> (cherry picked from commit bdc8aae) Conflicts: src/include/filepath.cc src/include/filepath.h - Unlink main branch, filepath.cc is absent in this branch. Therefore, the changes must be moved to filepath.h.
Signed-off-by: Rishabh Dave <ridave@redhat.com> (cherry picked from commit e4c301b) Conflicts: src/mds/MDSAuthCaps.cc - is_capable()'s log message is slightly different in Squid branch leading to conflict.
Signed-off-by: Rishabh Dave <ridave@redhat.com> (cherry picked from commit 10e4ccb)
Signed-off-by: Rishabh Dave <ridave@redhat.com> (cherry picked from commit c38a913)
1b0103d to
9d90fd4
Compare
Member
|
jenkins test api |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
backport tracker: https://tracker.ceph.com/issues/73392, https://tracker.ceph.com/issues/73395, https://tracker.ceph.com/issues/73398
backport of #63917
parent tracker: https://tracker.ceph.com/issues/71648, https://tracker.ceph.com/issues/72779, https://tracker.ceph.com/issues/72993
this backport was staged using ceph-backport.sh version 16.0.0.6848
find the latest version at https://github.com/ceph/ceph/blob/main/src/script/ceph-backport.sh