-
Notifications
You must be signed in to change notification settings - Fork 68
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
Make logrotate.d file not override global settings #749
Conversation
logrotate.d confs are loaded via "dumb" include statement in the logrotate.conf which "Reads the file given as an argument as if it was included inline where the include directive appears." (from manpage). Previous version was applying the 'rotate', 'weekly', 'compress', 'missingok', and 'datetext' parameters outside of the mustache brackets for the individual log files. This would override any settings made in the main system 'logrotate.conf' file before the include statement, thus altering global logrotate behavior.
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.
Please rebase these changes on the xdmod8.1 branch.
Thank you for bringing this issue to our attention. I didn't realize those directives would override other files. |
Issues addressed as per our convo.
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.
Looks rebased/good now. Thank you again for bringing this to our attention.
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
Moved common logrotate parameters inside of the brackets for the various logfiles.
Description
logrotate.d confs are loaded via "dumb" include statement in the logrotate.conf which "Reads the file given as an argument as if it was included inline where the include directive appears." (from logrotate manpage).
Previous version was applying the 'rotate', 'weekly', 'compress', 'missingok', and 'datetext' parameters outside of the mustache brackets for the individual log files. This would override any settings made in the main system 'logrotate.conf' file before the include statement, thus potentially altering global logrotate behavior for the system.
Motivation and Context
xdmod shouldn't alter global logrotate.conf parameters (thus potentially altering logrotate behavior for the entire system without knowledge of the system administrators).
Tests performed
Running this version on our sytsems -- had to change the file as it was altering our global logrotate configuration.
Types of changes
Checklist: