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 #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 #4761

Conversation

luolanzone
Copy link
Contributor

@luolanzone luolanzone commented Mar 24, 2023

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

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

xliuxu and others added 3 commits March 24, 2023 18:16
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 24, 2023
@luolanzone luolanzone marked this pull request as draft March 24, 2023 13:37
@codecov
Copy link

codecov bot commented Mar 24, 2023

Codecov Report

Merging #4761 (5805858) into release-1.9 (28cb924) will decrease coverage by 0.90%.
The diff coverage is 57.03%.

❗ Current head 5805858 differs from pull request most recent head 3a2c2d7. Consider uploading reports for the commit 3a2c2d7 to get more accurate results

Impacted file tree graph

@@               Coverage Diff               @@
##           release-1.9    #4761      +/-   ##
===============================================
- Coverage        64.24%   63.34%   -0.90%     
===============================================
  Files              393      393              
  Lines            55568    55605      +37     
===============================================
- Hits             35698    35224     -474     
- Misses           17260    17746     +486     
- Partials          2610     2635      +25     
Flag Coverage Δ
integration-tests 34.51% <2.56%> (+0.09%) ⬆️
kind-e2e-tests 42.39% <26.27%> (-5.83%) ⬇️
unit-tests 48.88% <43.70%> (+0.51%) ⬆️
Impacted Files Coverage Δ
cmd/antrea-agent/agent.go 0.00% <0.00%> (ø)
pkg/agent/agent.go 52.19% <40.00%> (-1.07%) ⬇️
pkg/agent/proxy/proxier.go 67.73% <52.30%> (-2.39%) ⬇️
...gent/controller/noderoute/node_route_controller.go 59.61% <60.00%> (+0.32%) ⬆️
pkg/agent/route/route_windows.go 37.30% <75.00%> (+2.65%) ⬆️
pkg/agent/interfacestore/interface_cache.go 97.46% <100.00%> (-2.54%) ⬇️
pkg/agent/interfacestore/types.go 100.00% <100.00%> (ø)
pkg/agent/route/route_linux.go 71.06% <100.00%> (-0.43%) ⬇️
pkg/agent/util/net.go 48.10% <100.00%> (-10.23%) ⬇️

... and 49 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-#4419-#4470-#4654-#4711-upstream-release-1.9 branch from 169fd0d to 5805858 Compare March 27, 2023 02:45
@luolanzone luolanzone marked this pull request as ready for review March 27, 2023 07:03
XinShuYang and others added 2 commits March 29, 2023 22:04
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]>
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]>
@tnqn
Copy link
Member

tnqn commented Mar 31, 2023

/skip-all

@tnqn tnqn merged commit ea9d87e into antrea-io:release-1.9 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