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

Issue 6875053: firewaller: init machined ports in global mode (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
5 years, 1 month ago by TheMue
Modified:
5 years ago
Reviewers:
mp+137768, niemeyer, fwereade
Visibility:
Public.

Description

firewaller: init machined ports in global mode This is the first one of two CLs for a proper initialization of the firewaller if the mode is the global mode. This CLs adds the init of machined.ports when machined is started. Here the ports field as well as the global ports ref is set based on the state at the time of start. https://code.launchpad.net/~themue/juju-core/005-firewaller-machined-ports/+merge/137768 (do not edit description out of merge proposal)

Patch Set 1 #

Total comments: 1

Patch Set 2 : firewaller: init machined ports in global mode #

Patch Set 3 : firewaller: init machined ports in global mode #

Patch Set 4 : firewaller: init machined ports in global mode #

Patch Set 5 : firewaller: init machined ports in global mode #

Total comments: 19

Patch Set 6 : firewaller: init machined ports in global mode #

Total comments: 12

Patch Set 7 : firewaller: init machined ports in global mode #

Total comments: 24

Patch Set 8 : firewaller: init machined ports in global mode #

Total comments: 9

Patch Set 9 : firewaller: init machined ports in global mode #

Total comments: 2

Patch Set 10 : firewaller: init machined ports in global mode #

Patch Set 11 : firewaller: init machined ports in global mode #

Patch Set 12 : firewaller: init machined ports in global mode #

Total comments: 4

Patch Set 13 : firewaller: init machined ports in global mode #

Total comments: 37

Patch Set 14 : firewaller: init machined ports in global mode #

Total comments: 2

Patch Set 15 : firewaller: init machined ports in global mode #

Unified diffs Side-by-side diffs Delta from patch set Stats (+282 lines, -142 lines) Patch
A [revision details] View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 1 chunk +2 lines, -0 lines 0 comments Download
M worker/firewaller/firewaller.go View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 chunks +216 lines, -138 lines 0 comments Download
M worker/firewaller/firewaller_test.go View 1 2 3 4 5 6 7 8 9 10 5 chunks +64 lines, -4 lines 0 comments Download

Messages

Total messages: 25
TheMue
Please take a look.
5 years, 1 month ago (2012-12-04 08:04:07 UTC) #1
fwereade
https://codereview.appspot.com/6875053/diff/1/worker/firewaller/firewaller.go File worker/firewaller/firewaller.go (right): https://codereview.appspot.com/6875053/diff/1/worker/firewaller/firewaller.go#newcode362 worker/firewaller/firewaller.go:362: fw.globalPortRef[uport]++ There's still a window in between initGlobalPorts and ...
5 years, 1 month ago (2012-12-04 11:29:53 UTC) #2
TheMue
Please take a look.
5 years, 1 month ago (2012-12-06 14:40:22 UTC) #3
TheMue
Please take a look.
5 years, 1 month ago (2012-12-07 20:18:47 UTC) #4
TheMue
Please take a look.
5 years, 1 month ago (2012-12-10 08:18:29 UTC) #5
TheMue
Please take a look.
5 years, 1 month ago (2012-12-10 20:59:01 UTC) #6
fwereade
Thanks -- this is *much* more like it. A few comments still, but I think ...
5 years, 1 month ago (2012-12-10 23:01:38 UTC) #7
TheMue
Please take a look. https://codereview.appspot.com/6875053/diff/12001/worker/firewaller/firewaller.go File worker/firewaller/firewaller.go (right): https://codereview.appspot.com/6875053/diff/12001/worker/firewaller/firewaller.go#newcode124 worker/firewaller/firewaller.go:124: m, err := md.machine() On ...
5 years, 1 month ago (2012-12-11 12:25:40 UTC) #8
fwereade
Getting closer :) https://codereview.appspot.com/6875053/diff/12001/worker/firewaller/firewaller.go File worker/firewaller/firewaller.go (right): https://codereview.appspot.com/6875053/diff/12001/worker/firewaller/firewaller.go#newcode132 worker/firewaller/firewaller.go:132: change := <-md.unitw.Changes() On 2012/12/11 12:25:40, ...
5 years, 1 month ago (2012-12-11 15:20:42 UTC) #9
TheMue
Please take a look. https://codereview.appspot.com/6875053/diff/16001/worker/firewaller/firewaller.go File worker/firewaller/firewaller.go (right): https://codereview.appspot.com/6875053/diff/16001/worker/firewaller/firewaller.go#newcode130 worker/firewaller/firewaller.go:130: if state.IsNotFound(err) { On 2012/12/11 ...
5 years, 1 month ago (2012-12-11 15:46:00 UTC) #10
fwereade
We're well into trivials territory here... just a few more :). https://codereview.appspot.com/6875053/diff/13008/worker/firewaller/firewaller.go File worker/firewaller/firewaller.go (right): ...
5 years, 1 month ago (2012-12-11 16:51:25 UTC) #11
TheMue
Please take a look. https://codereview.appspot.com/6875053/diff/13008/worker/firewaller/firewaller.go File worker/firewaller/firewaller.go (right): https://codereview.appspot.com/6875053/diff/13008/worker/firewaller/firewaller.go#newcode132 worker/firewaller/firewaller.go:132: fw.tomb.Killf("worker/firewaller: cannot watch machine units: ...
5 years, 1 month ago (2012-12-12 10:33:25 UTC) #12
fwereade
LGTM -- only suggestions now. Thanks for all your hard work on this :). https://codereview.appspot.com/6875053/diff/21003/worker/firewaller/firewaller.go ...
5 years, 1 month ago (2012-12-12 11:19:00 UTC) #13
TheMue
Please take a look. https://codereview.appspot.com/6875053/diff/21003/worker/firewaller/firewaller.go File worker/firewaller/firewaller.go (right): https://codereview.appspot.com/6875053/diff/21003/worker/firewaller/firewaller.go#newcode137 worker/firewaller/firewaller.go:137: return nil On 2012/12/12 11:19:00, ...
5 years, 1 month ago (2012-12-12 11:55:25 UTC) #14
fwereade
Still LGTM :) https://codereview.appspot.com/6875053/diff/21004/worker/firewaller/firewaller.go File worker/firewaller/firewaller.go (right): https://codereview.appspot.com/6875053/diff/21004/worker/firewaller/firewaller.go#newcode146 worker/firewaller/firewaller.go:146: log.Printf("worker/firewaller: cannot stop units watcher: %v", ...
5 years, 1 month ago (2012-12-12 15:27:31 UTC) #15
TheMue
Please take a look. https://codereview.appspot.com/6875053/diff/21004/worker/firewaller/firewaller.go File worker/firewaller/firewaller.go (right): https://codereview.appspot.com/6875053/diff/21004/worker/firewaller/firewaller.go#newcode146 worker/firewaller/firewaller.go:146: log.Printf("worker/firewaller: cannot stop units watcher: ...
5 years, 1 month ago (2012-12-12 15:35:33 UTC) #16
TheMue
Please take a look.
5 years, 1 month ago (2012-12-13 08:13:04 UTC) #17
TheMue
Please take a look.
5 years, 1 month ago (2012-12-13 11:40:08 UTC) #18
fwereade
Just noticed the below -- I'll do a final pass later today just in case ...
5 years ago (2012-12-14 08:17:21 UTC) #19
TheMue
Please take a look. https://codereview.appspot.com/6875053/diff/28001/worker/firewaller/firewaller.go File worker/firewaller/firewaller.go (right): https://codereview.appspot.com/6875053/diff/28001/worker/firewaller/firewaller.go#newcode137 worker/firewaller/firewaller.go:137: return tomb.ErrDying On 2012/12/14 08:17:21, ...
5 years ago (2012-12-14 09:17:15 UTC) #20
niemeyer
That looks like a winning approach, Frank. Some comments: https://codereview.appspot.com/6875053/diff/30002/worker/firewaller/firewaller.go File worker/firewaller/firewaller.go (right): https://codereview.appspot.com/6875053/diff/30002/worker/firewaller/firewaller.go#newcode84 worker/firewaller/firewaller.go:84: ...
5 years ago (2012-12-14 14:23:51 UTC) #21
fwereade
+1 to niemeyer's suggestions https://codereview.appspot.com/6875053/diff/30002/worker/firewaller/firewaller.go File worker/firewaller/firewaller.go (right): https://codereview.appspot.com/6875053/diff/30002/worker/firewaller/firewaller.go#newcode180 worker/firewaller/firewaller.go:180: err := fw.startService(serviceName) On 2012/12/14 ...
5 years ago (2012-12-14 14:32:01 UTC) #22
TheMue
Please take a look. https://codereview.appspot.com/6875053/diff/30002/worker/firewaller/firewaller.go File worker/firewaller/firewaller.go (right): https://codereview.appspot.com/6875053/diff/30002/worker/firewaller/firewaller.go#newcode84 worker/firewaller/firewaller.go:84: if !reconciled { On 2012/12/14 ...
5 years ago (2012-12-14 14:56:58 UTC) #23
niemeyer
LGTM assuming the fixes below. Thanks. https://codereview.appspot.com/6875053/diff/30002/worker/firewaller/firewaller.go File worker/firewaller/firewaller.go (right): https://codereview.appspot.com/6875053/diff/30002/worker/firewaller/firewaller.go#newcode180 worker/firewaller/firewaller.go:180: err := fw.startService(serviceName) ...
5 years ago (2012-12-14 16:57:38 UTC) #24
TheMue
5 years ago (2012-12-14 17:59:45 UTC) #25
*** Submitted:

firewaller: init machined ports in global mode

This is the first one of two CLs for a proper initialization
of the firewaller if the mode is the global mode. This CLs adds
the init of machined.ports when machined is started. Here the
ports field as well as the global ports ref is set based on the
state at the time of start.

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

https://codereview.appspot.com/6875053/diff/25002/worker/firewaller/firewalle...
File worker/firewaller/firewaller.go (right):

https://codereview.appspot.com/6875053/diff/25002/worker/firewaller/firewalle...
worker/firewaller/firewaller.go:155: return fmt.Errorf("worker/firewaller: start
watching machine %d faild: %v", id, err)
On 2012/12/14 16:57:39, niemeyer wrote:
> That's a difference sentence with the exact same meaning. The error in this
> context is unrelated to "watching machine".
> 
> Please just "return err" here. We can improve that later if needed.

Done.
Sign in to reply to this message.

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