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

[Multicast] support encap mode #3947

Merged
merged 1 commit into from
Jul 28, 2022
Merged

Conversation

wenyingd
Copy link
Contributor

  1. Use a single routine to send local multicast groups in an IGMP v3
    Report message to notify all the other Nodes in the cluster
  2. Multicast controller maintains both local Pod members and remote
    Nodes which have Pod members for each multicast group found in the
    cluster
  3. Add remote Node members in the OpenFlow group buckets.

Signed-off-by: wenyingd [email protected]

@wenyingd wenyingd changed the title Multicast encap [Multicast] support encap mode Jun 28, 2022
@wenyingd wenyingd force-pushed the multicast_encap branch 2 times, most recently from 5ac8704 to aa4797a Compare June 28, 2022 11:02
@codecov-commenter
Copy link

codecov-commenter commented Jun 28, 2022

Codecov Report

Merging #3947 (3c1a91a) into main (2a092ab) will increase coverage by 0.62%.
The diff coverage is 30.26%.

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

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #3947      +/-   ##
==========================================
+ Coverage   63.93%   64.56%   +0.62%     
==========================================
  Files         292      296       +4     
  Lines       43671    44964    +1293     
==========================================
+ Hits        27922    29029    +1107     
- Misses      13492    13649     +157     
- Partials     2257     2286      +29     
Flag Coverage Δ *Carryforward flag
e2e-tests 40.68% <1.79%> (?)
integration-tests 35.35% <4.01%> (?)
kind-e2e-tests 44.76% <8.81%> (-5.24%) ⬇️ Carriedforward from b70635e
unit-tests 44.20% <44.87%> (+0.01%) ⬆️ Carriedforward from b70635e

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

Impacted Files Coverage Δ
pkg/agent/openflow/multicast.go 0.00% <0.00%> (ø)
pkg/agent/openflow/pipeline.go 80.60% <0.00%> (+7.61%) ⬆️
pkg/agent/util/iptables/iptables.go 52.38% <ø> (+8.85%) ⬆️
pkg/agent/openflow/client.go 71.72% <16.66%> (+2.46%) ⬆️
pkg/agent/multicast/mcast_controller.go 27.95% <26.89%> (-23.99%) ⬇️
pkg/util/k8s/node.go 80.90% <30.76%> (-6.72%) ⬇️
pkg/agent/route/route_linux.go 44.09% <33.69%> (-3.11%) ⬇️
...gent/controller/noderoute/node_route_controller.go 61.61% <50.00%> (+5.49%) ⬆️
pkg/agent/multicast/mcast_discovery.go 44.78% <68.65%> (-16.82%) ⬇️
pkg/ovs/openflow/ofctrl_group.go 65.16% <71.42%> (+14.39%) ⬆️
... and 85 more

@wenyingd wenyingd force-pushed the multicast_encap branch 4 times, most recently from 5d3fd03 to 4341561 Compare June 29, 2022 12:16
@wenyingd
Copy link
Contributor Author

/test-multicast-e2e

@wenyingd wenyingd requested review from ceclinux and liu4480 June 29, 2022 12:31
eType eventType
time time.Time
iface *interfacestore.InterfaceConfig
sender net.IP
Copy link
Contributor

Choose a reason for hiding this comment

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

does sender mean a sender in multicast group? what if there are multiple senders?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

No it means the source Node who sends IGMP report. I rename it as "srcNode". It is used only with encap mode.

@wenyingd wenyingd force-pushed the multicast_encap branch 6 times, most recently from 8af2d87 to c5e37e7 Compare July 8, 2022 02:28
@wenyingd wenyingd requested a review from tnqn July 11, 2022 02:37
@wenyingd
Copy link
Contributor Author

/test-all

@wenyingd
Copy link
Contributor Author

/test-e2e

