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

Issue 6336047: cmd/jujud: make provisioner use StateInfo from environment.

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

Description

cmd/jujud: make provisioner use StateInfo from environment. This means we can pass in a localhost address to the provisioning agent and it will nonetheless use the correct address for zookeeper when firing up clients. Some rearrangement of testing code was necessary too. https://code.launchpad.net/~rogpeppe/juju-core/provisioner-stateinfo/+merge/111598 (do not edit description out of merge proposal)

Patch Set 1 #

Patch Set 2 : cmd/jujud: make provisioner use StateInfo from environment. #

Total comments: 5

Patch Set 3 : cmd/jujud: make provisioner use StateInfo from environment. #

Patch Set 4 : cmd/jujud: make provisioner use StateInfo from environment. #

Total comments: 7

Patch Set 5 : cmd/jujud: make provisioner use StateInfo from environment. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+182 lines, -120 lines) Patch
A [revision details] View 1 2 3 4 1 chunk +2 lines, -0 lines 0 comments Download
M cmd/jujud/initzk_test.go View 2 chunks +4 lines, -0 lines 0 comments Download
M cmd/jujud/machine_test.go View 3 chunks +3 lines, -0 lines 0 comments Download
M cmd/jujud/provisioning.go View 1 2 3 2 chunks +10 lines, -0 lines 0 comments Download
M cmd/jujud/provisioning_test.go View 1 2 3 4 21 chunks +102 lines, -97 lines 0 comments Download
M cmd/jujud/suite_test.go View 1 2 chunks +2 lines, -0 lines 0 comments Download
M environs/dummy/environs.go View 1 2 3 14 chunks +50 lines, -22 lines 0 comments Download
M juju/conn_test.go View 1 2 1 chunk +1 line, -1 line 0 comments Download
M testing/zk.go View 1 3 chunks +8 lines, -0 lines 0 comments Download

Messages

Total messages: 5
rog
Please take a look.
11 years, 10 months ago (2012-06-22 13:55:11 UTC) #1
niemeyer
Looks appropriate. A few comments: https://codereview.appspot.com/6336047/diff/2001/cmd/jujud/provisioning.go File cmd/jujud/provisioning.go (right): https://codereview.appspot.com/6336047/diff/2001/cmd/jujud/provisioning.go#newcode58 cmd/jujud/provisioning.go:58: origInfo *state.Info As we ...
11 years, 10 months ago (2012-06-22 14:19:10 UTC) #2
rog
Please take a look. https://codereview.appspot.com/6336047/diff/2001/cmd/jujud/provisioning.go File cmd/jujud/provisioning.go (right): https://codereview.appspot.com/6336047/diff/2001/cmd/jujud/provisioning.go#newcode58 cmd/jujud/provisioning.go:58: origInfo *state.Info On 2012/06/22 14:19:10, ...
11 years, 10 months ago (2012-06-22 16:16:22 UTC) #3
niemeyer
LGTM, thanks. https://codereview.appspot.com/6336047/diff/5001/cmd/jujud/provisioning_test.go File cmd/jujud/provisioning_test.go (right): https://codereview.appspot.com/6336047/diff/5001/cmd/jujud/provisioning_test.go#newcode31 cmd/jujud/provisioning_test.go:31: dummy.Reset() This should be on TearDown rather ...
11 years, 10 months ago (2012-06-22 16:28:53 UTC) #4
rog
11 years, 10 months ago (2012-06-22 16:34:14 UTC) #5
*** Submitted:

cmd/jujud: make provisioner use StateInfo from environment.

This means we can pass in a localhost address to the provisioning
agent and it will nonetheless use the correct address for zookeeper
when firing up clients.

Some rearrangement of testing code was necessary too.

R=niemeyer
CC=
https://codereview.appspot.com/6336047

https://codereview.appspot.com/6336047/diff/5001/cmd/jujud/provisioning_test.go
File cmd/jujud/provisioning_test.go (right):

https://codereview.appspot.com/6336047/diff/5001/cmd/jujud/provisioning_test....
cmd/jujud/provisioning_test.go:31: dummy.Reset()
On 2012/06/22 16:28:53, niemeyer wrote:
> This should be on TearDown rather than here.

Done.

https://codereview.appspot.com/6336047/diff/5001/cmd/jujud/provisioning_test....
cmd/jujud/provisioning_test.go:35: op := make(chan dummy.Operation, 20)
On 2012/06/22 16:28:53, niemeyer wrote:
> Let's please use something like 512 then. If it's not supposed to block we
have
> no reason to not use that memory for the short period that the test is
running,
> in exchange for not having to debug a test below next year when the number of
> operations go over 20.

Done.

https://codereview.appspot.com/6336047/diff/5001/cmd/jujud/provisioning_test....
cmd/jujud/provisioning_test.go:107: // ignore
On 2012/06/22 16:28:53, niemeyer wrote:
> Comment may go now.

Done.
Sign in to reply to this message.

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