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

Issue 6567067: cmd/jujud: allow for a clean exit

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

Description

cmd/jujud: allow for a clean exit When a unit or a machine dies, we want the unit or machine agent to exit cleanly, so prepare for the worker to return ErrDead in that case, and exit cleanly when the unit or machine is dead to start with. https://code.launchpad.net/~rogpeppe/juju-core/093-jujud-lifecycle/+merge/126980 Requires: https://code.launchpad.net/~rogpeppe/juju-core/064-uniter-upgrade/+merge/126714 (do not edit description out of merge proposal)

Patch Set 1 #

Total comments: 7
Unified diffs Side-by-side diffs Delta from patch set Stats (+189 lines, -79 lines) Patch
A [revision details] View 1 chunk +2 lines, -0 lines 0 comments Download
M cmd/jujud/machine.go View 3 chunks +7 lines, -0 lines 4 comments Download
M cmd/jujud/machine_test.go View 1 chunk +29 lines, -0 lines 0 comments Download
M cmd/jujud/unit.go View 2 chunks +6 lines, -0 lines 2 comments Download
M cmd/jujud/unit_test.go View 3 chunks +85 lines, -28 lines 0 comments Download
M cmd/jujud/upgrade_test.go View 9 chunks +52 lines, -51 lines 0 comments Download
M upstart/upstart.go View 2 chunks +2 lines, -0 lines 1 comment Download
M upstart/upstart_test.go View 1 chunk +1 line, -0 lines 0 comments Download
M worker/machiner/machiner.go View 2 chunks +3 lines, -0 lines 0 comments Download
M worker/uniter/uniter.go View 1 chunk +2 lines, -0 lines 0 comments Download

Messages

Total messages: 2
niemeyer
LGTM https://codereview.appspot.com/6567067/diff/1/cmd/jujud/machine.go File cmd/jujud/machine.go (right): https://codereview.appspot.com/6567067/diff/1/cmd/jujud/machine.go#newcode58 cmd/jujud/machine.go:58: if err == machiner.ErrDead { Should this be ...
11 years, 7 months ago (2012-09-28 14:54:54 UTC) #1
rog
11 years, 7 months ago (2012-09-28 15:39:45 UTC) #2
for reasons best known to itself, the branch corrupted itself, so i'm submitting
in another CL: https://codereview.appspot.com/6574060

https://code.launchpad.net/~rogpeppe/juju-core/093-jujud-lifecycle/+merge/126998

https://codereview.appspot.com/6567067/diff/1/cmd/jujud/machine.go
File cmd/jujud/machine.go (right):

https://codereview.appspot.com/6567067/diff/1/cmd/jujud/machine.go#newcode58
cmd/jujud/machine.go:58: if err == machiner.ErrDead {
On 2012/09/28 14:54:54, niemeyer wrote:
> Should this be worker.ErrDead?
> 
> Also:
> 
> log.Printf("machine is dead")

Done.

https://codereview.appspot.com/6567067/diff/1/cmd/jujud/machine.go#newcode61
cmd/jujud/machine.go:61: log.Printf("machiner: %v", err)
On 2012/09/28 14:54:54, niemeyer wrote:
> This should be changed with your suggestion.

Done.

https://codereview.appspot.com/6567067/diff/1/cmd/jujud/unit.go
File cmd/jujud/unit.go (right):

https://codereview.appspot.com/6567067/diff/1/cmd/jujud/unit.go#newcode60
cmd/jujud/unit.go:60: if err == uniter.ErrDead {
On 2012/09/28 14:54:54, niemeyer wrote:
> Same as for machine.

Done.
Sign in to reply to this message.

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