Task Placement issue
- Dominant language
- Shell
- Stars
- 5.4k
- Forks
- 334
- PR merge metrics
- No merged PRs in 30d
Description
Note sure if I may share my question here. Let me try, please
### Summary
AWS ECS: Task Placement issue
### Description
Tried to deploy a new Service and always getting the same error message in the event log "service **** was unable to place a task because no container instance met all of its requirements. The closest matching container-instance AAA-BBB has no **** available. For more information, see ..."
There are 12 container instances with 1 or 2 tasks in the cluster and at least one container instance is completly free of tasks.
Any changes of Task Definition (memory limits), Task Placement Constraints , Task Placement stratagy (try all) did not help to sort it out and lead the same container-instance AAA-BBB (m5.xlarge) in the error message.
One note about task definition. It has 400 host_port: container_port rules defined. Network Mode - default (bridge).
Instance type: m5.xlarge & t2.xlarge
Similar Services are already running in the same cluster, however in awsvpc Network Mode
So, seems the issue with "matching container-instance algorithm" because even if I've added constraints, for example attribute:ecs.instance-type != m5.xlarge, nothing will change and I will got the same error message - "The closest matching container-instance AAA-BBB has no ... resources"
### Expected Behavior
Deploy task on any container instances in a cluster
### Environment Details
ECS, agent ver. 1.28.1
### Supporting Log Snippets
Not sure which one log details I could provide here.
Any advices - how to troubleshooting such case?
Contributor guide
Assessment
This issue has not been assessed yet.