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

Automated cherry pick of #4428: Bugfix: Pod or gateway interface use a different MAC from the #4448

Conversation

wenyingd
Copy link
Contributor

@wenyingd wenyingd commented Dec 7, 2022

Cherry pick of #4428 on release-1.9.

#4428: Bugfix: Pod or gateway interface use a different MAC from the

For details on the cherry pick process, see the cherry pick requests page.

…tion

This issue is found on Ubuntu 22.04: the network interface for antrea-gw0
is different from the one we used in OpenFlow rules.

The reason is systemd-udev has modified the interface's MAC after it watches
a new one is created. So if Antrea Agent reads interface's information before
systemd-udev's modification, Antrea Agent would uses an incorrect value to
install OpenFlow rules.

To resolve the issue,
  1. Agent generates a static MAC for antrea-gw0 or the interface used by Pod
  2. Agent uses the generated MAC to create OVS internal port or veth pair

To implement the logic, some code is copied from containernetworking/plugins/ip/link_linux
latest versions to path thirdparty, this is to avoid unexpected issues introduced
when bumping up the dependent libraries.

Signed-off-by: wenyingd <wenyingd@vmware.com>
@wenyingd wenyingd added the kind/cherry-pick Categorizes issue or PR as related to the cherry-pick of a bug fix from the main branch to a release label Dec 7, 2022
@codecov
Copy link

codecov bot commented Dec 7, 2022

Codecov Report

Merging #4448 (55b83b1) into release-1.9 (abafaba) will increase coverage by 0.20%.
The diff coverage is 56.00%.

Impacted file tree graph

@@               Coverage Diff               @@
##           release-1.9    #4448      +/-   ##
===============================================
+ Coverage        64.23%   64.43%   +0.20%     
===============================================
  Files              393      393              
  Lines            55554    55590      +36     
===============================================
+ Hits             35683    35821     +138     
+ Misses           17257    17165      -92     
+ Partials          2614     2604      -10     
Flag Coverage Δ
e2e-tests 39.66% <48.97%> (?)
integration-tests 34.51% <32.43%> (+0.02%) ⬆️
kind-e2e-tests 48.07% <48.97%> (-0.06%) ⬇️
unit-tests 48.32% <44.00%> (+0.12%) ⬆️
Impacted Files Coverage Δ
pkg/ovs/ovsconfig/ovs_client.go 66.70% <43.33%> (+1.42%) ⬆️
pkg/agent/agent.go 57.52% <58.33%> (+4.02%) ⬆️
pkg/agent/agent_windows.go 1.14% <100.00%> (+0.57%) ⬆️
...g/agent/cniserver/interface_configuration_linux.go 27.60% <100.00%> (+1.14%) ⬆️
pkg/agent/interfacestore/types.go 100.00% <100.00%> (ø)
pkg/agent/util/net.go 58.33% <100.00%> (+1.67%) ⬆️
...catesigningrequest/ipsec_csr_signing_controller.go 61.65% <0.00%> (-2.46%) ⬇️
pkg/agent/cniserver/ipam/antrea_ipam.go 51.08% <0.00%> (-1.74%) ⬇️
pkg/agent/openflow/client.go 72.34% <0.00%> (-1.29%) ⬇️
.../flowexporter/connections/conntrack_connections.go 80.47% <0.00%> (-0.96%) ⬇️
... and 16 more

@wenyingd wenyingd requested a review from tnqn December 13, 2022 10:47
@wenyingd
Copy link
Contributor Author

/test-all

@tnqn
Copy link
Member

tnqn commented Dec 13, 2022

/skip-e2e which failed on an irrelevant test, which is tracked by #4477
/test-networkpolicy

@tnqn
Copy link
Member

tnqn commented Dec 14, 2022

/test-latest-networkpolicy

@tnqn tnqn merged commit 2fa397b into antrea-io:release-1.9 Dec 15, 2022
@wenyingd wenyingd deleted the automated-cherry-pick-of-#4428-upstream-release-1.9 branch May 30, 2023 06:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/cherry-pick Categorizes issue or PR as related to the cherry-pick of a bug fix from the main branch to a release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants