This repository has been archived by the owner on Aug 29, 2018. It is now read-only.
logshifter/config.go: modify logshifter config reader such that blank lines (line == \n) don't cause reading to stop #6138
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.
While reading logshifter config, continue if line is only a newline. This allows config reading to continue until no more reading can occur rather than stopping as soon as a blank line is encountered.
I ran into this with some hosts configured using an old version of puppet-openshift_origin which would deploy a logshifter config with blank lines where conditional statements were not trimmed. This has since been fixed in the puppet module (via 575deb5) which no longer introduces blank lines to the file. I figured it couldn't hurt to attack this from both sides.
Thanks!