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

Issue 14395043: agent: implement InitializeState

Can't Edit
Can't Publish+Mail
Start Review
Created:
10 years, 7 months ago by rog
Modified:
10 years, 6 months ago
Reviewers:
mue, mp+189384, fwereade
Visibility:
Public.

Description

agent: implement InitializeState We combine two existing functions to make one that hopefully simplifies things a little. The previous logic in cmd/jujud/bootstrap.go used two agent.Configs (the bootstrap config for the state connection info, and the machine config to save the password); we change the logic to use the machine agent's configuration only, leaving the bootstrap config for backward compatibility only. https://code.launchpad.net/~rogpeppe/juju-core/442-agent-initialize-state/+merge/189384 (do not edit description out of merge proposal)

Patch Set 1 #

Patch Set 2 : agent: implement InitializeState #

Patch Set 3 : agent: implement InitializeState #

Total comments: 4

Patch Set 4 : agent: implement InitializeState #

Total comments: 12

Patch Set 5 : agent: implement InitializeState #

Patch Set 6 : agent: implement InitializeState #

Patch Set 7 : agent: implement InitializeState #

Total comments: 3

Patch Set 8 : agent: implement InitializeState #

Unified diffs Side-by-side diffs Delta from patch set Stats (+423 lines, -238 lines) Patch
A [revision details] View 1 2 3 4 5 6 7 1 chunk +2 lines, -0 lines 0 comments Download
M agent/agent.go View 1 2 3 4 18 chunks +17 lines, -84 lines 0 comments Download
M agent/agent_test.go View 2 chunks +3 lines, -2 lines 0 comments Download
A agent/bootstrap.go View 1 2 3 4 5 6 1 chunk +146 lines, -0 lines 0 comments Download
A agent/bootstrap_test.go View 1 2 3 4 1 chunk +164 lines, -0 lines 0 comments Download
M agent/export_test.go View 1 chunk +4 lines, -0 lines 0 comments Download
M agent/format-1.12_whitebox_test.go View 2 chunks +6 lines, -6 lines 0 comments Download
M agent/format-1.16_whitebox_test.go View 4 chunks +5 lines, -13 lines 0 comments Download
M agent/format_whitebox_test.go View 1 chunk +6 lines, -9 lines 0 comments Download
M cmd/jujud/bootstrap.go View 3 chunks +32 lines, -32 lines 0 comments Download
M environs/bootstrap/bootstrap.go View 2 chunks +0 lines, -52 lines 0 comments Download
M environs/bootstrap/bootstrap_test.go View 1 chunk +1 line, -1 line 0 comments Download
M environs/cloudinit/cloudinit.go View 3 chunks +14 lines, -11 lines 0 comments Download
M provider/local/environ.go View 1 2 3 4 7 chunks +23 lines, -28 lines 0 comments Download

Messages

Total messages: 9
rog
Please take a look.
10 years, 6 months ago (2013-10-07 18:08:49 UTC) #1
rog
Please take a look.
10 years, 6 months ago (2013-10-08 09:42:53 UTC) #2
mue
LGTM, only minor comments. https://codereview.appspot.com/14395043/diff/6001/agent/agent.go File agent/agent.go (right): https://codereview.appspot.com/14395043/diff/6001/agent/agent.go#newcode204 agent/agent.go:204: config0, err := NewAgentConfig(params.AgentConfigParams) Only ...
10 years, 6 months ago (2013-10-08 10:00:23 UTC) #3
fwereade
Looking good, but a few comments/questions https://codereview.appspot.com/14395043/diff/9001/agent/agent.go File agent/agent.go (right): https://codereview.appspot.com/14395043/diff/9001/agent/agent.go#newcode144 agent/agent.go:144: // we should ...
10 years, 6 months ago (2013-10-08 10:31:02 UTC) #4
rog
Please take a look. https://codereview.appspot.com/14395043/diff/9001/agent/agent.go File agent/agent.go (right): https://codereview.appspot.com/14395043/diff/9001/agent/agent.go#newcode144 agent/agent.go:144: // we should remove the ...
10 years, 6 months ago (2013-10-09 09:18:09 UTC) #5
rog
Please take a look.
10 years, 6 months ago (2013-10-09 09:23:33 UTC) #6
rog
Please take a look.
10 years, 6 months ago (2013-10-09 09:26:54 UTC) #7
fwereade
LGTM with the below. If you want to argue about constraint error strings, let's keep ...
10 years, 6 months ago (2013-10-09 10:04:06 UTC) #8
rog
10 years, 6 months ago (2013-10-09 12:36:27 UTC) #9
Please take a look.

https://codereview.appspot.com/14395043/diff/13001/constraints/constraints_te...
File constraints/constraints_test.go (right):

https://codereview.appspot.com/14395043/diff/13001/constraints/constraints_te...
constraints/constraints_test.go:103: err:     `bad constraint "arch=": already
set`,
On 2013/10/09 10:04:06, fwereade wrote:
> Eh, actually, I don't like this. It introduces stuttering in one case,and
> irrelevant info in the other. Please just restore what we had originally.

The reason I was making this change is that I was confused by
the error message when using it for real in one case (AFAIR
I used 1024m rather than 1024M) and wanted to see the
actual value.

The value is not necessarily irrelevant in the "already set"
case - the value might give the user context and let them
know where that constraint value is coming from.

We could lose the value from all the subsidiary errors - then we'd always show
all the relevant data without stutter.

I'll do that, if that's ok, but will leave it to another CL.
Sign in to reply to this message.

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