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

Issue 82960044: agent/agent: add StateServingInfo to config

Can't Edit
Can't Publish+Mail
Start Review
Created:
10 years ago by mfoord
Modified:
10 years ago
Reviewers:
mp+212874, rog
Visibility:
Public.

Description

agent/agent: add StateServingInfo to config Add StateServingInfo and SetStateServingInfo to configInternal, along with related changes to flow the information through (including marshalling and unmarshalling). https://code.launchpad.net/~mfoord/juju-core/stateservinginfo/+merge/212874 (do not edit description out of merge proposal)

Patch Set 1 #

Total comments: 10

Patch Set 2 : agent/agent: add StateServingInfo to config #

Total comments: 3
Unified diffs Side-by-side diffs Delta from patch set Stats (+333 lines, -60 lines) Patch
A [revision details] View 1 1 chunk +2 lines, -0 lines 0 comments Download
M agent/agent.go View 1 6 chunks +32 lines, -13 lines 1 comment Download
M agent/agent_test.go View 1 3 chunks +47 lines, -0 lines 0 comments Download
M agent/bootstrap.go View 1 3 chunks +11 lines, -18 lines 0 comments Download
M agent/bootstrap_test.go View 1 4 chunks +37 lines, -6 lines 0 comments Download
M agent/format-1.16.go View 1 2 chunks +31 lines, -3 lines 1 comment Download
M agent/format-1.16_whitebox_test.go View 2 chunks +41 lines, -0 lines 0 comments Download
M agent/format-1.18.go View 1 6 chunks +36 lines, -6 lines 1 comment Download
M agent/format-1.18_whitebox_test.go View 2 chunks +69 lines, -0 lines 0 comments Download
M cmd/jujud/bootstrap_test.go View 1 chunk +19 lines, -13 lines 0 comments Download
M cmd/jujud/machine.go View 1 1 chunk +8 lines, -1 line 0 comments Download

Messages

Total messages: 4
mfoord
Please take a look.
10 years ago (2014-04-01 17:08:29 UTC) #1
rog
LGTM with the following addressed. Thanks! https://codereview.appspot.com/82960044/diff/1/agent/agent.go File agent/agent.go (right): https://codereview.appspot.com/82960044/diff/1/agent/agent.go#newcode158 agent/agent.go:158: // SetStateServingInfo sets ...
10 years ago (2014-04-01 17:32:12 UTC) #2
mfoord
Please take a look.
10 years ago (2014-04-02 10:46:24 UTC) #3
rog
10 years ago (2014-04-02 12:17:38 UTC) #4
LGTM with a few trivial suggestions below.

https://codereview.appspot.com/82960044/diff/20001/agent/agent.go
File agent/agent.go (right):

https://codereview.appspot.com/82960044/diff/20001/agent/agent.go#newcode316
agent/agent.go:316: config0, err :=
NewAgentConfig(configParams.AgentConfigParams)
s/config0/config/

https://codereview.appspot.com/82960044/diff/20001/agent/format-1.16.go
File agent/format-1.16.go (right):

https://codereview.appspot.com/82960044/diff/20001/agent/format-1.16.go#newco...
agent/format-1.16.go:102: if len(stateServerKey) != 0 {
d

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

https://codereview.appspot.com/82960044/diff/20001/agent/format-1.18.go#newco...
agent/format-1.18.go:109: if config.servingInfo.StatePort == 0 &&
len(format.StateAddresses) > 0 {
 if config.servingInfo.StatePort == 0 {
     if len(format.StateAddresses) == 0 {
         return nil, fmt.Errorf("no state addresses found to infer state port
from")
     }
     ....
  }

and lose the else (better error message, and marginally more understandable
code, i think)
Sign in to reply to this message.

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