forked from aws/amazon-ecs-agent
-
Notifications
You must be signed in to change notification settings - Fork 0
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
Agent final #1
Open
ubhattacharjya
wants to merge
740
commits into
master
Choose a base branch
from
agentFinal
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Agent final #1
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some of our logs around the task lifecycle are only logged at debug level. This can make identifying problems a difficult task unless debug logs are provided. This is an attempt to make our logs more useful when ran with default settings.
Signed-off-by: Mohamad Arab <[email protected]>
* taskresources: set terminal reason msg for all errors closes aws#1631 return a default terminal reason remove terminalReason code for cgroups based on PR review Test that volume errors are propogated * fix cleanup error test and add string check
On WS2019 functional test image mcr.microsoft.com/windows/servercore:ltsc2019, the behavior to handle path changed from ws2016 image, it needs to set entrypoint with absolute path or have entrypoint set to powershell to run executable without absolute path. Also removed unused binary in windows telemetry test.
merge latest dev to network-disk-metrics branch
Merge branch 'master' into dev after 1.27.0 release
TestShutdownOrder sometimes ended up hanging because we didn't wait for task stopped state change which in turns can block task engine shut down. Fixing by waiting for the task state change.
When task networking is enabled and instance type supports eni trunking, eni trunking will be turned on. In that case, there will be a "REGISTERING" status for container instance where we attach the trunk ENI and no task can be placed on it during that time, and a "DEREGISTERING" status where the trunk is detached. We need to wait for container instance to reach ACTIVE to avoid start task failure, and wait for container instance to reach INACTIVE to ensure the trunk is detached.
…g enabled This PR adds a functional test which verifies that the container in instance with ENI trunking enabled is able to : - Reach metadata endpoints for both V2/V3 - Use task IAM role credentials - Reach IMDS - Hostname exist - Ping the default subnet gateway The functional test runs 5 tasks to ensure that the instance supports high number of ENI which is not supported without trunking enabled.
…ime for contatiner instance to become active
The test verifies that when ENI trunking is enabled, the Trunk ENI is attached when container instance reaches ACTIVE status, and it's detached when the container instance is deregistered.
also cleanup of 'dangling' images that have no tags or names associated with them (ie, they show as <none> in 'docker images') closes aws#1684 unit tests dont touch dangling images -- for now skip containers that don't have a finished time
Related issue: aws#1575 Related PR: aws#1730 PR 1730 adds the Public IP Address of the host to the container metadata file, however the EC2 host may be configured without a public address. In this case, the EC2 metadata API returns a 404 response, and the host IP is not available to containers. Example ECS Agent Log ``` [ERROR] Unable to retrieve Host Instance PublicIPv4 Address: EC2MetadataError: failed to make EC2Metadata request caused by: <?xml version="1.0" encoding="iso-8859-1"?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <head> <title>404 - Not Found</title> </head> <body> <h1>404 - Not Found</h1> </body> </html> ``` This commit adds an extra field to the container metadata json, `HostPrivateIPv4Address` which is available on EC2 hosts without a public address.
Merge branch 'eni-trunking' into dev
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
Implementation details
Testing
make release
)go build -out amazon-ecs-agent.exe ./agent
)make test
) passgo test -timeout=25s ./agent/...
) passmake run-integ-tests
) pass.\scripts\run-integ-tests.ps1
) passmake run-functional-tests
) pass.\scripts\run-functional-tests.ps1
) passNew tests cover the changes:
Description for the changelog
Licensing
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.