-
Notifications
You must be signed in to change notification settings - Fork 457
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
[BUG] IP address leak if adding EIP fails #4922
Comments
Hey @cruickshankpg, I'm here to assist you with this issue. Let's work together to get this sorted out. The issue you're encountering seems to be related to the IP allocation process in kube-ovn when an EIP fails to be added to a non-existent NAT gateway. The IP is allocated but not properly deallocated when the EIP is deleted, leading to a leak in the IPAM system. In kube-ovn, the function Restarting the kube-ovn-controller appears to resolve the leak, likely because it triggers a reconciliation process that corrects the IPAM state. To address this issue more permanently, the error handling in the EIP creation process should include logic to release the allocated IP if the EIP cannot be successfully created. To resolve this, you might consider implementing or suggesting a change in the kube-ovn codebase to ensure that IPs are deallocated when an EIP creation fails. This could involve adding cleanup logic in the error handling paths of the To continue talking to Dosu, mention @dosu. Help Dosu learn! Give it feedback: Great Response | Irrelevant Answer | Incorrect Sources | Too Verbose | Hallucination | Other |
I think we should just call |
@cruickshankpg Thanks for your info, how about |
@cruickshankpg release-1.12 already fixed this, please try the latest. thanks! |
Kube-OVN Version
v1.12.22
Kubernetes Version
v1.28.6
Operation-system/Kernel Version
"Ubuntu 22.04.5 LTS" 6.8.0-47-generic
Description
If an EIP fails to be added to a NAT gateway it allocates an IP. If the EIP is deleted before the NAT gateway comes up then the IP address allocation is leaked in IPAM. Restarting the kube-ovn-controller leader removes the leak
The IP address is added to the external subnet's status'
v4usingIPrange
and removed from the thev4availableIPrange
butv4usingIPs
is not updated.Steps To Reproduce
Create an eip
Wait a moment for it to get programmed
Delete the eip
Inspect the subnet status
Current Behavior
EIP IP allocation leaked
Expected Behavior
EIP IP allocation not leaked
The text was updated successfully, but these errors were encountered: