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

Fixed a bug that the lb service could not be recreated if deleted. (and add verbose log level option) #20

Closed
wants to merge 6 commits into from

Conversation

backguynn
Copy link
Collaborator

When deleting the k8s LoadBalancer service, there was a case where kube-loxilb continued to send the delete API to loxilb even though loxilb's rules were already deleted. In this case, the corresponding error occurs.

The reason this error occurs is due to the problem of duplication of lbEntry of kube-loxilb.

So I removed the duplication of lbEntry, and modified to check the http status code.

@TrekkieCoder
Copy link
Collaborator

TrekkieCoder commented Jul 24, 2023

When deleting the k8s LoadBalancer service, there was a case where kube-loxilb continued to send the delete API to loxilb even though loxilb's rules were already deleted. In this case, the corresponding error occurs.

The reason this error occurs is due to the problem of duplication of lbEntry of kube-loxilb.

So I removed the duplication of lbEntry, and modified to check the http status code.

The issue of not able to recreate same service after service deletion is due to a typo in the latest code changes :

diff --git a/pkg/ippool/ippool.go b/pkg/ippool/ippool.go
index 86efb15..5985eb8 100644
--- a/pkg/ippool/ippool.go
+++ b/pkg/ippool/ippool.go
@@ -84,7 +84,7 @@ func (i *IPPool) ReturnIPAddr(ip string, sIdent uint32, proto string) {
        }
 
        IP := net.ParseIP(ip)
-       if IP != nil || !i.NetCIDR.Contains(IP) {
+       if IP == nil || !i.NetCIDR.Contains(IP) {
                return
        }

I have checked in the fix. So, request you to make another pull-request for only log-level changes after merging this fix. This change is not necessary.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants