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

Issue 7425044: uniter, state: handle upgrades better (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
11 years, 2 months ago by dimitern
Modified:
11 years, 1 month ago
Reviewers:
mp+151069, TheMue, fwereade, rog
Visibility:
Public.

Description

uniter, state: handle upgrades better The big change here is uniter/filter is now responsible for changing the unit's charm URL, so that it can stop and start the config watcher on the same goroutine; if we don't sync these operations, then a unit which sets a charm URL such that no references to the relevent service settings exist, will die because its config watcher dies. This isn't a real concern yet, but it will be in a follow-up branch. https://code.launchpad.net/~dimitern/juju-core/010-uniter-handle-config-upgrades/+merge/151069 (do not edit description out of merge proposal)

Patch Set 1 #

Total comments: 39

Patch Set 2 : uniter, state: handle upgrades better #

Patch Set 3 : uniter, state: handle upgrades better #

Total comments: 29

Patch Set 4 : uniter, state: handle upgrades better #

Patch Set 5 : uniter, state: handle upgrades better #

Total comments: 32

Patch Set 6 : uniter, state: handle upgrades better #

Total comments: 8

Patch Set 7 : uniter, state: handle upgrades better #

Patch Set 8 : uniter, state: handle upgrades better #

Total comments: 13

Patch Set 9 : uniter, state: handle upgrades better #

Patch Set 10 : uniter, state: handle upgrades better #

Unified diffs Side-by-side diffs Delta from patch set Stats (+301 lines, -141 lines) Patch
A [revision details] View 1 2 3 4 5 6 7 8 1 chunk +2 lines, -0 lines 0 comments Download
M state/service_test.go View 1 2 3 4 5 6 1 chunk +5 lines, -2 lines 0 comments Download
M state/unit.go View 1 2 3 4 5 6 1 chunk +26 lines, -0 lines 0 comments Download
M state/unit_test.go View 1 2 3 4 5 6 7 8 1 chunk +24 lines, -0 lines 0 comments Download
M state/watcher.go View 1 2 3 4 1 chunk +5 lines, -2 lines 0 comments Download
M worker/uniter/context.go View 3 chunks +7 lines, -27 lines 0 comments Download
M worker/uniter/context_test.go View 1 2 3 2 chunks +8 lines, -2 lines 0 comments Download
M worker/uniter/filter.go View 1 2 3 4 5 6 7 8 11 chunks +119 lines, -47 lines 0 comments Download
M worker/uniter/filter_test.go View 1 2 3 4 5 6 14 chunks +87 lines, -33 lines 0 comments Download
M worker/uniter/modes.go View 1 4 chunks +3 lines, -16 lines 0 comments Download
M worker/uniter/uniter.go View 1 2 3 4 5 6 7 8 3 chunks +12 lines, -12 lines 0 comments Download
M worker/uniter/uniter_test.go View 1 2 3 4 5 6 3 chunks +3 lines, -0 lines 0 comments Download

Messages

Total messages: 17
TheMue
LGTM, only some minor comments. https://codereview.appspot.com/7425044/diff/1/state/unit.go File state/unit.go (right): https://codereview.appspot.com/7425044/diff/1/state/unit.go#newcode120 state/unit.go:120: cfg, err := charm.Config().Validate(nil) ...
11 years, 2 months ago (2013-03-01 10:31:07 UTC) #1
dimitern
On 2013/03/01 10:31:07, TheMue wrote: > LGTM, only some minor comments. > > https://codereview.appspot.com/7425044/diff/1/state/unit.go > ...
11 years, 2 months ago (2013-03-01 10:40:57 UTC) #2
TheMue
On 2013/03/01 10:40:57, dimitern wrote: > Thanks for the review! Please, note this is still ...
11 years, 2 months ago (2013-03-01 10:47:03 UTC) #3
fwereade
Coming along very nicely. We need to beef up the filter tests, and be a ...
11 years, 2 months ago (2013-03-01 11:59:55 UTC) #4
dimitern
Now all tests pass, except the filter tests. Need more work there anyway. But I ...
11 years, 2 months ago (2013-03-01 16:42:37 UTC) #5
fwereade
Only minor quibbles, but we should probably split up the filter tests a bit more... ...
11 years, 1 month ago (2013-03-06 18:01:05 UTC) #6
dimitern
So some tests still fail, not sure why, but most of the other non-filter stuff ...
11 years, 1 month ago (2013-03-07 22:05:48 UTC) #7
dimitern
Please take a look.
11 years, 1 month ago (2013-03-14 10:30:41 UTC) #8
fwereade
Very nearly there: just trivials, really, but I'd like to see the final result and ...
11 years, 1 month ago (2013-03-14 10:53:54 UTC) #9
dimitern
Please take a look. https://codereview.appspot.com/7425044/diff/24001/state/unit.go File state/unit.go (right): https://codereview.appspot.com/7425044/diff/24001/state/unit.go#newcode121 state/unit.go:121: settings, err := readSettings(u.st, "s#"+u.doc.Service) ...
11 years, 1 month ago (2013-03-14 16:14:38 UTC) #10
fwereade
LGTM, just minors (assuming the SetCharm move doesn't invalidate our assumptions) https://codereview.appspot.com/7425044/diff/33001/worker/uniter/filter.go File worker/uniter/filter.go (right): ...
11 years, 1 month ago (2013-03-15 14:48:29 UTC) #11
dimitern
Please take a look. https://codereview.appspot.com/7425044/diff/33001/worker/uniter/filter.go File worker/uniter/filter.go (right): https://codereview.appspot.com/7425044/diff/33001/worker/uniter/filter.go#newcode168 worker/uniter/filter.go:168: // TODO(dimitern): Once we have ...
11 years, 1 month ago (2013-03-15 17:20:27 UTC) #12
dimitern
Please take a look.
11 years, 1 month ago (2013-03-15 17:47:18 UTC) #13
rog
LGTM with a few minor points, but i'm afraid i haven't had time for a ...
11 years, 1 month ago (2013-03-15 18:00:49 UTC) #14
fwereade
couple of responses to rog's suggestions https://codereview.appspot.com/7425044/diff/47001/worker/uniter/context.go File worker/uniter/context.go (right): https://codereview.appspot.com/7425044/diff/47001/worker/uniter/context.go#newcode76 worker/uniter/context.go:76: ctx.config, err = ...
11 years, 1 month ago (2013-03-15 18:19:57 UTC) #15
dimitern
Please take a look. https://codereview.appspot.com/7425044/diff/47001/state/unit_test.go File state/unit_test.go (right): https://codereview.appspot.com/7425044/diff/47001/state/unit_test.go#newcode53 state/unit_test.go:53: unit, err := s.service.AddUnit() On ...
11 years, 1 month ago (2013-03-15 18:29:33 UTC) #16
dimitern
11 years, 1 month ago (2013-03-18 10:11:20 UTC) #17
*** Submitted:

uniter, state: handle upgrades better

The big change here is uniter/filter is now
responsible for changing the unit's charm URL,
so that it can stop and start the config
watcher on the same goroutine; if we don't
sync these operations, then a unit which
sets a charm URL such that no references to
the relevent service settings exist, will
die because its config watcher dies.

This isn't a real concern yet, but it will
be in a follow-up branch.

R=TheMue, fwereade, rog
CC=
https://codereview.appspot.com/7425044
Sign in to reply to this message.

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