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

Update to 1.17.3 #1324

Merged
merged 31 commits into from
Apr 6, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
2f93595
vendor: upgrade and lock gorilla/websocket to v1.2.0
adnxn Feb 19, 2018
5753e89
app: print agent version and commit hash in agent log
fenxiong Mar 6, 2018
6ab056f
test: check resource usage data in telemetry test
Feb 6, 2018
adaef4d
engine: container health integ test
sharanyad Feb 23, 2018
49dc2b5
Update build tooling for 8 char short sha
jahkeup Mar 8, 2018
21361cc
eni: increase test retry duration, swap assert() params
adnxn Mar 9, 2018
2983599
Fix the Sprintf bug when testing in Golang version 1.10 darwin/amd64
haikuoliu Mar 8, 2018
c5dd634
vendor: added dep prune targets, dep ensure
adnxn Mar 9, 2018
3b211fc
engine: add inactivity timeout for image pulling
fenxiong Mar 9, 2018
ee83b9b
api: add Hostname, ExtraHosts for pause container
adnxn Mar 6, 2018
e258e16
functional_tests: shmsize and tmpfs fields support
sharanyad Jan 23, 2018
ede2e5f
Fix flaky test: TestLoadImageTimeoutError
aaithal Mar 21, 2018
6111365
misc: update gcc base image to 6.4
aaithal Mar 21, 2018
34f5d6a
deps: update gomock
aaithal Mar 21, 2018
901a1ac
wsclient: error handling for SetReadDeadline()
aaithal Mar 21, 2018
418f839
gogenerate/awssdk: add an import step
aaithal Mar 21, 2018
5891ad1
regenerate mocks based on the gomock update.
aaithal Mar 21, 2018
d2e9354
wsclient: add copyright header for new files
aaithal Mar 21, 2018
3f2fecc
changelog: add entry for #1310
aaithal Mar 21, 2018
6f16e3c
containermetadata: expose task definition family and revision as meta…
haikuoliu Mar 13, 2018
0ce3038
test: add integration test for engine restart
Mar 6, 2018
7754e65
changelog: add entry for https://github.com/aws/amazon-ecs-agent/pull…
fenxiong Mar 21, 2018
c377614
test: run engine integration tests on windows
Feb 26, 2018
fd41411
test: refactor integration test
Mar 21, 2018
067e5d6
changelog: add entry for https://github.com/aws/amazon-ecs-agent/pull…
adnxn Mar 22, 2018
540be7d
test: fix flaky test TestRemoveEvents
Mar 20, 2018
bd28b2e
engine: make the container progress concurrently
Mar 16, 2018
2ee395f
test: add test to for parallizing container progress
Mar 26, 2018
d5fa92a
handlers: remove logging of URI in HTTP requests
sharanyad Mar 28, 2018
eb9560b
config/engine: distinct startContainerTimouts for windows/linux
haikuoliu Mar 26, 2018
159ae5c
update to 1.17.3
yhlee-aws Mar 30, 2018
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
# Changelog