cmd/antrea-agent/agent.go Outdated Show resolved Hide resolved
pkg/agent/multicast/mcast_controller.go Show resolved Hide resolved
pkg/agent/multicast/mcast_controller.go Outdated Show resolved Hide resolved
pkg/agent/multicast/mcast_controller.go Outdated Show resolved Hide resolved
pkg/agent/multicast/mcast_controller.go Show resolved Hide resolved
pkg/agent/openflow/client.go Outdated Show resolved Hide resolved
pkg/agent/openflow/multicast.go Show resolved Hide resolved
pkg/agent/route/route_linux.go Show resolved Hide resolved
pkg/agent/route/interfaces.go Outdated Show resolved Hide resolved
pkg/agent/route/route_linux.go Outdated Show resolved Hide resolved
@wenyingd wenyingd force-pushed the multicast_encap branch 3 times, most recently from f20e550 to 9d66c05 Compare July 14, 2022 12:01
pkg/agent/multicast/mcast_controller.go Outdated Show resolved Hide resolved
pkg/agent/multicast/mcast_controller.go Outdated Show resolved Hide resolved
pkg/agent/multicast/mcast_controller.go Outdated Show resolved Hide resolved
pkg/agent/multicast/mcast_controller.go Outdated Show resolved Hide resolved
pkg/agent/multicast/mcast_controller.go Outdated Show resolved Hide resolved
pkg/agent/route/route_linux.go Show resolved Hide resolved
pkg/agent/route/route_linux.go Outdated Show resolved Hide resolved
pkg/agent/route/route_linux.go Outdated Show resolved Hide resolved
pkg/agent/route/testing/mock_route.go Outdated Show resolved Hide resolved
pkg/util/k8s/node.go Outdated Show resolved Hide resolved
@wenyingd wenyingd force-pushed the multicast_encap branch 4 times, most recently from 60de85e to 70ade2b Compare July 20, 2022 15:43
@wenyingd
Copy link
Contributor Author

/test-all

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 except the issue in e2e test

test/e2e/multicast_test.go Outdated Show resolved Hide resolved
@wenyingd
Copy link
Contributor Author

/test-all
/test-multicast-e2e
/skip-windows-all
/skip-ipv6-all
/skip-ipv6-only-all

@wenyingd
Copy link
Contributor Author

/test-all
/test-multicast-e2e

@wenyingd
Copy link
Contributor Author

/test-all
/test-multicast-e2e

@wenyingd
Copy link
Contributor Author

/test-multicast-e2e

1 similar comment
@wenyingd
Copy link
Contributor Author

/test-multicast-e2e

@wenyingd
Copy link
Contributor Author

/test-e2e

@wenyingd
Copy link
Contributor Author

@ceclinux @tnqn Any other comments in this change?

@tnqn tnqn added this to the Antrea v1.8 release milestone Jul 26, 2022
func runTestMulticastBetweenPods(t *testing.T, data *TestData, mc multicastTestcase, nodeMulticastInterfaces map[int][]string, checkReceiverRoute bool) {
currentEncapMode, _ := data.GetEncapMode()
if requiresExternalHostSupport(mc) && currentEncapMode == config.TrafficEncapModeEncap {
t.Logf("Multicast does not support using hostNetwork Pod to simulate the external host with encap mode, skip the case")
Copy link
Member

Choose a reason for hiding this comment

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

Use t.Skip, then the subtest will be marked as "Skip" instead of "Pass"

Copy link
Contributor Author

Choose a reason for hiding this comment

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

updated.

1, Use a single routine to send local multicast groups in an IGMP v3
   Report message to notify all the other Nodes in the cluster
2. Multicast controller maintains both local Pod members and remote
   Nodes which has Pod members for each multicast group found in the
   cluster
3. Add remote Node members in the OpenFlow group buckets.
4. Agent drops the duplicated multicast packet received from underlay by
   - adding iptables rules in raw table antreaPreRouting chain to drop
     multicast packets sent from other Nodes, because the Pod multicast
     traffic is received from tunnel with encap mode.
   - adding an ipset to maintain IPs of other Nodes in the cluster, which
     is used as source in the iptables rule.

Signed-off-by: wenyingd <[email protected]>
@wenyingd
Copy link
Contributor Author

/test-all
/test-multicast-e2e

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 tnqn merged commit 28d2655 into antrea-io:main Jul 28, 2022
hjiajing pushed a commit to hjiajing/antrea that referenced this pull request Jul 28, 2022
1, Use a single routine to send local multicast groups in an IGMP v3
   Report message to notify all the other Nodes in the cluster
2. Multicast controller maintains both local Pod members and remote
   Nodes which has Pod members for each multicast group found in the
   cluster
3. Add remote Node members in the OpenFlow group buckets.
4. Agent drops the duplicated multicast packet received from underlay by
   - adding iptables rules in raw table antreaPreRouting chain to drop
     multicast packets sent from other Nodes, because the Pod multicast
     traffic is received from tunnel with encap mode.
   - adding an ipset to maintain IPs of other Nodes in the cluster, which
     is used as source in the iptables rule.

Signed-off-by: wenyingd <[email protected]>
@tnqn tnqn added kind/feature Categorizes issue or PR as related to a new feature. action/release-note Indicates a PR that should be included in release notes. labels Aug 2, 2022
@wenyingd wenyingd deleted the multicast_encap branch August 15, 2022 03:33
@wenyingd wenyingd mentioned this pull request Sep 14, 2022
12 tasks
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. kind/feature Categorizes issue or PR as related to a new feature.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants