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
fix bug in namespace usage (lp:1461354) #2489
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
|
Status: merge request accepted. Url: http://juju-ci.vapour.ws:8080/job/github-merge-juju |
Build failed: Tests failed |
|
Status: merge request accepted. Url: http://juju-ci.vapour.ws:8080/job/github-merge-juju |
jujubot
added a commit
that referenced
this pull request
Jun 3, 2015
fix bug in namespace usage (lp:1461354) fixes-1461354 https://bugs.launchpad.net/juju-core/+bug/1461354 debug-log EOF: invalid tag and panic seen in state server logs This was a result of me changing the namespace stored in the config to no longer store the leading "-". Instead, it just stores the namespace itself, and where we use it, we have to format it correctly. This seems like a much more sane way to do it, so the value you set is the value that exists, and we don't dictate formatting to everyone using the namespace.... however, it meant I forgot to check for an empty namespace in this one case. (Review request: http://reviews.vapour.ws/r/1855/)
jujubot
added a commit
that referenced
this pull request
Jul 14, 2015
FP: fix 1370896 on master FP of #2458, #2476, and #2489 since the latter two are just fixes to the original PR. Fix 1370896 - juju has conf files in /var/log/juju on instances Fixes https://bugs.launchpad.net/juju-core/+bug/1370896 All the rsyslog configuration files are now created in juju's data directory (by default, /var/lib/juju), instead of the log directory (/var/log/juju). Also added an upgrade step to move the files from old location to new location. I made a couple changes to how you create a SyslogConfig, mostly because it was using a function with a huge number of string arguments, which made it very difficult to read, and to understand what value was being assigned to what field. This made updating the code almost impossible, because of minor positional differences in the function signatures. I changed syslog.NewAccumulateConfig and NewForwardConfig to just take a pointer to a SyslogConfig, since pretty much all they did was set exported fields on the type. Now they just set the non-exported field, and the caller sets everything else in a struct literal. I also changed it so that the Namespace field in SyslogConfig always stays just "Namespace", not "-Namespace", since it's an exported value, and having it be something different than what was set is really confusing. Instead, we just add the dash when rendering to the template. Changed the tests much the same way - just set up the struct and pass it in is so much easier to read than a huge function call with a ton of different string parameters in a random order. Also changed the test template, so that there aren't hard-coded values in it, and instead actually use the values passed in. (Review request: http://reviews.vapour.ws/r/1871/)
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
fixes-1461354
https://bugs.launchpad.net/juju-core/+bug/1461354
debug-log EOF: invalid tag and panic seen in state server logs
This was a result of me changing the namespace stored in the config to no longer store the leading "-". Instead, it just stores the namespace itself, and where we use it, we have to format it correctly. This seems like a much more sane way to do it, so the value you set is the value that exists, and we don't dictate formatting to everyone using the namespace.... however, it meant I forgot to check for an empty namespace in this one case.
(Review request: http://reviews.vapour.ws/r/1855/)