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

Bump up cni and plugins libraries to v1.1.1 #4425

Merged
merged 1 commit into from
Feb 27, 2023

Conversation

wenyingd
Copy link
Contributor

@wenyingd wenyingd commented Nov 30, 2022

  1. Bump up cni and plugins version
  2. Removed the copied code from third_party

Signed-off-by: wenyingd wenyingd@vmware.com

@lgtm-com
Copy link

lgtm-com bot commented Nov 30, 2022

This pull request fixes 1 alert when merging 6cb662c into 5547e73 - view on LGTM.com

fixed alerts:

  • 1 for Size computation for allocation may overflow

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.

@wenyingd
Copy link
Contributor Author

/test-all

@codecov
Copy link

codecov bot commented Nov 30, 2022

Codecov Report

Merging #4425 (1cd598f) into main (d5dd02e) will decrease coverage by 0.17%.
The diff coverage is 100.00%.

❗ Current head 1cd598f differs from pull request most recent head 0ecc30f. Consider uploading reports for the commit 0ecc30f to get more accurate results

Impacted file tree graph

@@            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     
Flag Coverage Δ *Carryforward flag
e2e-tests 38.66% <50.00%> (+0.32%) ⬆️
integration-tests 34.39% <66.66%> (-0.05%) ⬇️ Carriedforward from 0ecc30f
kind-e2e-tests 47.32% <66.66%> (+0.39%) ⬆️ Carriedforward from 0ecc30f
unit-tests 59.87% <100.00%> (-0.04%) ⬇️ Carriedforward from 0ecc30f

*This pull request uses carry forward flags. Click here to find out more.

Impacted Files Coverage Δ
pkg/agent/cniserver/ipam/ipam_delegator.go 68.18% <ø> (ø)
pkg/agent/cniserver/ipam/ipam_service.go 92.47% <ø> (+8.60%) ⬆️
pkg/agent/cniserver/pod_configuration_linux.go 100.00% <ø> (ø)
pkg/agent/cniserver/pod_configuration_windows.go 75.00% <ø> (ø)
pkg/agent/cniserver/server_linux.go 100.00% <ø> (ø)
pkg/agent/cniserver/server_windows.go 85.18% <ø> (ø)
pkg/agent/cniserver/sriov.go 31.37% <ø> (ø)
pkg/agent/secondarynetwork/ipam/ipam_delegator.go 3.70% <ø> (ø)
pkg/agent/secondarynetwork/podwatch/controller.go 75.76% <ø> (ø)
...g/agent/cniserver/interface_configuration_linux.go 80.60% <100.00%> (+8.19%) ⬆️
... and 47 more

@luolanzone
Copy link
Contributor

@wenyingd , I suppose this can be closed?

@wenyingd
Copy link
Contributor Author

wenyingd commented Dec 2, 2022

@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.

@luolanzone
Copy link
Contributor

Got it, thanks for explanation.

@vicky-liu vicky-liu added this to the Antrea v1.10 release milestone Dec 2, 2022
@tnqn tnqn removed this from the Antrea v1.10 release milestone Dec 6, 2022
@tnqn
Copy link
Member

tnqn commented Dec 6, 2022

@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

@wenyingd wenyingd changed the title [WIP] Fix issue that antrea-gw0 MAC is changed [WIP] Bump up cni and plugins libraries to v1.1.1 Dec 6, 2022
@wenyingd
Copy link
Contributor Author

wenyingd commented Dec 6, 2022

@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.

@wenyingd wenyingd force-pushed the gw_mac_modification branch 5 times, most recently from 218dec5 to 48d0800 Compare December 15, 2022 11:20
@wenyingd wenyingd changed the title [WIP] Bump up cni and plugins libraries to v1.1.1 Bump up cni and plugins libraries to v1.1.1 Jan 9, 2023
@wenyingd
Copy link
Contributor Author

wenyingd commented Feb 6, 2023

/test-all
/test-windows-all

Copy link
Contributor

@luolanzone luolanzone left a 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: &current.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},
Copy link
Contributor

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

Copy link
Contributor Author

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.

pkg/agent/cniserver/ipam/antrea_ipam_test.go Show resolved Hide resolved
@@ -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)
Copy link
Contributor

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?

Copy link
Contributor Author

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.

tnqn
tnqn previously approved these changes Feb 24, 2023
Copy link
Member

@tnqn tnqn left a comment

Choose a reason for hiding this comment

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

LGTM

@tnqn
Copy link
Member

tnqn commented Feb 24, 2023

@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 <wenyingd@vmware.com>
@wenyingd
Copy link
Contributor Author

@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.

Updated.

@wenyingd
Copy link
Contributor Author

/test-all
/test-windows-all
/test-ipv6-all
/test-ipv6-only-all

@tnqn tnqn added the action/release-note Indicates a PR that should be included in release notes. label Feb 27, 2023
@tnqn
Copy link
Member

tnqn commented Feb 27, 2023

/skip-e2e which failed on known flaky test

@tnqn tnqn merged commit be83891 into antrea-io:main Feb 27, 2023
@wenyingd wenyingd deleted the gw_mac_modification branch May 30, 2023 06:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
action/release-note Indicates a PR that should be included in release notes.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants