aws / aws/containers-roadmap

[ECS] [request]: Match the status retrieved from the task metadata endpoint with the actual task status

Open
#2,012 4 comments 16 reactions 0 assignees View on GitHub
ECS Proposed
Dominant language
Shell
Stars
5.4k
Forks
334
PR merge metrics
No merged PRs in 30d

Description

### Community Note

* Please vote on this issue by adding a 👍 [reaction](https://blog.github.com/2016-03-10-add-reactions-to-pull-requests-issues-and-comments/) to the original issue to help the community and maintainers prioritize this request
* Please do not leave "+1" or "me too" comments, they generate extra noise for issue followers and do not help prioritize the request
* If you are interested in working on this issue or have submitted a pull request, please leave a comment

**Tell us about your request**
Plese match the value of KnownStatus retrieved from the task metadata endpoint with the value of lastStatus from the response of DescribeTasks API.

**Which service(s) is this request for?**
ECS Agent

**Tell us about the problem you're trying to solve. What are you trying to do, and why is it hard?**
Currently, there is the below difference between the KnownStatus retrieved from the task metadata endpoint and the lastStatus from the DescribeTasks API response.

- lastStatus: RUNNING -> DEACTIVATING-> STOPPED
- KnownStatus: RUNNING -> STOPPED

Therefore, it is currently not possible to perform a graceful shutdown after detecting the DEACTIVATING status within the task.

**Are you currently working around this issue?**
Handling [Task state change events](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/ecs_cwe_events.html#ecs_task_events) is a workaround.

**Additional context**
ECS Agent 1.70.2

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.