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

Issue 8748048: state: fix service unit removal

Can't Edit
Can't Publish+Mail
Start Review
Created:
11 years ago by fwereade
Modified:
11 years ago
Reviewers:
dimitern, mp+158970, thumper
Visibility:
Public.

Description

state: fix service unit removal Removing the last unit from a dying service that was in a relation would fail, because we were constructing assertions that failed to take relation count into consideration. https://code.launchpad.net/~fwereade/juju-core/state-dying-service-fix/+merge/158970 (do not edit description out of merge proposal)

Patch Set 1 #

Total comments: 4

Patch Set 2 : state: fix service unit removal #

Unified diffs Side-by-side diffs Delta from patch set Stats (+57 lines, -1 line) Patch
A [revision details] View 1 1 chunk +2 lines, -0 lines 0 comments Download
M state/service.go View 1 chunk +7 lines, -1 line 0 comments Download
M state/unit_test.go View 1 1 chunk +48 lines, -0 lines 0 comments Download

Messages

Total messages: 7
fwereade
Please take a look.
11 years ago (2013-04-15 16:07:36 UTC) #1
dimitern
LGTM https://codereview.appspot.com/8748048/diff/1/state/service.go File state/service.go (right): https://codereview.appspot.com/8748048/diff/1/state/service.go#newcode647 state/service.go:647: {"life", Dying}, so this is: Dying, OR (unitcount>1 ...
11 years ago (2013-04-15 16:11:33 UTC) #2
dimitern
I think you need to add removeOps to this case as well: ... rvba> fwereade: ...
11 years ago (2013-04-15 16:44:53 UTC) #3
fwereade
On 2013/04/15 16:44:53, dimitern wrote: > I think you need to add removeOps to this ...
11 years ago (2013-04-15 18:01:23 UTC) #4
fwereade
https://codereview.appspot.com/8748048/diff/1/state/service.go File state/service.go (right): https://codereview.appspot.com/8748048/diff/1/state/service.go#newcode647 state/service.go:647: {"life", Dying}, On 2013/04/15 16:11:33, dimitern wrote: > so ...
11 years ago (2013-04-15 18:01:33 UTC) #5
thumper
LGTM - Generally hoping that one day we have tests that are more understandable with ...
11 years ago (2013-04-15 23:03:24 UTC) #6
fwereade
11 years ago (2013-04-16 00:56:04 UTC) #7
*** Submitted:

state: fix service unit removal

Removing the last unit from a dying service that was in a relation would
fail, because we were constructing assertions that failed to take relation
count into consideration.

R=dimitern, thumper
CC=
https://codereview.appspot.com/8748048

https://codereview.appspot.com/8748048/diff/1/state/unit_test.go
File state/unit_test.go (right):

https://codereview.appspot.com/8748048/diff/1/state/unit_test.go#newcode735
state/unit_test.go:735: c.Assert(err, IsNil)
On 2013/04/15 23:03:24, thumper wrote:
> It isn't obvious to me what these commands are here for at all.  Perhaps in
the
> future we could have some higher level testing functions that make the tests
> more readable and understandable dealing with higher level concepts.

I *think* that everything I could say here on top of the existing comments is
covered in doc/.
Sign in to reply to this message.

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