Skip to content

Commit 72501a3

Browse files
authored
Merge branch 'dev' into unl
2 parents 016b086 + 70fe7e7 commit 72501a3

File tree

242 files changed

+70190
-38611
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

242 files changed

+70190
-38611
lines changed

CHANGELOG.md

+3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
# Changelog
22

3+
## 1.78.1
4+
* Bugfix - revert "add apparmor support". [3993](https://github.com/aws/amazon-ecs-agent/pull/3993)
5+
36
## 1.78.0
47
* Feature - Add AppArmor support. [#3941](https://github.com/aws/amazon-ecs-agent/pull/3941)
58
* Enhancement - Update SSM Agent version to 3.2.1630.0 for ECS exec. [#3952](https://github.com/aws/amazon-ecs-agent/pull/3952)

VERSION

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
1.78.0
1+
1.78.1

agent/acs/session/attach_eni_common.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ func (eniHandler *eniHandler) removeENIAttachmentData(mac string) {
127127
seelog.Errorf("Unable to retrieve ENI Attachment for mac address %s: ", mac)
128128
return
129129
}
130-
attachmentId, err := utils.GetENIAttachmentId(attachmentToRemove.AttachmentARN)
130+
attachmentId, err := utils.GetAttachmentId(attachmentToRemove.AttachmentARN)
131131
if err != nil {
132132
seelog.Errorf("Failed to get attachment id for %s: %v", attachmentToRemove.AttachmentARN, err)
133133
} else {

agent/acs/session/attach_eni_common_test.go

+5-5
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ import (
2626
"github.com/aws/amazon-ecs-agent/agent/data"
2727
"github.com/aws/amazon-ecs-agent/agent/engine/dockerstate"
2828
"github.com/aws/amazon-ecs-agent/ecs-agent/acs/session/testconst"
29-
"github.com/aws/amazon-ecs-agent/ecs-agent/api/attachmentinfo"
29+
"github.com/aws/amazon-ecs-agent/ecs-agent/api/attachment"
3030
ni "github.com/aws/amazon-ecs-agent/ecs-agent/netlib/model/networkinterface"
3131
)
3232

@@ -53,7 +53,7 @@ func testENIAckTimeout(t *testing.T, attachmentType string) {
5353

5454
expiresAt := time.Now().Add(time.Millisecond * testconst.WaitTimeoutMillis)
5555
eniAttachment := &ni.ENIAttachment{
56-
AttachmentInfo: attachmentinfo.AttachmentInfo{
56+
AttachmentInfo: attachment.AttachmentInfo{
5757
TaskARN: testconst.TaskARN,
5858
AttachmentARN: attachmentArn,
5959
ExpiresAt: expiresAt,
@@ -99,7 +99,7 @@ func testENIAckWithinTimeout(t *testing.T, attachmentType string) {
9999
dataClient := data.NewNoopClient()
100100
expiresAt := time.Now().Add(time.Millisecond * testconst.WaitTimeoutMillis)
101101
eniAttachment := &ni.ENIAttachment{
102-
AttachmentInfo: attachmentinfo.AttachmentInfo{
102+
AttachmentInfo: attachment.AttachmentInfo{
103103
TaskARN: testconst.TaskARN,
104104
AttachmentARN: attachmentArn,
105105
ExpiresAt: expiresAt,
@@ -141,7 +141,7 @@ func testHandleENIAttachment(t *testing.T, attachmentType, taskArn string) {
141141
taskEngineState := dockerstate.NewTaskEngineState()
142142
expiresAt := time.Now().Add(time.Millisecond * testconst.WaitTimeoutMillis)
143143
eniAttachment := &ni.ENIAttachment{
144-
AttachmentInfo: attachmentinfo.AttachmentInfo{
144+
AttachmentInfo: attachment.AttachmentInfo{
145145
TaskARN: taskArn,
146146
AttachmentARN: attachmentArn,
147147
ExpiresAt: expiresAt,
@@ -188,7 +188,7 @@ func testHandleExpiredENIAttachment(t *testing.T, attachmentType, taskArn string
188188
dataClient := data.NewNoopClient()
189189

190190
eniAttachment := &ni.ENIAttachment{
191-
AttachmentInfo: attachmentinfo.AttachmentInfo{
191+
AttachmentInfo: attachment.AttachmentInfo{
192192
TaskARN: taskArn,
193193
AttachmentARN: attachmentArn,
194194
ExpiresAt: expiresAt,

agent/acs/session/attach_instance_eni_responder_test.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ import (
3131
"github.com/aws/amazon-ecs-agent/ecs-agent/acs/model/ecsacs"
3232
acssession "github.com/aws/amazon-ecs-agent/ecs-agent/acs/session"
3333
"github.com/aws/amazon-ecs-agent/ecs-agent/acs/session/testconst"
34-
"github.com/aws/amazon-ecs-agent/ecs-agent/api/attachmentinfo"
34+
"github.com/aws/amazon-ecs-agent/ecs-agent/api/attachment"
3535
ni "github.com/aws/amazon-ecs-agent/ecs-agent/netlib/model/networkinterface"
3636
)
3737

@@ -113,7 +113,7 @@ func TestInstanceENIAckSingleMessageWithDuplicateENIAttachment(t *testing.T) {
113113
mockState.EXPECT().
114114
ENIByMac(testconst.RandomMAC).
115115
Return(&ni.ENIAttachment{
116-
AttachmentInfo: attachmentinfo.AttachmentInfo{
116+
AttachmentInfo: attachment.AttachmentInfo{
117117
ExpiresAt: expiresAt,
118118
},
119119
}, true).

agent/acs/session/attach_task_eni_responder_test.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ import (
3131
"github.com/aws/amazon-ecs-agent/ecs-agent/acs/model/ecsacs"
3232
acssession "github.com/aws/amazon-ecs-agent/ecs-agent/acs/session"
3333
"github.com/aws/amazon-ecs-agent/ecs-agent/acs/session/testconst"
34-
"github.com/aws/amazon-ecs-agent/ecs-agent/api/attachmentinfo"
34+
"github.com/aws/amazon-ecs-agent/ecs-agent/api/attachment"
3535
ni "github.com/aws/amazon-ecs-agent/ecs-agent/netlib/model/networkinterface"
3636
)
3737

@@ -113,7 +113,7 @@ func TestTaskENIAckSingleMessageWithDuplicateENIAttachment(t *testing.T) {
113113
mockState.EXPECT().
114114
ENIByMac(testconst.RandomMAC).
115115
Return(&ni.ENIAttachment{
116-
AttachmentInfo: attachmentinfo.AttachmentInfo{
116+
AttachmentInfo: attachment.AttachmentInfo{
117117
ExpiresAt: expiresAt,
118118
},
119119
}, true).

agent/acs/session/payload_responder.go

+34
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ import (
2222
"github.com/aws/amazon-ecs-agent/agent/engine"
2323
"github.com/aws/amazon-ecs-agent/agent/eventhandler"
2424
"github.com/aws/amazon-ecs-agent/ecs-agent/acs/model/ecsacs"
25+
apiresource "github.com/aws/amazon-ecs-agent/ecs-agent/api/attachment/resource"
2526
apitaskstatus "github.com/aws/amazon-ecs-agent/ecs-agent/api/task/status"
2627
"github.com/aws/amazon-ecs-agent/ecs-agent/credentials"
2728
"github.com/aws/amazon-ecs-agent/ecs-agent/logger"
@@ -106,6 +107,16 @@ func (pmHandler *payloadMessageHandler) addPayloadTasks(payload *ecsacs.PayloadM
106107
allTasksOK = false
107108
continue
108109
}
110+
111+
// Note: If we receive an EBS-backed task, we'll also received an incomplete volume configuration in the list of Volumes
112+
// To accomodate this, we'll first check if the task IS EBS-backed then we'll mark the corresponding Volume object to be
113+
// of type "attachment". This volume object will be replaced by the newly created EBS volume configuration when we parse
114+
// through the task attachments.
115+
volName, ok := hasEBSAttachment(task)
116+
if ok {
117+
initializeAttachmentTypeVolume(task, volName)
118+
}
119+
109120
apiTask, err := apitask.TaskFromACS(task, payload)
110121
if err != nil {
111122
pmHandler.handleInvalidTask(task, err, payload)
@@ -306,3 +317,26 @@ func isTaskStatusStopped(status apitaskstatus.TaskStatus) bool {
306317
func isTaskStatusNotStopped(status apitaskstatus.TaskStatus) bool {
307318
return status != apitaskstatus.TaskStopped
308319
}
320+
321+
func hasEBSAttachment(acsTask *ecsacs.Task) (string, bool) {
322+
// TODO: This will only work if there's one EBS volume per task. If we there is a case where we have multi-attach for a task, this needs to be modified
323+
for _, attachment := range acsTask.Attachments {
324+
if *attachment.AttachmentType == apiresource.EBSTaskAttach {
325+
for _, property := range attachment.AttachmentProperties {
326+
if *property.Name == apiresource.VolumeNameKey {
327+
return *property.Value, true
328+
}
329+
}
330+
}
331+
}
332+
return "", false
333+
}
334+
335+
func initializeAttachmentTypeVolume(acsTask *ecsacs.Task, volName string) {
336+
for _, volume := range acsTask.Volumes {
337+
if *volume.Name == volName && volume.Type == nil {
338+
newType := "attachment"
339+
volume.Type = &newType
340+
}
341+
}
342+
}

agent/acs/session/payload_responder_test.go

+10-4
Original file line numberDiff line numberDiff line change
@@ -34,10 +34,10 @@ import (
3434
"github.com/aws/amazon-ecs-agent/ecs-agent/acs/model/ecsacs"
3535
acssession "github.com/aws/amazon-ecs-agent/ecs-agent/acs/session"
3636
"github.com/aws/amazon-ecs-agent/ecs-agent/acs/session/testconst"
37-
"github.com/aws/amazon-ecs-agent/ecs-agent/api/eni"
38-
apiresource "github.com/aws/amazon-ecs-agent/ecs-agent/api/resource"
37+
apiresource "github.com/aws/amazon-ecs-agent/ecs-agent/api/attachment/resource"
3938
apitaskstatus "github.com/aws/amazon-ecs-agent/ecs-agent/api/task/status"
4039
"github.com/aws/amazon-ecs-agent/ecs-agent/credentials"
40+
ni "github.com/aws/amazon-ecs-agent/ecs-agent/netlib/model/networkinterface"
4141
"github.com/aws/amazon-ecs-agent/ecs-agent/wsclient"
4242
"github.com/aws/aws-sdk-go/aws"
4343
"github.com/golang/mock/gomock"
@@ -725,6 +725,12 @@ func TestHandlePayloadMessageAddedEBSToTask(t *testing.T) {
725725
AttachmentType: aws.String(apiresource.EBSTaskAttach),
726726
},
727727
},
728+
Volumes: []*ecsacs.Volume{
729+
{
730+
Name: aws.String(taskresourcevolume.TestVolumeName),
731+
Type: aws.String(apitask.AttachmentType),
732+
},
733+
},
728734
},
729735
}
730736

@@ -858,7 +864,7 @@ func TestHandlePayloadMessageAddedENITrunkToTask(t *testing.T) {
858864
Arn: aws.String(testconst.TaskARN),
859865
ElasticNetworkInterfaces: []*ecsacs.ElasticNetworkInterface{
860866
{
861-
InterfaceAssociationProtocol: aws.String(eni.VLANInterfaceAssociationProtocol),
867+
InterfaceAssociationProtocol: aws.String(ni.VLANInterfaceAssociationProtocol),
862868
AttachmentArn: aws.String(attachmentARN),
863869
Ec2Id: aws.String(ec2ID),
864870
Ipv4Addresses: []*ecsacs.IPv4AddressAssignment{
@@ -890,7 +896,7 @@ func TestHandlePayloadMessageAddedENITrunkToTask(t *testing.T) {
890896

891897
// Validate the added task has the ENI trunk information as expected.
892898
taskeni := addedTask.GetPrimaryENI()
893-
assert.Equal(t, eni.VLANInterfaceAssociationProtocol, taskeni.InterfaceAssociationProtocol)
899+
assert.Equal(t, ni.VLANInterfaceAssociationProtocol, taskeni.InterfaceAssociationProtocol)
894900
assert.Equal(t, testconst.RandomMAC, taskeni.InterfaceVlanProperties.TrunkInterfaceMacAddress)
895901
assert.Equal(t, vlanID, taskeni.InterfaceVlanProperties.VlanID)
896902
}

agent/api/container/container.go

+13
Original file line numberDiff line numberDiff line change
@@ -1508,3 +1508,16 @@ func (c *Container) GetContainerPortRangeMap() map[string]string {
15081508
defer c.lock.RUnlock()
15091509
return c.ContainerPortRangeMap
15101510
}
1511+
1512+
func (c *Container) IsManagedDaemonContainer() bool {
1513+
c.lock.RLock()
1514+
defer c.lock.RUnlock()
1515+
return c.Type == ContainerManagedDaemon
1516+
}
1517+
1518+
func (c *Container) GetImageName() string {
1519+
c.lock.RLock()
1520+
defer c.lock.RUnlock()
1521+
containerImage := strings.Split(c.Image, ":")[0]
1522+
return containerImage
1523+
}

agent/api/container/container_test.go

+41-1
Original file line numberDiff line numberDiff line change
@@ -130,13 +130,53 @@ func TestIsInternal(t *testing.T) {
130130
}
131131

132132
for _, tc := range testCases {
133-
t.Run(fmt.Sprintf("IsInternal shoukd return %t for %s", tc.internal, tc.container.String()),
133+
t.Run(fmt.Sprintf("IsInternal should return %t for %s", tc.internal, tc.container.String()),
134134
func(t *testing.T) {
135135
assert.Equal(t, tc.internal, tc.container.IsInternal())
136136
})
137137
}
138138
}
139139

140+
func TestIsManagedDaemonContainer(t *testing.T) {
141+
testCases := []struct {
142+
container *Container
143+
internal bool
144+
isManagedDaemon bool
145+
}{
146+
{&Container{}, false, false},
147+
{&Container{Type: ContainerNormal, Image: "someImage:latest"}, false, false},
148+
{&Container{Type: ContainerManagedDaemon, Image: "someImage:latest"}, true, true},
149+
}
150+
151+
for _, tc := range testCases {
152+
t.Run(fmt.Sprintf("IsManagedDaemonContainer should return %t for %s", tc.isManagedDaemon, tc.container.String()),
153+
func(t *testing.T) {
154+
assert.Equal(t, tc.internal, tc.container.IsInternal())
155+
ok := tc.container.IsManagedDaemonContainer()
156+
assert.Equal(t, tc.isManagedDaemon, ok)
157+
})
158+
}
159+
}
160+
161+
func TestGetImageName(t *testing.T) {
162+
testCases := []struct {
163+
container *Container
164+
imageName string
165+
}{
166+
{&Container{}, ""},
167+
{&Container{Image: "someImage:latest"}, "someImage"},
168+
{&Container{Image: "someImage"}, "someImage"},
169+
}
170+
171+
for _, tc := range testCases {
172+
t.Run(fmt.Sprintf("GetImageName should return %s for %s", tc.imageName, tc.container.String()),
173+
func(t *testing.T) {
174+
imageName := tc.container.GetImageName()
175+
assert.Equal(t, tc.imageName, imageName)
176+
})
177+
}
178+
}
179+
140180
// TestSetupExecutionRoleFlag tests whether or not the container appropriately
141181
// sets the flag for using execution roles
142182
func TestSetupExecutionRoleFlag(t *testing.T) {

agent/api/container/containertype.go

+1
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,7 @@ var stringToContainerType = map[string]ContainerType{
5353
"EMPTY_HOST_VOLUME": ContainerEmptyHostVolume,
5454
"CNI_PAUSE": ContainerCNIPause,
5555
"NAMESPACE_PAUSE": ContainerNamespacePause,
56+
"MANAGED_DAEMON": ContainerManagedDaemon,
5657
}
5758

5859
// String converts the container type enum to a string

agent/api/ecsclient/client.go

+8-7
Original file line numberDiff line numberDiff line change
@@ -23,16 +23,17 @@ import (
2323

2424
"github.com/aws/amazon-ecs-agent/agent/api"
2525
"github.com/aws/amazon-ecs-agent/agent/config"
26-
"github.com/aws/amazon-ecs-agent/agent/credentials/instancecreds"
2726
"github.com/aws/amazon-ecs-agent/agent/ec2"
2827
"github.com/aws/amazon-ecs-agent/agent/utils"
2928
agentversion "github.com/aws/amazon-ecs-agent/agent/version"
3029
apicontainerstatus "github.com/aws/amazon-ecs-agent/ecs-agent/api/container/status"
30+
"github.com/aws/amazon-ecs-agent/ecs-agent/api/ecs/model/ecs"
3131
apierrors "github.com/aws/amazon-ecs-agent/ecs-agent/api/errors"
3232
"github.com/aws/amazon-ecs-agent/ecs-agent/async"
33-
"github.com/aws/amazon-ecs-agent/ecs-agent/ecs_client/model/ecs"
33+
"github.com/aws/amazon-ecs-agent/ecs-agent/credentials/instancecreds"
3434
"github.com/aws/amazon-ecs-agent/ecs-agent/httpclient"
3535
"github.com/aws/amazon-ecs-agent/ecs-agent/logger"
36+
commonutils "github.com/aws/amazon-ecs-agent/ecs-agent/utils"
3637
"github.com/aws/amazon-ecs-agent/ecs-agent/utils/retry"
3738

3839
"github.com/aws/aws-sdk-go/aws"
@@ -322,12 +323,12 @@ func (client *APIECSClient) getResources() ([]*ecs.Resource, error) {
322323
portResource := ecs.Resource{
323324
Name: utils.Strptr("PORTS"),
324325
Type: utils.Strptr("STRINGSET"),
325-
StringSetValue: utils.Uint16SliceToStringSlice(client.config.ReservedPorts),
326+
StringSetValue: commonutils.Uint16SliceToStringSlice(client.config.ReservedPorts),
326327
}
327328
udpPortResource := ecs.Resource{
328329
Name: utils.Strptr("PORTS_UDP"),
329330
Type: utils.Strptr("STRINGSET"),
330-
StringSetValue: utils.Uint16SliceToStringSlice(client.config.ReservedPortsUDP),
331+
StringSetValue: commonutils.Uint16SliceToStringSlice(client.config.ReservedPortsUDP),
331332
}
332333

333334
return []*ecs.Resource{&cpuResource, &memResource, &portResource, &udpPortResource}, nil
@@ -657,14 +658,14 @@ func (client *APIECSClient) SubmitContainerStateChange(change api.ContainerState
657658
}
658659

659660
func (client *APIECSClient) SubmitAttachmentStateChange(change api.AttachmentStateChange) error {
660-
attachmentStatus := change.Attachment.Status.String()
661+
attachmentStatus := change.Attachment.GetAttachmentStatus()
661662

662663
req := ecs.SubmitAttachmentStateChangesInput{
663664
Cluster: &client.config.Cluster,
664665
Attachments: []*ecs.AttachmentStateChange{
665666
{
666-
AttachmentArn: aws.String(change.Attachment.AttachmentARN),
667-
Status: aws.String(attachmentStatus),
667+
AttachmentArn: aws.String(change.Attachment.GetAttachmentARN()),
668+
Status: aws.String(attachmentStatus.String()),
668669
},
669670
},
670671
}

agent/api/ecsclient/client_test.go

+6-8
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,6 @@ import (
2424
"testing"
2525
"time"
2626

27-
"github.com/aws/amazon-ecs-agent/ecs-agent/api/attachmentinfo"
28-
"github.com/aws/amazon-ecs-agent/ecs-agent/api/status"
29-
3027
"github.com/golang/mock/gomock"
3128
"github.com/stretchr/testify/assert"
3229
"github.com/stretchr/testify/require"
@@ -37,11 +34,12 @@ import (
3734
"github.com/aws/amazon-ecs-agent/agent/config"
3835
"github.com/aws/amazon-ecs-agent/agent/ec2"
3936
mock_ec2 "github.com/aws/amazon-ecs-agent/agent/ec2/mocks"
37+
"github.com/aws/amazon-ecs-agent/ecs-agent/api/attachment"
4038
apicontainerstatus "github.com/aws/amazon-ecs-agent/ecs-agent/api/container/status"
39+
"github.com/aws/amazon-ecs-agent/ecs-agent/api/ecs/model/ecs"
4140
apitaskstatus "github.com/aws/amazon-ecs-agent/ecs-agent/api/task/status"
4241
"github.com/aws/amazon-ecs-agent/ecs-agent/async"
4342
mock_async "github.com/aws/amazon-ecs-agent/ecs-agent/async/mocks"
44-
"github.com/aws/amazon-ecs-agent/ecs-agent/ecs_client/model/ecs"
4543
ni "github.com/aws/amazon-ecs-agent/ecs-agent/netlib/model/networkinterface"
4644
"github.com/aws/aws-sdk-go/aws"
4745
"github.com/aws/aws-sdk-go/aws/awserr"
@@ -1063,9 +1061,9 @@ func TestDiscoverTelemetryEndpointAfterPollEndpointCacheHit(t *testing.T) {
10631061
}
10641062
}
10651063

1066-
// TestSubmitTaskStateChangeWithAttachments tests the SubmitTaskStateChange API
1064+
// TestSubmitTaskStateChangeWithENIAttachments tests the SubmitTaskStateChange API
10671065
// also send the Attachment Status
1068-
func TestSubmitTaskStateChangeWithAttachments(t *testing.T) {
1066+
func TestSubmitTaskStateChangeWithENIAttachments(t *testing.T) {
10691067
mockCtrl := gomock.NewController(t)
10701068
defer mockCtrl.Finish()
10711069

@@ -1086,9 +1084,9 @@ func TestSubmitTaskStateChangeWithAttachments(t *testing.T) {
10861084
err := client.SubmitTaskStateChange(api.TaskStateChange{
10871085
TaskARN: "task_arn",
10881086
Attachment: &ni.ENIAttachment{
1089-
AttachmentInfo: attachmentinfo.AttachmentInfo{
1087+
AttachmentInfo: attachment.AttachmentInfo{
10901088
AttachmentARN: "eni_arn",
1091-
Status: status.AttachmentAttached,
1089+
Status: attachment.AttachmentAttached,
10921090
},
10931091
},
10941092
})

agent/api/ecsclient/retry_handler.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ import (
1818
"math/rand"
1919
"time"
2020

21-
"github.com/aws/amazon-ecs-agent/ecs-agent/ecs_client/model/ecs"
21+
"github.com/aws/amazon-ecs-agent/ecs-agent/api/ecs/model/ecs"
2222
"github.com/aws/aws-sdk-go/aws"
2323
"github.com/aws/aws-sdk-go/aws/client"
2424
"github.com/aws/aws-sdk-go/aws/request"

agent/api/ecsclient/retry_handler_test.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ import (
2222
"testing"
2323
"time"
2424

25-
"github.com/aws/amazon-ecs-agent/ecs-agent/ecs_client/model/ecs"
25+
"github.com/aws/amazon-ecs-agent/ecs-agent/api/ecs/model/ecs"
2626
"github.com/aws/aws-sdk-go/aws"
2727
"github.com/aws/aws-sdk-go/aws/defaults"
2828
)

0 commit comments

Comments
 (0)