degica / barcelona

PaaS built on top of AWS
MIT License
52 stars 6 forks source link

Lifecycle hook doesn't wait for termination of tasks #772

Closed essa closed 1 year ago

essa commented 1 year ago

Lifecycle hook waits for termination of all the tasks here.

But it is counting only RUNNING tasks. https://boto3.amazonaws.com/v1/documentation/api/latest/reference/services/ecs/client/list_tasks.html

The default status filter is RUNNING

https://docs.aws.amazon.com/AmazonECS/latest/developerguide/task-lifecycle.html ECS Tasks becomes Stopping state before its termination.

So the lifecycle hook allows instance termination even if there are Stopping tasks which are processing requests.