-
Notifications
You must be signed in to change notification settings - Fork 313
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
Disable automatic log rotation #560
Conversation
With this commit we disable automatic log rotation in Rally's out-of-the-box logging configuration because it can lead to race conditions (multiple processes attempting to rollover the log file). We also migrate existing configurations if possible (i.e. the user did not modify it) and provide an example configuration for `logrotate`. Closes #539
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.
Thanks for tackling this!
I left a comment about something that could wrongly fail the comparison during an upgrade.
"propagate": false | ||
} | ||
} | ||
} |
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 think we need a newline here, not just because of POSIX, but since earlier we read the file with read()
the result will be something like: contents='line1\nline2'
while the logging.json
that Rally created itself in versions <1.0.1 has \n
in the last line, so contents wouldn't match.
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.
Actually checked things again on a fresh installation on both MacOS and Linux and seems that using the currently released version of Rally, the logging.json
file does not have a \n
at the last line, so ignore my comment.
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 for the review! |
With this commit we disable automatic log rotation in Rally's
out-of-the-box logging configuration because it can lead to race
conditions (multiple processes attempting to rollover the log file).
We also migrate existing configurations if possible (i.e. the user did
not modify it) and provide an example configuration for
logrotate
.Closes #539