aws / amazon-ecs-agent

Amazon Elastic Container Service Agent
http://aws.amazon.com/ecs/
Apache License 2.0
2.08k stars 612 forks source link

ENI Trunking is not working #2448

Closed imortkz closed 4 years ago

imortkz commented 4 years ago

Summary

I'm running a cluster in ECS, and adding EC2 instances to it. Despite having AWSVPC Trunking enabled, it seems that I still have an old limit active.

Description

EC instance type: c5.large, which has 3 ENI limit (and should have 10 if ENI trunking in effect).

I've tried recreate the cluster after enabling the trunking in account settings, not helped. All EC2 instances was created after enabling it too.

All requirements are met:

  1. I'm using ECS-optimized AMI, which connected and available in cluster
  2. VPC subnet is not shared (I have VPC peering, but it not mentioned in the documentation)
  3. Tasks are using awsvpc networking and started in the same VPC

Seems that it's not working:

$ aws ecs list-attributes --target-type container-instance --attribute-name ecs.awsvpc-trunk-id       --cluster <cluster_name> --region <region>
{
    "attributes": []
}

A service event example:

service <service> was unable to place a task because no container instance met all of its requirements. The closest matching container-instance <uid> encountered error "RESOURCE:ENI". For more information, see the Troubleshooting section.

Expected Behavior

Have up to 10 tasks running on c5.large

Observed Behavior

Only can start 2 per instance with awsvpc networking.

sparrc commented 4 years ago

Which version of agent are you using and which AMI ID?

imortkz commented 4 years ago

Which version of agent are you using and which AMI ID?

ecs-agent 1.39.0 Amazon Linux AMI amzn-ami-2018.03.20200430 x86_64 ECS HVM GP2

sparrc commented 4 years ago

Could you let us know your account ID, cluster name, and container instance ARN? If you don't want to post these publically please email ecs-agent-external@amazon.com

yhlee-aws commented 4 years ago

@imortkz are you still facing this issue? I haven't seen any logs or task definition sent to ecs-agent-external@, but we may have missed it. Please update here if you are still experiencing this issue, and kindly send the task definition and logs again.

We've received another customer's email on this issue (found 2 users with same name so I am not sure which one to tag here) - could you please send us the agent logs and your task definition to the same email please?

ellenthsu commented 4 years ago

resolving since no updates, please feel free to reopen the issue if you face this issue again

igor-pinchuk commented 3 years ago

I am facing the same issue, AWSVPC Trunking is enabled, latest AWS ECS optimized AMI is used, but ENI Trunking is not working. It seems like this issue affects old ECS clusters created several years ago.

Enorio commented 5 months ago

I'm having the same issue. I'm using a Amazon Linux AMI 2023.0.20240515 arm64 ECS HVM EBS in a t4g.small instance, and all my accounts, users and roles have awsvpcTrunking enabled. I'm still getting the Resource:ENI error