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

Set NO_FLOOD to IPsec tunnel ports #4419

Merged
merged 1 commit into from Feb 8, 2023
Merged

Conversation

xliuxu
Copy link
Contributor

@xliuxu xliuxu commented Nov 29, 2022

Set NO_FLOOD to IPsec tunnel ports to avoid ARP flooding.

Signed-off-by: Xu Liu xliu2@vmware.com

@xliuxu xliuxu requested review from wenyingd and tnqn November 29, 2022 13:45
@codecov
Copy link

codecov bot commented Nov 29, 2022

Codecov Report

Merging #4419 (ce5ae9d) into main (a63314f) will increase coverage by 0.08%.
The diff coverage is 50.00%.

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

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #4419      +/-   ##
==========================================
+ Coverage   69.58%   69.67%   +0.08%     
==========================================
  Files         400      400              
  Lines       59122    58369     -753     
==========================================
- Hits        41141    40666     -475     
+ Misses      15175    14914     -261     
+ Partials     2806     2789      -17     
Flag Coverage Δ *Carryforward flag
e2e-tests 38.28% <25.00%> (-0.06%) ⬇️
integration-tests 34.48% <ø> (ø) Carriedforward from a63314f
kind-e2e-tests 47.68% <25.00%> (ø) Carriedforward from a63314f
unit-tests 59.61% <60.00%> (ø) Carriedforward from a63314f

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

Impacted Files Coverage Δ
cmd/antrea-agent/agent.go 0.00% <0.00%> (ø)
...gent/controller/noderoute/node_route_controller.go 67.98% <60.00%> (+4.78%) ⬆️
pkg/agent/wireguard/client_linux.go 77.07% <0.00%> (-4.46%) ⬇️
pkg/agent/util/net_linux.go 31.27% <0.00%> (-1.70%) ⬇️
...kg/apiserver/registry/system/supportbundle/rest.go 83.24% <0.00%> (-1.53%) ⬇️
pkg/agent/openflow/network_policy.go 79.83% <0.00%> (-1.46%) ⬇️
pkg/agent/agent.go 56.96% <0.00%> (+0.09%) ⬆️
pkg/agent/config/node_config.go 94.87% <0.00%> (+1.25%) ⬆️
pkg/agent/controller/networkpolicy/cache.go 86.79% <0.00%> (+1.35%) ⬆️
... and 9 more

Comment on lines +717 to +720
// Set the port with no-flood to reject ARP flood packets.
if err := c.ovsCtlClient.SetPortNoFlood(int(ofPort)); err != nil {
return 0, fmt.Errorf("failed to set port %s with no-flood config: %w", portName, err)
}
Copy link
Member

Choose a reason for hiding this comment

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

Want to understand the issue: the normal tunnel port doesn't need setting it because "normal" action doesn't flood broadcast packets to flow based tunnel ports but will flood to ipsec tunnels because they are port based?

Copy link
Contributor

Choose a reason for hiding this comment

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

Yes, the general tunnel port is flow based, and it needs flow to tell it how to encap the tunnel header on a packet. For ARP, we do not have a flow to explicitly set tht tunnel peer, that is why we do not see ARP packets are broadcast to all other Nodes. But for IPSec tunnel, one port is created per peer Node, so when ARP packet outputs ( via normal action) to the port, OVS datapath is able to send it to peer Node. Then the packet hits the "normal" flow on peer Node, and continue flooding.

wenyingd
wenyingd previously approved these changes Nov 30, 2022
Copy link
Contributor

@wenyingd wenyingd 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 tnqn added action/backport Indicates a PR that requires backports. action/release-note Indicates a PR that should be included in release notes. labels Dec 1, 2022
@tnqn
Copy link
Member

tnqn commented Dec 1, 2022

@xliuxu I suppose this should be backported?

@tnqn
Copy link
Member

tnqn commented Dec 1, 2022

/test-all

@xliuxu
Copy link
Contributor Author

xliuxu commented Dec 1, 2022

@xliuxu I suppose this should be backported?

I think so. I will backport this PR once merged.

@xliuxu
Copy link
Contributor Author

xliuxu commented Dec 1, 2022

/test-e2e

@tnqn
Copy link
Member

tnqn commented Dec 1, 2022

It failed on testIPSecTunnelConnectivity twice. Is it related to the change?

@xliuxu
Copy link
Contributor Author

xliuxu commented Dec 2, 2022

/test-e2e

@xliuxu
Copy link
Contributor Author

xliuxu commented Dec 2, 2022

It failed on testIPSecTunnelConnectivity twice. Is it related to the change?

