-
Notifications
You must be signed in to change notification settings - Fork 946
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
metallb does not deallocate a Service's IP on Service type change to non-LB #190
Comments
Thanks for the report! I see where the bug is in the code, I'll cut 0.4.4 with a fix shortly. I'm surprised this can happen, because when I was developing MetalLB on k8s 1.8, I think I was unable to change the type of a Service after creation... So the codepath just assumes that if something is not a LoadBalancer, then it never was a LoadBalancer and we don't need to run the deletion logic. Oops! |
And out of pure brilliance, I cut 0.4.4 before actually testing my change, and wouldn't you know it, it's broken! Fixing (and testing before cutting the release this time...), 0.4.5 will have the right stuff. |
Turns out, you _can_ convert a service from type LoadBalancer to something else, whereas I thought that the type was immutable after creation. Oops!
Turns out, you _can_ convert a service from type LoadBalancer to something else, whereas I thought that the type was immutable after creation. Oops! (cherry picked from commit 886a19c)
0.4.5 released, with a fix for this. Thank you again for the clear bug report! |
Thank you for the quick fix! |
Openshift CI: override the kuberbac proxy image too
Is this a bug report or a feature request?:
Bug report.
What happened:
Changing the type of a Service with a metallb-assigned IP from
LoadBalancer
toNodePort
does not appear to release the IP allocation to revoke access from outside the cluster. Instead, the Service remains reachable on the metallb-allocated IP address on the Service'sport
.What you expected to happen:
I expected the IP address to be returned to the pool; reachability of the Service to be lost; and the
status
field of the Service to be updated to remove the ingress IP address.How to reproduce it (as minimally and precisely as possible):
Setup:
metal v0.4.3 running a K8S 1.8.6 cluster. Create a NodePort service. Edit the
type
to beLoadBalancer
. metallb should assign an IP. Test connectivity and check thestatus
field for the assigned IP.After that has been successful, edit the Service and change
type
back toNodePort
. The allocation will not appear to change, and in my case I was still able to connect to the service on its definedport
using the IP address allocated by metallb.Anything else we need to know?:
No.
Environment:
uname -a
): 4.14.12-1.el7.elrepo.x86_64The text was updated successfully, but these errors were encountered: