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

Issue 74330044: Ensure agentconfig datadir is not empty (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
10 years, 1 month ago by wallyworld
Modified:
10 years, 1 month ago
Reviewers:
dimitern, jameinel, mp+210526
Visibility:
Public.

Description

Ensure agentconfig datadir is not empty When reading format 1.16 agent config files, the new 1.18 datadir attribute was not being set to the new default value and instead was being written out as "". This broke upgrades. I also included some drive by changes to better log errors so that we can diagnose issues by looking at debug-log. https://code.launchpad.net/~wallyworld/juju-core/old-agentconf-datadir/+merge/210526 (do not edit description out of merge proposal)

Patch Set 1 #

Total comments: 1
Unified diffs Side-by-side diffs Delta from patch set Stats (+29 lines, -12 lines) Patch
A [revision details] View 1 chunk +2 lines, -0 lines 0 comments Download
M agent/agent.go View 1 chunk +3 lines, -0 lines 0 comments Download
M agent/format-1.16.go View 1 chunk +2 lines, -0 lines 0 comments Download
M agent/format-1.16_whitebox_test.go View 2 chunks +5 lines, -3 lines 0 comments Download
M agent/format-1.18.go View 1 chunk +3 lines, -0 lines 1 comment Download
M agent/format-1.18_whitebox_test.go View 2 chunks +4 lines, -2 lines 0 comments Download
M cmd/jujud/agent.go View 2 chunks +2 lines, -1 line 0 comments Download
M container/userdata.go View 2 chunks +2 lines, -1 line 0 comments Download
M environs/cloudinit.go View 1 chunk +1 line, -1 line 0 comments Download
M provider/manual/environ.go View 2 chunks +2 lines, -1 line 0 comments Download
M worker/upgrader/error.go View 2 chunks +3 lines, -3 lines 0 comments Download

Messages

Total messages: 3
wallyworld
Please take a look.
10 years, 1 month ago (2014-03-12 02:33:59 UTC) #1
jameinel
I'm a little concerned that this might break local provider after upgrade, since I think ...
10 years, 1 month ago (2014-03-12 12:22:11 UTC) #2
dimitern
10 years, 1 month ago (2014-03-12 13:51:39 UTC) #3
LGTM, this is good to land as is and I'll address the migration issues in a
follow-up (Jobs and DataDir + local provider specific issues).

https://codereview.appspot.com/74330044/diff/1/agent/format-1.18.go
File agent/format-1.18.go (right):

https://codereview.appspot.com/74330044/diff/1/agent/format-1.18.go#newcode81
agent/format-1.18.go:81: if config.dataDir == "" {
This shouldn't happen (dataDir being ""), but I'll fix this in a follow-up along
with the other issues after yours lands.
Sign in to reply to this message.

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