-
Notifications
You must be signed in to change notification settings - Fork 27
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Xrootd log levels now configurable #660
Xrootd log levels now configurable #660
Conversation
config/resources/defaults.yaml
Outdated
XrootdScitokensTrace: all | ||
XrootdPssTrace: all | ||
XrootdCmsTrace: all | ||
XrootdOfsTrace: all | ||
XrootdPfcTrace: info | ||
XrootdXrdTrace: all -sched | ||
XrootdXrootdTrace: emsg login stall redirect | ||
XrootdPssSetOptCache: DebugLevel 3 | ||
XrootdPssSetOptOrigin: DebugLevel 1 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The defaults are way too verbose and impact performance. Here are the defaults OSG ships with:
XrootdScitokensTrace: all | |
XrootdPssTrace: all | |
XrootdCmsTrace: all | |
XrootdOfsTrace: all | |
XrootdPfcTrace: info | |
XrootdXrdTrace: all -sched | |
XrootdXrootdTrace: emsg login stall redirect | |
XrootdPssSetOptCache: DebugLevel 3 | |
XrootdPssSetOptOrigin: DebugLevel 1 | |
XrootdScitokensTrace: none | |
XrootdPssTrace: off | |
XrootdCmsTrace: -all | |
XrootdOfsTrace: -all | |
XrootdPfcTrace: info | |
XrootdXrdTrace: -all | |
XrootdXrootdTrace: emsg login stall redirect | |
XrootdPssSetOptCache: DebugLevel 1 | |
XrootdPssSetOptOrigin: DebugLevel 1 |
in addition, it would be nice to be able to set http.trace
. The default should be none
and http.trace all
leaks sensitive information but I think http.trace debug
or http.trace all -request -response
should be safe.
We tell people that if they want to debug they should set
ofs.trace all
xrd.trace all -sched
cms.trace all
scitokens.trace all
pss.setopt DebugLevel 3
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have some opinions about the defaults; the code looks fine at a glance but I'm not familiar enough with the codebase so someone else should look at that.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A few thoughts:
- With @turetske working on configurations where both the cache and origin are running under the same pelican process, we're finding it's bad to have things named generically "Xrootd". We should split it out to "Cache" and "Origin" prefixes.
- This gets really into the nitty-gritty of XRootD logging configuration and exposes its inconsistencies. To understand what
all -sched
does, you need to be an xrootd expert. We use simple logging levels elsewhere -- can we keep in that paradigm?
What about a config like this:
Logging:
Level: Error
CategoryLevels:
CategoryName1: Debug
CategoryName2: Info
CategoryName3: Error
Where we then map the different category names to different xrootd configurations.
The downside of the above approach is schema verification is tough. An alternate would be:
Logging:
Level: Error
DebugLevel: ["CategoryName1"]
InfoLevel: ["CategoryName2"]
ErrorLevel: ["CategoryName3"]
I'm leaning toward the former scheme but open to input.
CategoryName as in "pfc", "pss", etc.? |
5d5ee0d
to
3ab9112
Compare
@bbockelm @matyasselmeci assuming these tests pass, take a look at the changes. Seems to work and is more user friendly. A question I have tho is for the link below, what I should do for Origin_Xrootd since our/osg defaults are very specific? Let me know any feedback and if there are any typos (there was a lot of copy/pasting) |
Does it catch invalid log levels? It would get frustrating to have |
Yes, the The statement: pelican/xrootd/xrootd_config.go Lines 631 to 640 in 3ab9112
|
Yes, if the user entered an unrecognized value, they should be alerted to that. |
Sounds good, I will make those changes! |
Moves many of the xrootd log levels to be configurable. Set defaults in defaults.yaml to what we previously had set.
This revised to config options to be more user friendly and seperated them out into `origin` and `cache` categories.
Changes include: - the user is now notified if their log level config value is invalid and it is set to default - Cms was moved from caches to origins where it should be - Pss controls now pss.trace and pss.setopt for easier usability
3ab9112
to
3158bbf
Compare
@matyasselmeci @bbockelm Next round of revisions are in! Let me know if there is any more feedback. Some questions/concerns I still have are:
|
@bbockelm might have ideas but I'd prefer to get this even if "info" doesn't have very good values, and get better values in a later PR. |
@matyasselmeci I chatted with Brian this morning, and he's short on time for a review. After Joe's most recent changes, are you happy with merging this? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. Thanks!
Moves many of the xrootd log levels to be configurable. Set defaults in
defaults.yaml
to what we previously had set.