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

Issue 6564063: state: add machine with workers

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

Description

state: add machine with workers We need the workers to be set at creation time otherwise there's a race. https://code.launchpad.net/~rogpeppe/juju-core/090-state-machine-workers/+merge/126768 (do not edit description out of merge proposal)

Patch Set 1 #

Patch Set 2 : state: add machine with workers #

Total comments: 10

Patch Set 3 : state: add machine with workers #

Patch Set 4 : state: add machine with workers #

Unified diffs Side-by-side diffs Delta from patch set Stats (+148 lines, -80 lines) Patch
A [revision details] View 1 2 3 1 chunk +2 lines, -0 lines 0 comments Download
M cmd/juju/ssh_test.go View 1 2 3 1 chunk +1 line, -1 line 0 comments Download
M cmd/juju/status_test.go View 1 2 2 chunks +2 lines, -2 lines 0 comments Download
M cmd/jujud/bootstrap.go View 1 2 1 chunk +1 line, -1 line 0 comments Download
M cmd/jujud/bootstrap_test.go View 1 2 2 chunks +21 lines, -0 lines 0 comments Download
M cmd/jujud/machine_test.go View 1 2 2 chunks +2 lines, -1 line 0 comments Download
M state/assign_test.go View 1 2 22 chunks +25 lines, -25 lines 0 comments Download
M state/life_test.go View 1 2 1 chunk +1 line, -1 line 0 comments Download
M state/machine.go View 1 2 2 chunks +6 lines, -0 lines 0 comments Download
M state/machine_test.go View 1 2 7 chunks +8 lines, -8 lines 0 comments Download
M state/service_test.go View 1 2 1 chunk +1 line, -1 line 0 comments Download
M state/state.go View 1 2 2 chunks +25 lines, -5 lines 0 comments Download
M state/state_test.go View 1 2 3 9 chunks +36 lines, -18 lines 0 comments Download
M state/tools_test.go View 1 2 1 chunk +1 line, -1 line 0 comments Download
M worker/firewaller/firewaller_test.go View 1 2 3 1 chunk +1 line, -1 line 0 comments Download
M worker/machiner/machiner_test.go View 1 2 2 chunks +3 lines, -3 lines 0 comments Download
M worker/provisioner/provisioner_test.go View 1 2 11 chunks +12 lines, -12 lines 0 comments Download

Messages

Total messages: 4
rog
Please take a look.
11 years, 6 months ago (2012-09-27 19:25:31 UTC) #1
niemeyer
Very nice. LGTM with trivials: https://codereview.appspot.com/6564063/diff/2001/cmd/jujud/bootstrap_test.go File cmd/jujud/bootstrap_test.go (right): https://codereview.appspot.com/6564063/diff/2001/cmd/jujud/bootstrap_test.go#newcode72 cmd/jujud/bootstrap_test.go:72: c.Assert(m.Workers(), DeepEquals, []state.WorkerKind{state.MachineWorker, state.ProvisionerWorker, ...
11 years, 6 months ago (2012-09-27 19:39:47 UTC) #2
fwereade
LGTM
11 years, 6 months ago (2012-09-28 08:37:21 UTC) #3
rog
11 years, 6 months ago (2012-09-28 12:45:53 UTC) #4
*** Submitted:

state: add machine with workers

We need the workers to be set at creation
time otherwise there's a race.

R=niemeyer, fwereade
CC=
https://codereview.appspot.com/6564063

https://codereview.appspot.com/6564063/diff/2001/cmd/jujud/bootstrap_test.go
File cmd/jujud/bootstrap_test.go (right):

https://codereview.appspot.com/6564063/diff/2001/cmd/jujud/bootstrap_test.go#...
cmd/jujud/bootstrap_test.go:72: c.Assert(m.Workers(), DeepEquals,
[]state.WorkerKind{state.MachineWorker, state.ProvisionerWorker,
state.FirewallerWorker})
On 2012/09/27 19:39:47, niemeyer wrote:
> This is TestSetMachineId, and it was, in fact, testing only the machine id.
> Base64Config is tested below, and we can now have a TestWorkers.

Done.

https://codereview.appspot.com/6564063/diff/2001/state/machine.go
File state/machine.go (right):

https://codereview.appspot.com/6564063/diff/2001/state/machine.go#newcode49
state/machine.go:49: // Workers returns the workers that the machine agent is
configured
On 2012/09/27 19:39:47, niemeyer wrote:
> // Workers returns the workers that the machine agent for m must run.

Done.

https://codereview.appspot.com/6564063/diff/2001/state/state.go
File state/state.go (right):

https://codereview.appspot.com/6564063/diff/2001/state/state.go#newcode127
state/state.go:127: MachineWorker     WorkerKind = "machine"
On 2012/09/27 19:39:47, niemeyer wrote:
> s/[Mm]achine/[Mm]achiner/; that's how we call it, so we may as well preserve
the
> name.

Done.

https://codereview.appspot.com/6564063/diff/2001/state/state.go#newcode129
state/state.go:129: FirewallerWorker  WorkerKind = "provisioner"
On 2012/09/27 19:39:47, niemeyer wrote:
> Something doesn't look quite right with these. :-)

oops! :-)

https://codereview.appspot.com/6564063/diff/2001/state/state.go#newcode133
state/state.go:133: // that will run the given workers.
On 2012/09/27 19:39:47, niemeyer wrote:
> // AddMachine adds a new machine that when deployed will have a
> // machine agent running the provided workers.

Done.
Sign in to reply to this message.

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