nomad: add a sanity check guard

This commit is contained in:
Armon Dadgar 2016-02-22 12:15:40 -08:00
parent e6ba72556a
commit 2b7bdfee37

View file

@ -216,6 +216,9 @@ func (s *GenericScheduler) process() (bool, error) {
if !fullCommit {
s.logger.Printf("[DEBUG] sched: %#v: attempted %d placements, %d placed",
s.eval, expected, actual)
if newState == nil {
return false, fmt.Errorf("missing state refresh after partial commit")
}
return false, nil
}