Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(3003)

Issue 66540044: Added LogDir to agent conf, upgrade steps (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
10 years, 2 months ago by dimitern
Modified:
10 years, 2 months ago
Reviewers:
axw, mp+207372, fwereade, rog
Visibility:
Public.

Description

Added LogDir to agent conf, upgrade steps As a preparation for the upcoming debug-log command and API changes, first we need to get rid of the hard-coded /var/log/juju strings across the codebase and add an agent config setting for LogDir. To make upgrades easier, I added some upgrade steps to add the log dir if it's missing and an additional function in the agent package, called UpgradeConfig, which allows changing any value of the agent config and write it back. https://code.launchpad.net/~dimitern/juju-core/310-log-location-agent-conf/+merge/207372 (do not edit description out of merge proposal)

Patch Set 1 #

Patch Set 2 : Added LogDir to agent conf, upgrade steps #

Total comments: 1

Patch Set 3 : Added LogDir to agent conf, upgrade steps #

Total comments: 6
Unified diffs Side-by-side diffs Delta from patch set Stats (+247 lines, -80 lines) Patch
A [revision details] View 1 2 1 chunk +2 lines, -0 lines 0 comments Download
M agent/agent.go View 1 2 6 chunks +25 lines, -1 line 1 comment Download
M agent/format-1.12_whitebox_test.go View 1 chunk +8 lines, -2 lines 1 comment Download
M agent/format-1.16_whitebox_test.go View 3 chunks +6 lines, -2 lines 0 comments Download
A agent/upgrades.go View 1 chunk +91 lines, -0 lines 2 comments Download
M cmd/juju/debuglog.go View 2 chunks +2 lines, -1 line 1 comment Download
M cmd/juju/debuglog_test.go View 2 chunks +3 lines, -2 lines 0 comments Download
M cmd/juju/help_topics.go View 1 chunk +1 line, -1 line 0 comments Download
M cmd/jujud/agent.go View 1 2 1 chunk +4 lines, -0 lines 0 comments Download
M container/kvm/kvm.go View 2 chunks +2 lines, -1 line 0 comments Download
M container/lxc/lxc.go View 4 chunks +6 lines, -4 lines 1 comment Download
M container/lxc/lxc_test.go View 2 chunks +2 lines, -1 line 0 comments Download
M environs/cloudinit.go View 1 2 2 chunks +1 line, -4 lines 0 comments Download
M environs/cloudinit/cloudinit_test.go View 1 2 7 chunks +7 lines, -7 lines 0 comments Download
M environs/cloudinit_test.go View 1 2 1 chunk +1 line, -1 line 0 comments Download
M log/syslog/config.go View 1 2 4 chunks +9 lines, -7 lines 0 comments Download
M log/syslog/config_test.go View 1 2 4 chunks +7 lines, -6 lines 0 comments Download
M log/syslog/testing/syslogconf.go View 1 2 4 chunks +6 lines, -4 lines 0 comments Download
M provider/azure/customdata_test.go View 1 2 2 chunks +2 lines, -1 line 0 comments Download
M provider/local/environ.go View 1 2 1 chunk +7 lines, -7 lines 0 comments Download
A upgrades/agentconf.go View 1 chunk +20 lines, -0 lines 0 comments Download
M upgrades/rsyslogconf.go View 2 chunks +2 lines, -2 lines 0 comments Download
M upgrades/rsyslogconf_test.go View 3 chunks +3 lines, -2 lines 0 comments Download
M upgrades/steps118.go View 1 2 1 chunk +5 lines, -0 lines 0 comments Download
M upgrades/steps118_test.go View 1 2 1 chunk +2 lines, -1 line 0 comments Download
M worker/deployer/export_test.go View 1 2 1 chunk +1 line, -2 lines 0 comments Download
M worker/deployer/simple.go View 1 2 5 chunks +8 lines, -10 lines 0 comments Download
M worker/deployer/simple_test.go View 1 2 9 chunks +14 lines, -11 lines 0 comments Download

Messages

Total messages: 6
dimitern
Please take a look.
10 years, 2 months ago (2014-02-20 09:27:27 UTC) #1
dimitern
Please take a look.
10 years, 2 months ago (2014-02-20 09:35:02 UTC) #2
axw
Just stumbled across this... https://codereview.appspot.com/66540044/diff/20001/upgrades/rsyslogconf.go File upgrades/rsyslogconf.go (left): https://codereview.appspot.com/66540044/diff/20001/upgrades/rsyslogconf.go#oldcode28 upgrades/rsyslogconf.go:28: configRenderer := syslog.NewAccumulateConfig(machineTag, syslogPort, namespace) ...
10 years, 2 months ago (2014-02-24 09:41:40 UTC) #3
dimitern
Please take a look.
10 years, 2 months ago (2014-02-26 09:13:51 UTC) #4
rog
A good direction, but I have a few queries and suggestions. https://codereview.appspot.com/66540044/diff/40001/agent/agent.go File agent/agent.go (right): ...
10 years, 2 months ago (2014-02-26 09:51:31 UTC) #5
fwereade
10 years, 2 months ago (2014-02-27 13:19:51 UTC) #6
just a quick comment

https://codereview.appspot.com/66540044/diff/40001/agent/upgrades.go
File agent/upgrades.go (right):

https://codereview.appspot.com/66540044/diff/40001/agent/upgrades.go#newcode29
agent/upgrades.go:29: config := oldConfig.(*configInternal)
On 2014/02/26 09:51:32, rog wrote:
> This is the kind of thing that makes me sad about
> exposing interfaces rather than concrete types.
> The signature of this function purports to accept anything that implements the
> Config interface, but actually we panic unless it's
> something that's been obtained in the right way.
> 
> Please can we not do this, and rather use the methods
> that are defined on the interface type?
> 
> And I'm not that keen on the "only change if non-zero"
> thing either - it means that we can't reset an
> attribute even if we want to.

+100 to all this, apart from the implication that interfaces are the problem.
Can we not just put this func into the Config interface?
Sign in to reply to this message.

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b