[BUG] ECS: a service deployment whose tasks never start stays IN_PROGRESS forever
What happens
A service deployment whose tasks never come up stays IN_PROGRESS forever. Nothing moves it to a failure state, so a client polling DescribeServiceDeployments waits out its own timeout rather than getting an answer.
Expected
AWS ends such a deployment once the circuit breaker (or an alarm) detects the failure. With rollback enabled it moves to ROLLBACK_IN_PROGRESS and then ROLLBACK_SUCCESSFUL or ROLLBACK_FAILED; without rollback it moves through STOP_REQUESTED to STOPPED, with a statusReason. The service's deployment reports rolloutState=FAILED. A waiter polling for SUCCESSFUL then gets a terminal answer rather than timing out.
See the ServiceDeployment API reference and service deployment states.
Repro
CreateServicewhose task definition uses an image that cannot start (for example a nonexistent tag), withdeploymentConfiguration.deploymentCircuitBreaker.enable=true.- Poll
ListServiceDeployments/DescribeServiceDeployments: the deployment isIN_PROGRESSindefinitely.
Note
Follows on from #4694, which makes a deployment start IN_PROGRESS and finish SUCCESSFUL only once its own tasks are running. Staying IN_PROGRESS is the loud direction, since a wait times out rather than passing, but it is not what AWS reports.
Source: floci-io/floci