Detect IPConflicting and gatewayReachable in ipam without coordinator… #4587
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 #
Special notes for your reviewer:
作为 #4474 的后续修复:
确保 IP 冲突检测先于网关检测,这防止当 IP 冲突检测失败且网关检测发送 ARP 探测报时意外更新了错误的 ARP 缓存表,导致通信失败。
移动 IP 冲突检测和网关检测的逻辑到 IPAM 中完成,在之前是由 Coordinator 完成。之前检测到 IP 冲突的时候,冲突的 IP 已经配置到了网卡上,可能会导致 IP 偶现不可通信的情况。
在 IPAM 中完成 IP 冲突检测和网关检测,这可能会增加 IPAM 调用的时间,在同时检测 IPv4 和 IPv6 的情况下,大概增加 1 s,具体时间视网络而定。特别对于 IPv6,开启 Duplicate Address Detection(DAD)的情况下,内核会检查本地链路地址是否冲突,这可能会花费一段时间。
As a follow-up fix to #4474:
Ensure that IP conflict detection precedes gateway detection. This prevents the ARP cache table from being incorrectly updated when IP conflict detection fails and gateway detection sends ARP probe packets, which could lead to communication failures.
Move the logic for IP conflict detection and gateway detection into IPAM, which was previously handled by the Coordinator. Previously, when an IP conflict was detected, the conflicting IP was already configured on the network interface card, potentially causing occasional IP communication failures.
Performing IP conflict detection and gateway detection within IPAM may increase the time for IPAM calls. When detecting both IPv4 and IPv6, the time may increase by approximately 1 second, depending on the network. Particularly for IPv6, when Duplicate Address Detection (DAD) is enabled, the kernel will check for conflicts with local link addresses, which may take some time.