Skip to content
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

Merged
merged 1 commit into from
Sep 10, 2018

Conversation

danielmitterdorfer
Copy link
Member

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

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
@danielmitterdorfer danielmitterdorfer added bug Something's wrong :Config Config file format changes, new properties, ... labels Aug 30, 2018
@danielmitterdorfer danielmitterdorfer added this to the 1.0.1 milestone Aug 30, 2018
Copy link
Contributor

@dliappis dliappis left a 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
}
}
}
Copy link
Contributor

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.

Copy link
Contributor

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.

Copy link
Contributor

@dliappis dliappis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@danielmitterdorfer
Copy link
Member Author

Thanks for the review!

@danielmitterdorfer danielmitterdorfer merged commit d6626f9 into master Sep 10, 2018
@danielmitterdorfer danielmitterdorfer deleted the disable-automatic-rotation branch September 10, 2018 11:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something's wrong :Config Config file format changes, new properties, ...
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants