#4744·floci

[BUG] ECS: a DAEMON service does not roll when its task definition changes

Author: allensanbornCreated Sep 30, 2026Updated Sep 30, 2026

What happens

A DAEMON service does not roll when its task definition changes. UpdateService with a new task definition records a new deployment, but the tasks from the previous revision keep running and no replacement is ever launched.

reconcileDaemonService decides which tasks to keep purely by which ACTIVE container instances they cover. It never compares a task's deploymentId or taskDefinitionArn with the service's, so a task from a superseded revision holds its instance slot indefinitely.

Expected

As with REPLICA services: tasks on the new revision are started and the stale ones are stopped, so the service ends up running the task definition it reports.

Repro

  1. Register an EC2 cluster with one container instance, and a task definition td:1.
  2. CreateService with schedulingStrategy=DAEMON and td:1; wait for one RUNNING task.
  3. Register td:2 and UpdateService --task-definition td:2.
  4. ListTasks / DescribeTasks: the only task is still on td:1, however long you wait.

Note

The deployment-status work in #4694 counts every task a DAEMON service owns, stale or not, so that a DAEMON deployment still converges. That keeps main's behaviour, where the deployment reads as finished while the previous revision is what is running. Once DAEMON rolls, that special case should be removed.