Don't attempt to restore tasks that never sync'd
This commit is contained in:
parent
24e5e2faa0
commit
b01dd31f26
|
@ -289,6 +289,12 @@ func (r *AllocRunner) RestoreState() error {
|
|||
name := task.Name
|
||||
state := r.taskStates[name]
|
||||
|
||||
// Nomad exited before task could start, nothing to restore.
|
||||
// AllocRunner.Run will start a new TaskRunner for this task
|
||||
if state == nil {
|
||||
continue
|
||||
}
|
||||
|
||||
// Mark the task as restored.
|
||||
r.restored[name] = struct{}{}
|
||||
|
||||
|
|
Loading…
Reference in New Issue