Resolve the cache self test failure when drop privs is enabled#2120
Merged
jhiemstrawisc merged 5 commits intoMay 22, 2025
Conversation
244d184 to
8713e4f
Compare
7 tasks
8713e4f to
047b3b2
Compare
047b3b2 to
afb20f6
Compare
This was referenced May 5, 2025
jhiemstrawisc
requested changes
May 8, 2025
bb458c8 to
3d1c5d3
Compare
This new package also combines the self_monitor logics in origin and cache
…ir when drop privs is enabled - Modified the functions in self test package impacted by the drop privs mode - Tell the plugin what are the test file transplant destinations by setting the environment variables (hardcoded the destination paths) - The self-test file is named "self-test-*.txt" (* is a random string decided by os.CreateTemp) when it gets created in its birthplace, but it is renamed to "self-test-cache-server.txt" and overwrite the previous file when it is transplanted to the selfTest dir. The original file in the birthplace will be deleted after the transplant.
- Set the default values of Origin/Cache_SelfTestInterval - Move self-monitoring.go to xrootd pkg, avoid creating a new pkg - Use filepath.Join to construct the path - Other minor improvements
3d1c5d3 to
f2385ee
Compare
jhiemstrawisc
requested changes
May 14, 2025
- Move Origin/Cache's SelfTestInterval fallback code to InitServer func so that the fallback value could be picked up by `pelican config summary`
299876e to
7b954e2
Compare
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.
This PR needs to work together with another PR in the xrdhttp-pelican plugin repo. That was already merged in and picked up by Pelican so you don't need to do any extra steps except pulling a Pelican image after 7.15.
self_monitorto resolve the import cycles (xrootdpackage can't be imported tocachepackage). This package integrates the entry point for both origin and cache's self test.How to test
Run Pelican Cache in drop privs mode by setting the following configs in
pelican.yamlBefore this PR, the web UI is unable to open. With this one, the web UI works fine.
Update:
Done in a subsequent PR #2292 : Found logs in Cache logs suggesting other 6 directories needed to set correct permissions. They don't crash the server abruptly though.