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

Unified Diff: cmd/jujud/machine.go

Issue 6767053: cmd/jujud: agent should perform one cycle (Closed)
Patch Set: cmd/jujud: agent should perform one cycle Created 12 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « [revision details] ('k') | cmd/jujud/unit.go » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cmd/jujud/machine.go
=== modified file 'cmd/jujud/machine.go'
--- cmd/jujud/machine.go 2012-10-11 13:32:58 +0000
+++ cmd/jujud/machine.go 2012-10-25 10:24:27 +0000
@@ -52,7 +52,8 @@
func (a *MachineAgent) Run(_ *cmd.Context) error {
defer log.Printf("machiner: machine agent exiting")
defer a.tomb.Done()
- for a.tomb.Err() == tomb.ErrStillAlive {
+Loop:
+ for {
log.Printf("machiner: machine agent starting")
err := a.runOnce()
if ug, ok := err.(*UpgradeReadyError); ok {
@@ -73,6 +74,7 @@
select {
case <-a.tomb.Dying():
a.tomb.Kill(err)
+ break Loop
case <-time.After(retryDelay):
log.Printf("machiner: rerunning machiner")
}
« no previous file with comments | « [revision details] ('k') | cmd/jujud/unit.go » ('j') | no next file with comments »

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