Skip to content

Commit 397c417

Browse files
amogh09timj-hh
authored andcommitted
Latency and packet loss faults should apply to all network interfaces (aws#4671)
1 parent e84a53a commit 397c417

File tree

6 files changed

+867
-104
lines changed

6 files changed

+867
-104
lines changed

agent/handlers/v4/tmdsstate.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
package v4
1414

1515
import (
16+
"errors"
1617
"fmt"
1718

1819
"github.com/aws/amazon-ecs-agent/agent/engine/dockerstate"
@@ -21,7 +22,6 @@ import (
2122
"github.com/aws/amazon-ecs-agent/ecs-agent/logger"
2223
"github.com/aws/amazon-ecs-agent/ecs-agent/logger/field"
2324
tmdsv4 "github.com/aws/amazon-ecs-agent/ecs-agent/tmds/handlers/v4/state"
24-
"github.com/pkg/errors"
2525
)
2626

2727
const (
@@ -180,7 +180,7 @@ func (s *TMDSAgentState) getTaskMetadata(v3EndpointID string, includeTags bool,
180180
IPV6Addresses: taskENI.GetIPV6Addresses(),
181181
}})
182182
} else {
183-
// For bridge mode there is no concept of task network interfaces in ECS
183+
// For other network modes there is no concept of task network interfaces in ECS
184184
taskNetworkConfig = tmdsv4.NewTaskNetworkConfig(
185185
task.GetNetworkMode(), task.GetNetworkNamespace(), nil)
186186
}

agent/vendor/github.com/aws/amazon-ecs-agent/ecs-agent/logger/field/constants.go

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

agent/vendor/github.com/aws/amazon-ecs-agent/ecs-agent/tmds/handlers/fault/v1/handlers/handlers.go

Lines changed: 133 additions & 51 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

ecs-agent/logger/field/constants.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,4 +74,5 @@ const (
7474
ExecutionStoppedAt = "executionStoppedAt"
7575
Region = "region"
7676
DockerVersion = "dockerVersion"
77+
NetworkInterface = "networkInterface"
7778
)

0 commit comments

Comments
 (0)