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

ipam: fix duplicate allocation after cidr expansion #3455

Merged
merged 1 commit into from
Nov 24, 2023

Conversation

zhangzujian
Copy link
Member

@zhangzujian zhangzujian commented Nov 24, 2023

Pull Request

What type of this PR

Examples of user facing changes:

  • Features
  • Bug fixes
  • Docs
  • Tests

Which issue(s) this PR fixes

Fixes #(issue-number)

WHAT

🤖[deprecated] Generated by Copilot at be11183

Fix IPAM bug and improve subnet CIDR handling. The pull request prevents address conflicts in dual-stack subnets and avoids re-assigning addresses when the subnet.Spec.CIDRBlock changes.

🤖[deprecated] Generated by Copilot at be11183

No more conflicts in the IPAM
We fixed the bug that caused them
We purged the code that was a sham
We reclaimed the power of our subnet

HOW

🤖[deprecated] Generated by Copilot at be11183

  • Fix a bug in the calculation of the free and available IPv4 and IPv6 addresses in a subnet by considering the addresses that are already in use by existing pods (link, link)
  • Remove a redundant and potentially harmful block of code that tried to re-add the already assigned addresses to the IPAM when the subnet CIDR changed, and rely on the sync logic in the SyncIPAM function instead (link, link)
  • Ignore the no-op changes that resulted from a merge conflict or a formatting issue (link, link)

Signed-off-by: zhangzujian <zhangzujian.7@gmail.com>
@zhangzujian zhangzujian added bug Something isn't working need backport labels Nov 24, 2023
@zhangzujian zhangzujian merged commit f8435b3 into kubeovn:master Nov 24, 2023
60 checks passed
@zhangzujian zhangzujian deleted the fix-ipam branch November 24, 2023 09:14
zhangzujian added a commit to zhangzujian/kube-ovn that referenced this pull request Nov 24, 2023
Signed-off-by: zhangzujian <zhangzujian.7@gmail.com>
bobz965 pushed a commit that referenced this pull request Nov 25, 2023
Signed-off-by: zhangzujian <zhangzujian.7@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working need backport
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants