Skip to content
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
wants to merge 740 commits into
base: master
Choose a base branch
from
Open

Agent final #1

wants to merge 740 commits into from

Conversation

ubhattacharjya
Copy link
Owner

Summary

Implementation details

Testing

  • Builds on Linux (make release)
  • Builds on Windows (go build -out amazon-ecs-agent.exe ./agent)
  • Unit tests on Linux (make test) pass
  • Unit tests on Windows (go test -timeout=25s ./agent/...) pass
  • Integration tests on Linux (make run-integ-tests) pass
  • Integration tests on Windows (.\scripts\run-integ-tests.ps1) pass
  • Functional tests on Linux (make run-functional-tests) pass
  • Functional tests on Windows (.\scripts\run-functional-tests.ps1) pass

New 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.

petderek and others added 30 commits April 25, 2019 16:58
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.
* 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
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.