## 1.17.3
* Enhancement - Distinct startContainerTimeouts for windows/linux, introduce a new environment variable `ECS_CONTAINER_START_TIMEOUT` to make it configurable [#1321](https://github.com/aws/amazon-ecs-agent/pull/1321)
* Enhancement - Add support for containers to inhereit ENI private DNS hostnames for `awsvpc` tasks [#1278](https://github.com/aws/amazon-ecs-agent/pull/1278)

Choose a reason for hiding this comment

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

Typo: s/inhereit/inherit/

* Enhancement - Expose task definition family and task definition revision in container metadata file [#1295](https://github.com/aws/amazon-ecs-agent/pull/1295)
* Enhancement - Fail image pulls if there's inactivity during image pull progress [#1290](https://github.com/aws/amazon-ecs-agent/pull/1290)
* Enhancement - Parallize the container transition in the same task [#1305](https://github.com/aws/amazon-ecs-agent/pull/1306)
* Bug - Fixed a bug where a stale websocket connection could linger [#1310](https://github.com/aws/amazon-ecs-agent/pull/1310)

## 1.17.2
* Enhancement - Update the `amazon-ecs-cni-plugins` to `2018.02.0` [#1272](https://github.com/aws/amazon-ecs-agent/pull/1272)
* Enhancement - Add container port mapping and ENI information in introspection
Expand Down
12 changes: 8 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ test-in-docker:
# Privileged needed for docker-in-docker so integ tests pass
docker run --net=none -v "$(PWD):/go/src/github.com/aws/amazon-ecs-agent" --privileged "amazon/amazon-ecs-agent-test:make"

run-functional-tests: testnnp test-registry ecr-execution-role-image
run-functional-tests: testnnp test-registry ecr-execution-role-image telemetry-test-image
. ./scripts/shared_env && go test -tags functional -timeout=30m -v ./agent/functional_tests/...

PAUSE_CONTAINER_IMAGE = "amazon/amazon-ecs-pause"
Expand Down Expand Up @@ -212,7 +212,7 @@ get-cni-sources:
cni-plugins: get-cni-sources .out-stamp
@docker build -f scripts/dockerfiles/Dockerfile.buildCNIPlugins -t "amazon/amazon-ecs-build-cniplugins:make" .
docker run --rm --net=none \
-e GIT_SHORT_HASH=$(shell cd $(ECS_CNI_REPOSITORY_SRC_DIR) && git rev-parse --short HEAD) \
-e GIT_SHORT_HASH=$(shell cd $(ECS_CNI_REPOSITORY_SRC_DIR) && git rev-parse --short=8 HEAD) \
-e GIT_PORCELAIN=$(shell cd $(ECS_CNI_REPOSITORY_SRC_DIR) && git status --porcelain 2> /dev/null | wc -l | sed 's/^ *//') \
-u "$(USERID)" \
-v "$(PWD)/out/cni-plugins:/go/src/github.com/aws/amazon-ecs-cni-plugins/bin/plugins" \
Expand All @@ -221,7 +221,7 @@ cni-plugins: get-cni-sources .out-stamp
@echo "Built amazon-ecs-cni-plugins successfully."

run-integ-tests: test-registry gremlin container-health-check-image
. ./scripts/shared_env && go test -race -tags integration -timeout=5m -v ./agent/engine/... ./agent/stats/... ./agent/app/...
. ./scripts/shared_env && go test -race -tags integration -timeout=7m -v ./agent/engine/... ./agent/stats/... ./agent/app/...

.PHONY: codebuild
codebuild: get-deps test-artifacts .out-stamp
Expand All @@ -238,7 +238,7 @@ volumes-test:

# TODO, replace this with a build on dockerhub or a mechanism for the
# functional tests themselves to build this
.PHONY: squid awscli fluentd gremlin taskmetadata-validator image-cleanup-test-images ecr-execution-role-image container-health-check-image
.PHONY: squid awscli fluentd gremlin taskmetadata-validator image-cleanup-test-images ecr-execution-role-image container-health-check-image telemetry-test-image
squid:
$(MAKE) -C misc/squid $(MFLAGS)

Expand All @@ -263,6 +263,9 @@ taskmetadata-validator:
ecr-execution-role-image:
$(MAKE) -C misc/ecr $(MFLAGS)

telemetry-test-image:
$(MAKE) -C misc/telemetry $(MFLAGS)

container-health-check-image:
$(MAKE) -C misc/container-health $(MFLAGS)

Expand Down Expand Up @@ -299,6 +302,7 @@ clean:
-$(MAKE) -C misc/image-cleanup-test-images $(MFLAGS) clean
-$(MAKE) -C misc/taskmetadata-validator $(MFLAGS) clean
-$(MAKE) -C misc/container-health $(MFLAGS) clean
-$(MAKE) -C misc/telemetry $(MFLAGS) clean
-rm -f .get-deps-stamp
-rm -f .builder-image-stamp
-rm -f .out-stamp
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -162,6 +162,7 @@ additional details on each available environment variable.
| `ECS_APPARMOR_CAPABLE` | `true` | Whether AppArmor is available on the container instance. | `false` | `false` |
| `ECS_ENGINE_TASK_CLEANUP_WAIT_DURATION` | 10m | Time to wait to delete containers for a stopped task. If set to less than 1 minute, the value is ignored. | 3h | 3h |
| `ECS_CONTAINER_STOP_TIMEOUT` | 10m | Time to wait for the container to exit normally before being forcibly killed. | 30s | 30s |
| `ECS_CONTAINER_START_TIMEOUT` | 10m | Timeout before giving up on starting a container. | 3m | 8m |
| `ECS_ENABLE_TASK_IAM_ROLE` | `true` | Whether to enable IAM Roles for Tasks on the Container Instance | `false` | `false` |
| `ECS_ENABLE_TASK_IAM_ROLE_NETWORK_HOST` | `true` | Whether to enable IAM Roles for Tasks when launched with `host` network mode on the Container Instance | `false` | `false` |
| `ECS_DISABLE_IMAGE_CLEANUP` | `true` | Whether to disable automated image cleanup for the ECS Agent. | `false` | `false` |
Expand Down
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.17.2
1.17.3
7 changes: 4 additions & 3 deletions agent/Gopkg.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 5 additions & 2 deletions agent/Gopkg.toml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,9 @@
# name = "github.com/x/y"
# version = "2.4.0"

[prune]
go-tests = true
unused-packages = true

[[constraint]]
name = "github.com/aws/aws-sdk-go"
Expand Down Expand Up @@ -51,11 +54,11 @@

[[constraint]]
name = "github.com/golang/mock"
revision ="bd3c8e81be01eef76d4b503f5e687d2d1354d2d9"
revision ="58cd061d09382b6011f84c1291ebe50ef2e25bab"

[[constraint]]
name = "github.com/gorilla/websocket"
revision ="0868951cdb8e69bc42df4598bdc6164ff2f1a072"
version = "v1.2.0"

[[constraint]]
name = "github.com/opencontainers/runtime-spec"
Expand Down
16 changes: 8 additions & 8 deletions agent/acs/client/acs_client_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ import (
"github.com/aws/amazon-ecs-agent/agent/acs/model/ecsacs"
"github.com/aws/amazon-ecs-agent/agent/config"
"github.com/aws/amazon-ecs-agent/agent/wsclient"
"github.com/aws/amazon-ecs-agent/agent/wsclient/mock"
"github.com/aws/amazon-ecs-agent/agent/wsclient/wsconn/mock"
"github.com/aws/aws-sdk-go/aws"
"github.com/aws/aws-sdk-go/aws/credentials"
"github.com/golang/mock/gomock"
Expand Down Expand Up @@ -91,7 +91,7 @@ func TestMakeUnrecognizedRequest(t *testing.T) {
ctrl := gomock.NewController(t)
defer ctrl.Finish()

conn := mock_wsclient.NewMockWebsocketConn(ctrl)
conn := mock_wsconn.NewMockWebsocketConn(ctrl)
conn.EXPECT().SetWriteDeadline(gomock.Any()).Return(nil)
conn.EXPECT().Close()

Expand All @@ -108,7 +108,7 @@ func TestWriteAckRequest(t *testing.T) {
ctrl := gomock.NewController(t)
defer ctrl.Finish()

conn := mock_wsclient.NewMockWebsocketConn(ctrl)
conn := mock_wsconn.NewMockWebsocketConn(ctrl)
conn.EXPECT().SetWriteDeadline(gomock.Any()).Return(nil).Times(2)
conn.EXPECT().Close()
cs := testCS(conn)
Expand All @@ -135,7 +135,7 @@ func TestPayloadHandlerCalled(t *testing.T) {
ctrl := gomock.NewController(t)
defer ctrl.Finish()

conn := mock_wsclient.NewMockWebsocketConn(ctrl)
conn := mock_wsconn.NewMockWebsocketConn(ctrl)
// Messages should be read from the connection at least once
conn.EXPECT().SetReadDeadline(gomock.Any()).Return(nil).MinTimes(1)
conn.EXPECT().ReadMessage().Return(websocket.TextMessage,
Expand Down Expand Up @@ -167,7 +167,7 @@ func TestRefreshCredentialsHandlerCalled(t *testing.T) {
ctrl := gomock.NewController(t)
defer ctrl.Finish()

conn := mock_wsclient.NewMockWebsocketConn(ctrl)
conn := mock_wsconn.NewMockWebsocketConn(ctrl)
// Messages should be read from the connection at least once
conn.EXPECT().SetReadDeadline(gomock.Any()).Return(nil).MinTimes(1)
conn.EXPECT().ReadMessage().Return(websocket.TextMessage,
Expand Down Expand Up @@ -206,7 +206,7 @@ func TestClosingConnection(t *testing.T) {
defer ctrl.Finish()

// Returning EOF tells the ClientServer that the connection is closed
conn := mock_wsclient.NewMockWebsocketConn(ctrl)
conn := mock_wsconn.NewMockWebsocketConn(ctrl)
conn.EXPECT().SetReadDeadline(gomock.Any()).Return(nil)
conn.EXPECT().ReadMessage().Return(0, nil, io.EOF)
// SetWriteDeadline will be invoked once for WriteMessage() and
Expand Down Expand Up @@ -313,7 +313,7 @@ func TestConnectClientError(t *testing.T) {
assert.EqualError(t, err, "InvalidClusterException: Invalid cluster")
}

func testCS(conn *mock_wsclient.MockWebsocketConn) wsclient.ClientServer {
func testCS(conn *mock_wsconn.MockWebsocketConn) wsclient.ClientServer {
testCreds := credentials.AnonymousCredentials
foo := New("localhost:443", testCfg, testCreds, rwTimeout)
cs := foo.(*clientServer)
Expand Down Expand Up @@ -361,7 +361,7 @@ func TestAttachENIHandlerCalled(t *testing.T) {
ctrl := gomock.NewController(t)
defer ctrl.Finish()

conn := mock_wsclient.NewMockWebsocketConn(ctrl)
conn := mock_wsconn.NewMockWebsocketConn(ctrl)
cs := testCS(conn)
defer cs.Close()

Expand Down
3 changes: 2 additions & 1 deletion agent/acs/handler/acs_handler.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2014-2017 Amazon.com, Inc. or its affiliates. All Rights Reserved.
// Copyright 2014-2018 Amazon.com, Inc. or its affiliates. All Rights Reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License"). You may
// not use this file except in compliance with the License. A copy of the
Expand Down Expand Up @@ -429,6 +429,7 @@ func newDisconnectionTimer(client wsclient.ClientServer, timeout time.Duration,
if err := client.Close(); err != nil {
seelog.Warnf("Error disconnecting: %v", err)
}
seelog.Info("Disconnected from ACS")
})

return timer
Expand Down
3 changes: 2 additions & 1 deletion agent/acs/model/api/api-2.json
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,8 @@
"ipv4Addresses":{"shape":"IPv4AddressList"},
"ipv6Addresses":{"shape":"IPv6AddressList"},
"domainName":{"shape":"StringList"},
"domainNameServers":{"shape":"StringList"}
"domainNameServers":{"shape":"StringList"},
"privateDnsName":{"shape":"String"}
}
},
"ElasticNetworkInterfaceList":{
Expand Down
2 changes: 2 additions & 0 deletions agent/acs/model/ecsacs/api.go
Original file line number Diff line number Diff line change
Expand Up @@ -217,6 +217,8 @@ type ElasticNetworkInterface struct {
Ipv6Addresses []*IPv6AddressAssignment `locationName:"ipv6Addresses" type:"list"`

MacAddress *string `locationName:"macAddress" type:"string"`

PrivateDnsName *string `locationName:"privateDnsName" type:"string"`
}

// String returns the string representation
Expand Down
Loading