-
Notifications
You must be signed in to change notification settings - Fork 618
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
EC2 task networking on Windows: gMSA support, adding additional local routes and IMDS route in the task namespace. #2876
Conversation
This is not required as we can use the dns settings of the primary instance ENI.
f0ce968
to
6785d8d
Compare
We use the instance ENIs DNS settings since both the ENIs would be in the same VPC and would be additionally beneficial during domain join.
6785d8d
to
7871ec0
Compare
…k stats. Initially, without any network, pause container returns nil network stats. When container stats are collected with pause namespace in place, lastStats.NetworkStats is nil which causes agent to crash and restart.
da10ba8
to
6045511
Compare
Decoupled CNI plugin build logic from this PR as it was making the entire PR complex. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changes look good. Left a few minor nits and suggestions.
qq: What happens if the agent starts on an instance before the container instance is part of any valid Active Directory setup? Will AD/gMSA and task networking work in unison?
Whenever the instance is domain joined, the instance is restarted and therefore, the agent on startup will have the updated DNS server list. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🚀
d2416dd
to
e8fc5bb
Compare
… routes and IMDS route in the task namespace. (aws#2876) * Add IMDS route to the task namespace if task is allowed to have IMDS access.c * Add support for adding additional local routes in awsvpc network mode on Windows. * Removed the workflow for getting Primary ipv4 address of the vpc. This is not required as we can use the dns settings of the primary instance ENI. * Added gSMA support while using awsvpc network mode. We use the instance ENIs DNS settings since both the ENIs would be in the same VPC and would be additionally beneficial during domain join. * PR review changes: Reverted netwrapper to platform agnostic package * Changes to json format for vpc-eni plugin * Bug fix to rectify the scenario when pause container sends nil network stats. Initially, without any network, pause container returns nil network stats. When container stats are collected with pause namespace in place, lastStats.NetworkStats is nil which causes agent to crash and restart. * Minor changes: Comment changes, logfile path consolidation and variable name change
… routes and IMDS route in the task namespace. (aws#2876) * Add IMDS route to the task namespace if task is allowed to have IMDS access.c * Add support for adding additional local routes in awsvpc network mode on Windows. * Removed the workflow for getting Primary ipv4 address of the vpc. This is not required as we can use the dns settings of the primary instance ENI. * Added gSMA support while using awsvpc network mode. We use the instance ENIs DNS settings since both the ENIs would be in the same VPC and would be additionally beneficial during domain join. * PR review changes: Reverted netwrapper to platform agnostic package * Changes to json format for vpc-eni plugin * Bug fix to rectify the scenario when pause container sends nil network stats. Initially, without any network, pause container returns nil network stats. When container stats are collected with pause namespace in place, lastStats.NetworkStats is nil which causes agent to crash and restart. * Minor changes: Comment changes, logfile path consolidation and variable name change
… routes and IMDS route in the task namespace. (aws#2876) * Add IMDS route to the task namespace if task is allowed to have IMDS access.c * Add support for adding additional local routes in awsvpc network mode on Windows. * Removed the workflow for getting Primary ipv4 address of the vpc. This is not required as we can use the dns settings of the primary instance ENI. * Added gSMA support while using awsvpc network mode. We use the instance ENIs DNS settings since both the ENIs would be in the same VPC and would be additionally beneficial during domain join. * PR review changes: Reverted netwrapper to platform agnostic package * Changes to json format for vpc-eni plugin * Bug fix to rectify the scenario when pause container sends nil network stats. Initially, without any network, pause container returns nil network stats. When container stats are collected with pause namespace in place, lastStats.NetworkStats is nil which causes agent to crash and restart. * Minor changes: Comment changes, logfile path consolidation and variable name change
… routes and IMDS route in the task namespace. (aws#2876) * Add IMDS route to the task namespace if task is allowed to have IMDS access.c * Add support for adding additional local routes in awsvpc network mode on Windows. * Removed the workflow for getting Primary ipv4 address of the vpc. This is not required as we can use the dns settings of the primary instance ENI. * Added gSMA support while using awsvpc network mode. We use the instance ENIs DNS settings since both the ENIs would be in the same VPC and would be additionally beneficial during domain join. * PR review changes: Reverted netwrapper to platform agnostic package * Changes to json format for vpc-eni plugin * Bug fix to rectify the scenario when pause container sends nil network stats. Initially, without any network, pause container returns nil network stats. When container stats are collected with pause namespace in place, lastStats.NetworkStats is nil which causes agent to crash and restart. * Minor changes: Comment changes, logfile path consolidation and variable name change
Summary
The changes introduced in this PR includes-
ECS_AWSVPC_ADDITIONAL_LOCAL_ROUTES
environment variableECS_AWSVPC_BLOCK_IMDS
is falseImplementation details
The changes are implemented as -
Testing
A custom binary was tested for gMSA, additional local routes and IMDS.
New tests cover the changes:
Yes
Description for the changelog
Added gMSA support for tasks in awsvpc network mode and create additional local routes in task namespace.
Licensing
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.