Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ECS instance terminates before docker container exits on host with extended ECS_CONTAINER_STOP_TIMEOUT #27

Open
mikeaorlando opened this issue Mar 8, 2019 · 0 comments

Comments

@mikeaorlando
Copy link

When a container instance is draining, the boto3 api for list-tasks defaults to include all tasks that have a desiredStatus of RUNNING. However, the api (as of 2019-03-06) will return a desiredStatus of STOPPED before the container has exited on the instance. If the ECS cluster has a longer than default (30 seconds) ECS_CONTAINER_STOP_TIMEOUT, and your container takes a while to clean up and exit, this template will complete complete the Auto Scaling Lifecycle Hook before the container exits.

This leads to hard-to-diagnose issues where the container instance (and its logs) are terminated before expected.

Is there a way to run an equivalent of docker ps from the Lambda job to confirm a task has exited?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant