-
Notifications
You must be signed in to change notification settings - Fork 618
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
Add CNI to ecs-agent/netlib/model and update dependencies #3897
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Realmonia
force-pushed
the
netlibcni
branch
from
September 11, 2023 21:10
36f0714
to
163aad8
Compare
Realmonia
force-pushed
the
netlibcni
branch
4 times, most recently
from
September 11, 2023 22:32
fd75e83
to
464497c
Compare
Realmonia
changed the title
Add CNI to ecs-agent/netlib/model
Add CNI to ecs-agent/netlib/model and update dependencies
Sep 11, 2023
Realmonia
force-pushed
the
netlibcni
branch
2 times, most recently
from
September 11, 2023 22:50
e51e394
to
a3cbe0f
Compare
Realmonia
force-pushed
the
netlibcni
branch
from
September 11, 2023 23:47
a3cbe0f
to
ca9f304
Compare
samjkon
reviewed
Sep 12, 2023
Realmonia
force-pushed
the
netlibcni
branch
13 times, most recently
from
September 13, 2023 09:28
e643672
to
393ed6f
Compare
Realmonia
force-pushed
the
netlibcni
branch
12 times, most recently
from
September 14, 2023 04:40
6c7b434
to
e8986fe
Compare
samjkon
previously approved these changes
Sep 14, 2023
mye956
reviewed
Sep 14, 2023
mye956
reviewed
Sep 14, 2023
mye956
reviewed
Sep 14, 2023
mye956
previously approved these changes
Sep 14, 2023
Realmonia
force-pushed
the
netlibcni
branch
from
September 20, 2023 20:57
e8986fe
to
7da9402
Compare
mye956
approved these changes
Sep 20, 2023
samjkon
approved these changes
Sep 20, 2023
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
This PR introduces CNI models from Fargate agent implementation to ecs-agent module. Later ecs agent will be integrate with those models.
Implementation details
Besides mentioned change, I also updated some dependency version to match Fargate's dependency versions. Notably:
github.com/vishvananda/netlink upgrade to is a beta version but it has been out for a year and fargate is using it. And in our codebase, we are simply using LinkByName and LinkList methods that are not modified.
One dependency update we want to do but contains a breaking change is
github.com/containernetworking/plugins
. In the upgrade from 0.9.1 to 1.3.0, it now depends oncontainerd/cgroup
1.1.0, which contains a breaking change. It is later fixed in v3.0.2 (thanks @mythri-garaga and @singholt), but to integrate with that version we need to change non trivial code in agent. This will be done in a follow up PR.Related links: #3623 containerd/cgroups#296
SetV2NDstPortAndDeviceName
's function signature is changed. For Fargate to consume this, it needs to do data client operations before entering this function.Also removed
vpctunnel_linux_integ_test
due to the different plugin path/setup in agent. Foramazon-ecs-agent
, currently integration test does not build CNI plugins, while Fargate does. These types of integration tests should be added when the code is actually integrated with agent.Testing
New tests cover the changes: Yes. Added unit tests.
Note that - since the added changes are imported from Fargate agent, we do not build CNI plugins in unit/integ test; we can change this behavior (make the integ test builds cni plugins too), or move it to functional tests when we integrate with netlib but will call it out of scope for this PR. A list of missing/removed tests due to this limitation follows:
func (c *cniClient) Version(plugin string) (string, error)
test inclient.go
. Agent currently checks theVERSION
value in git submodule instead of calling--version
command using built plugin.func SetV2NDstPortAndDeviceName(taskENI *networkinterface.NetworkInterface, dstPort uint16)
test invpctunnel_config.go
as mentioned in earlier section of this PR description.Passed Github workflow.
Description for the changelog
Add CNI to ecs-agent/netlib/model and update dependencies
Licensing
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.