rsyslog upgrade step doesn't set LogDir

Bug #1284020 reported by Andrew Wilkins
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
juju-core
Fix Released
High
Andrew Wilkins

Bug Description

Our rsyslog configuration has a default log directory of /var/log/juju, but is overridden in machine configuration in environs/cloudinit. The upgrade step that rewrites configuration does *not* override the default, though, which will lead to the local provider writing to /var/log/juju instead of ~/.juju/local/log.

Related branches

Revision history for this message
Ian Booth (wallyworld) wrote :

This is easily fixed by passing in the dataDir configured in the agent config to NewAccumulateConfig() and NewForwardConfig() functions and tweaking the templates

Revision history for this message
Andrew Wilkins (axwalk) wrote :

data-dir and log-dir are independent things, you can't necessarily derive one from the other (until log-dir is recorded in agent.conf). Not to say that this isn't easily fixed.

Revision history for this message
Andrew Wilkins (axwalk) wrote :

In a similar vein, the rsyslog config upgrade code just writes to environs.RsyslogConfPath. That's the default location, and may be overridden in environs/cloudinit. In particular, it is different for the local provider, which namespaces things by user.

Revision history for this message
Andrew Wilkins (axwalk) wrote :

... and we don't upgrade unit rsyslog configuration.

Revision history for this message
Tim Penhey (thumper) wrote :

The local provider all-machines.log now is written to /var/log/juju as the apparmor profile for rsyslogd restricts where it can write files,. The local $datadir/log now symlinks to this other file so it is at least there.

Andrew Wilkins (axwalk)
Changed in juju-core:
status: Triaged → In Progress
assignee: nobody → Andrew Wilkins (axwalk)
Andrew Wilkins (axwalk)
Changed in juju-core:
status: In Progress → Fix Committed
milestone: 1.18.0 → 1.17.4
Curtis Hovey (sinzui)
Changed in juju-core:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.