diff --git a/agent/engine/task_manager.go b/agent/engine/task_manager.go index 9254494284f..6f5cae7f29b 100644 --- a/agent/engine/task_manager.go +++ b/agent/engine/task_manager.go @@ -554,6 +554,8 @@ func (mtask *managedTask) handleEventError(containerChange dockerContainerChange mtask.cfg.AgentPullBehavior == config.OnceAgentPullBehavior { seelog.Criticalf("Managed task [%s]: Error while pulling container %s, task will fail: %v", mtask.Arn, container.Name, event.Error) + // The task should be stopped regardless of whether this container is + // essential or non-essential. mtask.SetDesiredStatus(api.TaskStopped) mtask.emitTaskEvent(mtask.Task, taskUnableToPullImage) return false