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

Issue 6553064: state,worker: real lifecycle machines watcher

Can't Edit
Can't Publish+Mail
Start Review
Created:
11 years, 7 months ago by niemeyer
Modified:
11 years, 7 months ago
Reviewers:
mp+125919, dave, TheMue
Visibility:
Public.

Description

state,worker: real lifecycle machines watcher This introduces real lifecycle support in the machines watcher, firewaller, provisioner, and fixes it all. Provisioner tests pass again! https://code.launchpad.net/~niemeyer/juju-core/machines-watcher-lifecycle/+merge/125919 Requires: https://code.launchpad.net/~niemeyer/juju-core/fix-environs-watcher/+merge/125918 (do not edit description out of merge proposal)

Patch Set 1 #

Total comments: 6

Patch Set 2 : state,worker: real lifecycle machines watcher #

Unified diffs Side-by-side diffs Delta from patch set Stats (+260 lines, -291 lines) Patch
A [revision details] View 1 1 chunk +2 lines, -0 lines 0 comments Download
M state/state_test.go View 6 chunks +53 lines, -90 lines 0 comments Download
M state/watcher.go View 1 3 chunks +68 lines, -81 lines 0 comments Download
M worker/firewaller/firewaller.go View 5 chunks +51 lines, -36 lines 0 comments Download
M worker/provisioner/provisioner.go View 9 chunks +64 lines, -46 lines 0 comments Download
M worker/provisioner/provisioner_test.go View 11 chunks +22 lines, -38 lines 0 comments Download

Messages

Total messages: 4
niemeyer
Please take a look.
11 years, 7 months ago (2012-09-24 04:00:40 UTC) #1
dave_cheney.net
LGTM. https://codereview.appspot.com/6553064/diff/1/state/watcher.go File state/watcher.go (right): https://codereview.appspot.com/6553064/diff/1/state/watcher.go#newcode321 state/watcher.go:321: // TODO(niemeyer): Alive+Dead == nothing? hmm, i think ...
11 years, 7 months ago (2012-09-24 05:49:59 UTC) #2
TheMue
LGTM, only a small note for an extra CL. https://codereview.appspot.com/6553064/diff/1/state/watcher.go File state/watcher.go (right): https://codereview.appspot.com/6553064/diff/1/state/watcher.go#newcode113 state/watcher.go:113: ...
11 years, 7 months ago (2012-09-24 11:21:31 UTC) #3
niemeyer
11 years, 7 months ago (2012-09-24 17:04:08 UTC) #4
*** Submitted:

state,worker: real lifecycle machines watcher

This introduces real lifecycle support in the machines watcher,
firewaller, provisioner, and fixes it all.

Provisioner tests pass again!

R=dfc, TheMue
CC=
https://codereview.appspot.com/6553064

https://codereview.appspot.com/6553064/diff/1/state/watcher.go
File state/watcher.go (right):

https://codereview.appspot.com/6553064/diff/1/state/watcher.go#newcode113
state/watcher.go:113: changeChan    chan *ServicesChange
On 2012/09/24 11:21:31, TheMue wrote:
> s/changeChan/out/ in extra CL.

Yes, all of them have to be redone along similar lines of what this CL did.

https://codereview.appspot.com/6553064/diff/1/state/watcher.go#newcode321
state/watcher.go:321: // TODO(niemeyer): Alive+Dead == nothing?
On 2012/09/24 05:49:59, dfc wrote:
> hmm, i think there is an argument that a change message that sees a machine
> arrive alive, then die is valid.
> 
> The PA can probably make this optimisation without complicating the watcher.

Cool, will drop the TODO.

https://codereview.appspot.com/6553064/diff/1/state/watcher.go#newcode361
state/watcher.go:361: out = nul
On 2012/09/24 05:49:59, dfc wrote:
> can this just be 
> 
> out = nil 

Wow.. I could swear this would panic. I wonder what I did wrong when testing it.

Thanks a lot.
Sign in to reply to this message.

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