I cannot reproduce the same error locally. I will trigger a new e2e test and check the results on the testbed if it still fails.

@tnqn
Copy link
Member

tnqn commented Dec 2, 2022

It failed on testIPSecTunnelConnectivity twice. Is it related to the change?

I cannot reproduce the same error locally. I will trigger a new e2e test and check the results on the testbed if it still fails.

Could you check the previous failures too? Even if the 3rd succeeds, we need to understand the failures as they are frequent.

@xliuxu
Copy link
Contributor Author

xliuxu commented Dec 2, 2022

It failed on testIPSecTunnelConnectivity twice. Is it related to the change?

I cannot reproduce the same error locally. I will trigger a new e2e test and check the results on the testbed if it still fails.

Could you check the previous failures too? Even if the 3rd succeeds, we need to understand the failures as they are frequent.

I cannot reproduce the error in the testbeds. I will trigger more e2e tests to check.
/test-e2e

@xliuxu
Copy link
Contributor Author

xliuxu commented Dec 5, 2022

/test-latest-e2e

@xliuxu
Copy link
Contributor Author

xliuxu commented Dec 5, 2022

/test-e2e

@xliuxu
Copy link
Contributor Author

xliuxu commented Dec 5, 2022

/test-e2e

2 similar comments
@xliuxu
Copy link
Contributor Author

xliuxu commented Dec 5, 2022

/test-e2e

@xliuxu
Copy link
Contributor Author

xliuxu commented Dec 5, 2022

/test-e2e

@xliuxu
Copy link
Contributor Author

xliuxu commented Dec 5, 2022

/test-e2e

4 similar comments
@xliuxu
Copy link
Contributor Author

xliuxu commented Dec 5, 2022

/test-e2e

@xliuxu
Copy link
Contributor Author

xliuxu commented Dec 5, 2022

/test-e2e

@xliuxu
Copy link
Contributor Author

xliuxu commented Dec 5, 2022

/test-e2e

@xliuxu
Copy link
Contributor Author

xliuxu commented Dec 5, 2022

/test-e2e

@xliuxu
Copy link
Contributor Author

xliuxu commented Dec 6, 2022

/test-e2e

@xliuxu
Copy link
Contributor Author

xliuxu commented Dec 14, 2022

/test-e2e

@xliuxu
Copy link
Contributor Author

xliuxu commented Dec 19, 2022

/test-e2e

1 similar comment
@xliuxu
Copy link
Contributor Author

xliuxu commented Dec 19, 2022

/test-e2e

@xliuxu
Copy link
Contributor Author

xliuxu commented Dec 19, 2022

/test-e2e

@xliuxu
Copy link
Contributor Author

xliuxu commented Dec 19, 2022

/test-e2e

@xliuxu xliuxu changed the title Set NO_FLOOD to IPsec tunnel ports [WIP] Set NO_FLOOD to IPsec tunnel ports Dec 19, 2022
@xliuxu
Copy link
Contributor Author

xliuxu commented Dec 23, 2022

/test-e2e

1 similar comment
@xliuxu
Copy link
Contributor Author

xliuxu commented Dec 23, 2022

/test-e2e

Set NO_FLOOD to IPsec tunnel ports to avoid ARP flooding.

Signed-off-by: Xu Liu <xliu2@vmware.com>
@xliuxu xliuxu changed the title [WIP] Set NO_FLOOD to IPsec tunnel ports Set NO_FLOOD to IPsec tunnel ports Feb 8, 2023
@xliuxu
Copy link
Contributor Author

xliuxu commented Feb 8, 2023

/test-e2e

@xliuxu
Copy link
Contributor Author

xliuxu commented Feb 8, 2023

/test-all

@xliuxu
Copy link
Contributor Author

xliuxu commented Feb 8, 2023

@tnqn The flaky e2e of this PR should be the same as #4477 but I did not find the root cause. I can tell that the configs of strongswan and the xfrm policies are configured correctly when the error occurred. I suspect this could be related to the underlying testbed and it is now not reoccurring. Do you think we can merge this PR?

@tnqn
Copy link
Member

tnqn commented Feb 8, 2023

@tnqn The flaky e2e of this PR should be the same as #4477 but I did not find the root cause. I can tell that the configs of strongswan and the xfrm policies are configured correctly when the error occurred. I suspect this could be related to the underlying testbed and it is now not reoccurring. Do you think we can merge this PR?

Got it. We could revisit it when it happens again.

@tnqn tnqn merged commit 6d76ddf into antrea-io:main Feb 8, 2023
This was referenced Mar 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
action/backport Indicates a PR that requires backports. 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.

None yet

3 participants