-
Notifications
You must be signed in to change notification settings - Fork 376
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
Bump up cni and plugins libraries to v1.1.1 #4425
Conversation
This pull request fixes 1 alert when merging 6cb662c into 5547e73 - view on LGTM.com fixed alerts:
Heads-up: LGTM.com's PR analysis will be disabled on the 5th of December, and LGTM.com will be shut down ⏻ completely on the 16th of December 2022. Please enable GitHub code scanning, which uses the same CodeQL engine ⚙️ that powers LGTM.com. For more information, please check out our post on the GitHub blog. |
6cb662c
to
268cecc
Compare
/test-all |
Codecov Report
@@ Coverage Diff @@
## main #4425 +/- ##
==========================================
- Coverage 69.86% 69.70% -0.17%
==========================================
Files 403 403
Lines 59778 58608 -1170
==========================================
- Hits 41765 40851 -914
+ Misses 15189 14964 -225
+ Partials 2824 2793 -31
*This pull request uses carry forward flags. Click here to find out more.
|
@wenyingd , I suppose this can be closed? |
No, @tnqn and I had a discussion on how to resolve the issue, and we would like to create two patches, both are working. The first one ( #4428 ) would copy some code from the latest dependent library containernetworking to support setting MAC when creating veth pair. And it is expected to be merged in main branch and back port to the previous releases. Then we do not need to bump up the dependent library version. And this one is the 2nd, which is existing only on main branch. This one is expected to be based on the first one, the content is to remove the copied code, and bump up the dependent library version. This patch is with a lower priority, and can not be included in this release. |
Got it, thanks for explanation. |
@wenyingd maybe you could update the PR title to "Bump up cni and plugins libraries to v1.1.1" to avoid confusion since the MAC change issue is already resolved by another PR and this is to reduce code redundancy |
updated accordingly. |
218dec5
to
48d0800
Compare
48d0800
to
1259688
Compare
1259688
to
e6353fb
Compare
/test-all |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM overall, a few nits and questions.
@@ -300,52 +300,46 @@ func TestAdvertiseContainerAddr(t *testing.T) { | |||
name: "interface-not-found", | |||
runInNS: true, | |||
result: ¤t.Result{IPs: []*current.IPConfig{ | |||
{Version: "4", Interface: &interfaceID, Address: ipv4CIDR, Gateway: ipv4Gateway}, | |||
{Version: "6", Interface: &interfaceID, Address: ipv6CIDR, Gateway: ipv6Gateway}, | |||
{Interface: &interfaceID, Address: ipv4CIDR, Gateway: ipv4Gateway}, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So the Version
is no longer required in cni v1.0? I am wondering will this work properly with old plugins? I mean the cni plugins which is installed by build/image/scripts/install_cni
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, Version
property is not existing in the Result type since 1.1. I have added function to convert the Result in CNI Response to the previous version format if antrea CNI configuration not using the latest version.
@@ -519,6 +520,8 @@ func (s *CNIServer) CmdAdd(ctx context.Context, request *cnipb.CniCmdRequest) (* | |||
klog.Errorf("Failed to configure interfaces for container %s: %v", cniConfig.ContainerId, err) | |||
return s.configInterfaceFailureResponse(err), nil | |||
} | |||
cniVersion := cniConfig.CNIVersion | |||
cniResult, _ := result.Result.GetAsVersion(cniVersion) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we capture the error here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it is not needed as we should always use a supported CNI version.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
@wenyingd The PR needs a rebase as go.mod and go.sum has been updated and git can't handle it even it doesn't show conflict. The build would fail if the PR is merged as is. |
1. Bump up github.com/containernetworking/cni version to v1.1.2 2. Bump up github.com/containernetworking/plugins v1.1.1 Signed-off-by: wenyingd <[email protected]>
e6353fb
to
0ecc30f
Compare
Updated. |
/test-all |
/skip-e2e which failed on known flaky test |
Signed-off-by: wenyingd [email protected]