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

V1.17.0 release #1145

Closed
wants to merge 60 commits into from
Closed

V1.17.0 release #1145

wants to merge 60 commits into from

Conversation

aaithal
Copy link
Contributor

@aaithal aaithal commented Dec 18, 2017

Summary

Adds the changelog entries for 1.17.0 release

Implementation details

  • Feature - Support a HTTP endpoint for awsvpc tasks to query metadata
  • Enhancement - Add a rate limiter for the task metadata endpoint #1110
  • Bug - Fixed a bug where -version fails due to its dependency on docker client. #1118
  • Bug - Persist container exit code in agent state file #1125
  • Bug - Fixed a bug where agent tries to remove old state file that does not exist on startup #1108

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: NA

Description for the changelog

NA

Licensing

This contribution is under the terms of the Apache 2.0 License: yes

aaithal and others added 30 commits November 16, 2017 12:16
renamed package credentials as taskmetadata. Also, moved
credentials fetching methods to a file of theier own.
Lastly, made some exported const's to be not exported
anymore.
Moved the v1 response objects into a package of their own,
under types/v1
Added a dict to save container id to labels map. This map
is not persisted to disk, just stored in memory and
reconstructed by inspecting containers during reconciliation
on agent restart.
Add a new dict for associating ip addresses assigned to
tasks from "ecs-ipam" plugin when launched in "awsvpc"
mode.
Invoke ecs-bridge and ipam plugins after the ecs-cni plugin. This
helps us get the ip address allocated to the task on the ecs0 bridge.
Hence, we'll be able to identify the task based on the request's
ip address from credentials/metadata endpoint requests.
Added a handler to serve task metadata at "/v2/metadata" path. Metadata
is served out of this path only for "awsvpc" tasks, based on the
request's ip address. The response schema is available in the
"handlers/types/v2" package.
* Modified api.Container to store container transition timestamps (create,
start and finish). These are populated from InspectContainer output.
Similar to container labels, these timestamps will not be persisted
to the disk. Instead, they will be reconciled during state synchronization.
* Modified handler's task metadata response to contain container
transition timestamps
Also addressed other PR feedback from
aws#1073
Modified api.Container to store container labels. These are populated
from InspectContainer output.
creating a new object by copying from an exisint one is bad, when the
said object has locks. Fixed such an instance in the integ test
Fixes the functional tests build as per the latest refactor, which
moved some of these types around. handlers.*Response is now
v1.*Response
Added support for returning metadata information for a container by its
id.
locking in this file was a bit erratic. This refactor hopefully
makes things easier to understand. methods that access shared data
without a lock are renamed with "Unsafe" suffix. The taskToContainers
map was being accessed in a way that could result in a data race.
This is fixed as well.
Extend the stats engine interface to add a method to get
docker stats for a container
add "/v2/stats" and "/v2/stats/<container-id>" endpoints to query task
and container stats respectively.
This moves the creation of the stats engine from tcs handler to the app
package. This is required to wire up the stats engine to metadata
handler and tcs handler.
This patch ensures that the statemanager does not attempt to remove the
old("")
state file on startup.

Fixes aws#722
The test starts a task with an 'nginx' container, gets the ip address of
the container by descrining the task and queries the ip address for a
response from the nginx container.
yhlee-aws and others added 27 commits November 30, 2017 16:38
use predefined consts to get rid of hardcoded values in the test
Change transition times to match other tests (1m -> 2m)
Added a log configuration for the container to stream logs to awslogs
Bug - Fixed a bug where -version fails due to its dependency on docker client, removing docker version from -version output
Container exit code needs to be persisted in the agent state file so
that api.Container structs can be rebuilt after agent restarts. Go's
default JSON encoder marshals only public fields.

Rename and export KnownExitCodeUnsafe with proper JSON marking.
Add test to ensure exit code is persisted and catch any regressions.
Fix existing test panics caused by continuing after fatal nil checks.
Persist container exit code in agent state file
…by reducing the number of wait group sequences
Fixing flakey "TestManyDones" unit test from timing out
Because all containers in a task share the same IP address in an
"awsvpc" task, and a task can be constituted of up to 10 containers, the
steady state rate is set at 10 rps. Burst rate is set to 15 rps.
Added basic retry logic in the task metadata validator test. If there's
any error communicating with the metadata endpoint, the test retries the
request 4 times with a delay of a second between retries.
Currently, agent only supports Docker remote API version 1.24 in Windows. Extending this to support other versions such as 1.30.
Adding support for Docker API version 1.30 in Windows
@aaithal aaithal requested a review from petderek December 18, 2017 18:28
@@ -1,4 +1,13 @@
#Changelog
# Changelog
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

github.com/didip/tollbooth, Copyright (c) 2015 Didip Kerabat
github.com/patrickmn/go-cache, Copyright (c) 2012-2017 Patrick Mylund Nielsen and the go-cache contributors

The MIT License (MIT)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We already have the MIT license in this file, can we converge them?

@aaithal aaithal closed this Jan 5, 2018
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.

9 participants