Permalink
Please sign in to comment.
Browse files
Merge pull request #2458 from natefinch/fix-1370896
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/1822/)
- Loading branch information...
Showing
with
447 additions
and 135 deletions.
- +1 −1 cmd/jujud/util/util.go
- +4 −0 upgrades/export_test.go
- +4 −0 upgrades/operations.go
- +86 −5 upgrades/steps124.go
- +155 −0 upgrades/steps124_test.go
- +1 −1 upgrades/upgrade_test.go
- +20 −31 utils/syslog/config.go
- +90 −31 utils/syslog/config_test.go
- +30 −39 utils/syslog/testing/syslogconf.go
- +4 −4 worker/rsyslog/rsyslog_common_test.go
- +38 −16 worker/rsyslog/rsyslog_test.go
- +14 −7 worker/rsyslog/worker.go
Oops, something went wrong.
0 comments on commit
3a6ebe0