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 #4295: Add unit test for pkg/agent/route #4419: Set NO_FLOOD to IPsec tunnel ports #4470: Fix that Service routes may get lost when starting on Windows #4654: Restore NO_FLOOD to OVS ports after reconnecting the OVS #4711: Fix route deletion for Service ClusterIP and LoadBalancerIP #4767

Conversation

luolanzone
Copy link
Contributor

@luolanzone luolanzone commented Mar 28, 2023

Cherry pick of #4295 #4419 #4470 #4654 #4711 #4697 #4674 on release-1.8.

#4295: Add unit test for pkg/agent/route
#4419: Set NO_FLOOD to IPsec tunnel ports
#4470: Fix that Service routes may get lost when starting on Windows
#4654: Restore NO_FLOOD to OVS ports after reconnecting the OVS
#4711: Fix route deletion for Service ClusterIP and LoadBalancerIP
#4697: Fix windows image building error in jenkins pipeline
#4674:Ensure OVS port is valid before setting NO_FLOOD

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

tnqn and others added 4 commits March 28, 2023 08:43
Set NO_FLOOD to IPsec tunnel ports to avoid ARP flooding.

Signed-off-by: Xu Liu <[email protected]>
The NO_FLOOD configuration is lost when the OVS daemon is restarted.
Currently, the only way to recover this configuration is by restarting
the agent. This pull request adds logic to recover the configuration
when receiving OVS reconnection events.

Signed-off-by: Xu Liu <[email protected]>
@luolanzone luolanzone 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 Mar 28, 2023
@codecov
Copy link

codecov bot commented Mar 28, 2023

Codecov Report

Merging #4767 (fd1b482) into release-1.8 (628c57b) will decrease coverage by 1.24%.
The diff coverage is 61.94%.

❗ Current head fd1b482 differs from pull request most recent head 204f0da. Consider uploading reports for the commit 204f0da to get more accurate results

Impacted file tree graph

@@               Coverage Diff               @@
##           release-1.8    #4767      +/-   ##
===============================================
- Coverage        65.88%   64.65%   -1.24%     
===============================================
  Files              304      305       +1     
  Lines            46668    46890     +222     
===============================================
- Hits             30747    30316     -431     
- Misses           13521    14178     +657     
+ Partials          2400     2396       -4     
Flag Coverage Δ *Carryforward flag
e2e-tests 39.26% <43.36%> (?)
integration-tests 35.14% <25.88%> (-0.01%) ⬇️ Carriedforward from 204f0da
kind-e2e-tests 41.90% <24.35%> (-5.97%) ⬇️ Carriedforward from 204f0da
unit-tests 46.46% <38.09%> (+1.26%) ⬆️ Carriedforward from 204f0da

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

Impacted Files Coverage Δ
pkg/agent/nodeportlocal/rules/iptable_rule.go 55.78% <0.00%> (ø)
pkg/agent/util/net_linux.go 30.29% <ø> (-1.97%) ⬇️
pkg/agent/route/route_linux.go 71.06% <34.83%> (+17.87%) ⬆️
pkg/agent/proxy/proxier.go 57.95% <50.00%> (-8.07%) ⬇️
...gent/controller/noderoute/node_route_controller.go 63.16% <60.00%> (+5.62%) ⬆️
pkg/agent/agent.go 54.17% <66.66%> (+3.72%) ⬆️
pkg/agent/memberlist/cluster.go 81.41% <76.81%> (+4.96%) ⬆️
pkg/ovs/openflow/ofctrl_bridge.go 75.52% <81.25%> (-0.02%) ⬇️
pkg/agent/util/netlink/netlink_linux.go 91.66% <91.66%> (ø)
pkg/agent/apiserver/apiserver.go 65.95% <92.30%> (-1.07%) ⬇️
... and 5 more

... and 62 files with indirect coverage changes

When proxyAll is enabled, AntreaProxy needs to install routes in the
host network namespace to redirect traffic to OVS for load balancing.
For a Service with multiple ports, multiple ServicePorts are generated
and processed. The previous code installed the route for a ClusterIP or
a LoadBalancerIP multiple times when such a Service was created, and
uninstalled the route multiple times when it was deleted, leading to a
few problems.

This patch adds a serviceIPRouteReferences which tracks the references
of Service IPs' routes. The key is the Service IP and the value is the
the set of ServiceInfo strings. With the references, we install a route
exactly once as long as it's used by any ServicePorts and uninstall it
exactly once when it's no longer used by any ServicePorts.

This patch also fixes an issue that the route for ClusterIP was not
removed on Windows Nodes after the Service was removed.

Fixes antrea-io#4361

Signed-off-by: Quan Tian <[email protected]>
@luolanzone luolanzone force-pushed the automated-cherry-pick-of-#4295-#4419-#4470-#4654-#4711-upstream-release-1.8 branch from 91717ea to 905f653 Compare March 28, 2023 02:29
DOCKER_REGISTRY is no longer needed in agent image tag.
Remove it to align with containerd image tag in CI pipeline.

Update more image tags which is unavailable in public repo.

Fixes antrea-io#4696

Signed-off-by: Shuyang Xin <[email protected]>
@tnqn
Copy link
Member

tnqn commented Mar 30, 2023

#4674 is missing, leading to same test failure

@luolanzone luolanzone force-pushed the automated-cherry-pick-of-#4295-#4419-#4470-#4654-#4711-upstream-release-1.8 branch from 53d77d1 to fe59ad0 Compare March 30, 2023 11:34
@tnqn
Copy link
Member

tnqn commented Mar 30, 2023

Golangci-lint check failed

There could be some cases that OVS ports are left invalid. Setting
NO_FLOOD for these ports will fail for sure and restarting agents would
just meet the same error. Later we should enhance the port cleanup
logic, either when they are firstly identified, or when their owners do
the initialization. For now, as there could be invalid ports in
interface cache, we should ensure a port is valid before setting
NO_FLOOD.

Signed-off-by: Quan Tian <[email protected]>
@luolanzone luolanzone force-pushed the automated-cherry-pick-of-#4295-#4419-#4470-#4654-#4711-upstream-release-1.8 branch from fe59ad0 to 204f0da Compare March 30, 2023 14:10
@tnqn
Copy link
Member

tnqn commented Mar 30, 2023

/test-all

@tnqn
Copy link
Member

tnqn commented Mar 31, 2023

/skip-e2e

@tnqn tnqn merged commit dbd53c9 into antrea-io:release-1.8 Mar 31, 2023
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.

5 participants