grid stable might be working
Signed-off-by: Jeff Carr <jcarr@wit.com>
This commit is contained in:
parent
3f7171fff2
commit
de5f5c6a85
13
poll.go
13
poll.go
|
@ -99,8 +99,14 @@ func (h *HyperT) pollHypervisor() {
|
|||
log.Info("droplet has probably powered down", name)
|
||||
d := findDroplet(name)
|
||||
if d != nil {
|
||||
d.CurrentState = pb.DropletState_UNKNOWN
|
||||
log.Info("set state UNKNOWN here", name)
|
||||
if d.CurrentState != pb.DropletState_UNKNOWN {
|
||||
d.CurrentState = pb.DropletState_UNKNOWN
|
||||
log.Info("set state UNKNOWN here", name)
|
||||
} else {
|
||||
if dur > time.Minute {
|
||||
log.Info("UNKNOWN state for more than one minute remove map entry here?", name)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -185,9 +191,10 @@ func uptimeCheck() (bool, string) {
|
|||
for _, d := range missing {
|
||||
summary += fmt.Sprint("\nmissing droplet: ", d.Hostname, " current state ", d.CurrentState)
|
||||
}
|
||||
summary += fmt.Sprint("\ngrid stable for: ", shell.FormatDuration(time.Since(me.unstable)))
|
||||
if good {
|
||||
return good, "GOOD=true " + summary
|
||||
}
|
||||
me.unstable = time.Now()
|
||||
// me.unstable = time.Now()
|
||||
return good, "GOOD=false " + summary
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue