|
|
|
Created:
13 years, 3 months ago by rog Modified:
1 year, 1 month ago CC:
jay1986blncs_gmail.com Visibility:
Public. |
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
Total messages: 3
|
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 ...
|
13 years, 3 months ago (2012年09月28日 14:54:54 UTC) #1 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
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 worker.ErrDead? Also: log.Printf("machine is dead") https://codereview.appspot.com/6567067/diff/1/cmd/jujud/machine.go#newcode61 cmd/jujud/machine.go:61: log.Printf("machiner: %v", err) This should be changed with your suggestion. 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 { Same as for machine. https://codereview.appspot.com/6567067/diff/1/upstart/upstart.go File upstart/upstart.go (right): https://codereview.appspot.com/6567067/diff/1/upstart/upstart.go#newcode96 upstart/upstart.go:96: normal exit 0 Nice.
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.