-
Notifications
You must be signed in to change notification settings - Fork 81
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
Ensure kernel sends GARPs to avoid communication failures #4649
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #4649 +/- ##
==========================================
- Coverage 75.28% 75.24% -0.05%
==========================================
Files 56 56
Lines 6765 6778 +13
==========================================
+ Hits 5093 5100 +7
- Misses 1462 1466 +4
- Partials 210 212 +2
Flags with carried forward coverage won't be shown. Click here to find out more.
|
2b88f4d
to
e92ce44
Compare
Signed-off-by: Cyclinder Kuo <[email protected]>
e92ce44
to
e128d86
Compare
weizhoublue
approved these changes
Feb 14, 2025
github-actions bot
pushed a commit
that referenced
this pull request
Feb 14, 2025
Signed-off-by: Cyclinder Kuo <[email protected]> Signed-off-by: robot <[email protected]>
github-actions bot
pushed a commit
that referenced
this pull request
Feb 14, 2025
Signed-off-by: Cyclinder Kuo <[email protected]> Signed-off-by: robot <[email protected]>
github-actions bot
pushed a commit
that referenced
this pull request
Feb 14, 2025
Signed-off-by: Cyclinder Kuo <[email protected]> Signed-off-by: robot <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
cherrypick-release-v0.8
Cherry-pick the PR to branch release-v0.8.
cherrypick-release-v0.9
cherrypick-release-v1.0
Cherry-pick the PR to branch release-v1.0.
release/bug
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Thanks for contributing!
Notice:
"release/none"
"release/bug"
"release/feature"
What issue(s) does this PR fix:
Fixes #4650
Special notes for your reviewer:
正常情况下,IPAM 分配 IP 给 CNI, CNI 将 IP 地址配置到网卡之后,最后设置状态为 UP。当网卡的链路地址改变或状态改变时,内核会发送免费 ARP,宣告其地址。
#4588 为了修复检测失败时因为错误的 ARP 缓存表导致通信失败,在 IPAM 执行冲突检测。这会提前将网卡 UP,执行完冲突检测之后,返回 IP 地址给 CNI,CNI 将地址配置到网卡,最 后UP 网卡的时候,网卡已经是 UP 的状态,所以这不会触发内核发送免费 ARP 通告其地址。这会导致当 Pod 以相同的 IP 重启后,与其通信过的其他主机不会主动更新 ARP 缓存表导致通信失败。
此 PR 通过在 IPAM 做完冲突检测之后,将网卡的状态设置为 Down,以便 CNI 可以在 UP 网卡时触发免费ARP。
Normally, IPAM assigns IP to the CNI, and the CNI configures the IP address to the NIC before finally setting the status to UP. the kernel sends a free ARP announcing the address of the NIC when its link address is changed or the status is changed.
#4588 To fix a detection failure when communication fails due to an incorrect ARP cache table, conflict detection is performed at IPAM. This will bring the card up early, and after conflict detection, it will return the IP address to the CNI, which will configure the address to the card, and when the card is finally brought up, it will already be up, so this will not trigger the kernel to send a free ARP announcing its address. This can lead to communication failures when the Pod reboots with the same IP and other hosts it has communicated with do not actively update the ARP cache table.
This PR is accomplished by setting the status of the NIC to Down after IPAM has done conflict detection so that the CNI can trigger the free ARP notification when the NIC is UP.