-
Notifications
You must be signed in to change notification settings - Fork 370
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
Fix ovs group id conflict when dual stack is enabled #2317
Conversation
89d1008
to
1da2453
Compare
Codecov Report
@@ Coverage Diff @@
## main #2317 +/- ##
==========================================
+ Coverage 62.04% 65.44% +3.39%
==========================================
Files 281 281
Lines 21746 21749 +3
==========================================
+ Hits 13493 14234 +741
+ Misses 6849 6061 -788
- Partials 1404 1454 +50
Flags with carried forward coverage won't be shown. Click here to find out more.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am ok with the approach, but also wonder how if we build a separate ID allocator, like idAllocator in Egress (and could NetworkPolicy, Egress, group share an ID allocator implementation?). @tnqn
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
@hongliangl when this is merged, please cherry-pick this patch (https://github.com/antrea-io/antrea/blob/main/docs/contributors/cherry-picks.md) to any impacted release branch starting from 0.13.
I think later we should probably have single group ID allocator which allocates ID and tracks used IDs only and let consumers to maintain their own resource and ID mapping as the group is likely to be used for other purposes (like multicast group) only, we need to ensure the ID is globally unique. It's a good idea to share the core logic of IP allocation among the current allocators. I will consider refactoring them in the future. @jianjuns |
@hongliangl Do the current CI tests cover this scenario? |
/test-all |
@hongliangl DCO verification failed |
1da2453
to
2b9dc33
Compare
Fixed, thanks. |
@tnqn In theory, current CI tests don't cover this scenario yet. I found this issue by enabling dual stack AntreaProxy on testbed. |
/test-all @hongliangl can you remove the ending period from the commit message? maybe the title could be shorter to make it look neat in git tools: "Fix ovs group id conflict when dual stack is enabled" |
Can running upstream conformance test in dual-stack cluster with AntreaProxy enabled catch it? |
When dual stack is enabled, there will be IPv4 and IPv6 AntreaProxy. The IPv4 AntreaProxy and IPv6 AntreaProxy don't share the same GroupCounter. When a IPv6 Service is created by IPv6 AntreaProxy, the GroupID generated may be duplicated with a GroupID used by IPv4 Service. GroupCounter of IPv6 AntreaProxy can start with 0x10000000 to avoid above issue. Signed-off-by: Hongliang Liu <[email protected]>
2b9dc33
to
200258a
Compare
/test-all |
/skip-e2e e2e succeeded: https://jenkins.antrea-ci.rocks/job/antrea-e2e-for-pull-request/2776/. The latest update only changed commit message. |
When dual stack is enabled, there will be IPv4 and IPv6 AntreaProxy. The IPv4
AntreaProxy and IPv6 AntreaProxy don't share the same GroupCounter. When a
IPv6 Service is created by IPv6 AntreaProxy, the GroupID generated may be
duplicated with a GroupID used by IPv4 Service. GroupCounter of IPv6 AntreaProxy
can start with 0x10000000 to avoid above issue.
Signed-off-by: Hongliang Liu [email protected]