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
Existing services with more than two external IPs prevent MetalLB from completing setup #1431
Comments
I am having a similar issue but, I am not trying to use multiple external IPs, but something keeps assigning the host ips as well as the specified load balancer port. I'm at a loss as to what is going on as I can hit those host addresses and get to my resources but that defeats the purpose of a load balancer. |
This issue has been automatically marked as stale because it has been open 30 days
|
Has this bug been fixed? |
My issue ended up being during a k3s upgrade the config was reset and the built in lb was also running. After disabling that and cleaning up the environment by deleting both metallb and servicelb then reinstalling metallb I had a working environment again. |
I think that an update should not break anything and one of Kubernetes' core features is to automatically create the configured state. MetalLB cannot handle all transitions, especially when another LB was there before. My K3S upgrades are automated and I do not want to worry about fixing MetalLB every time this happens. |
I have the same issue. In my K3s Installation I'm using the buildin traefik and lb. But my system is still showing for the traefik and grafana svc the old Configuration.
I also tried to delete the grafana svc, but the delete operation is just hanging. Here the ConfigMap
and the error in the metallb controller log is:
Any tipps how I can redo the svc configs for traefik and grafana with the correct configuration. |
I have a similar setup:
I installed MetalLB version
My services looks like this:
Unfortunately the IP doesn't get assigned, instead my node IPs
Is this related to k3s or is this a bug? |
@net47 I had (I inclined to say "exactly") the same situation. Also with the same error message. The reason is that MetalLB inspects the existing configuration, finds more than one IP address and tries to interpret the second address as IPv6, which, of course, fails. For the initial cluster your configuration looks fine. MetalLB needs to work with this "cold start" case where it is just being set up and there is a configuration that does not fit the MetalLB scheme. |
@penguineer thanks for clarification! Applies this to Metallb in general or are there differences/chances between L2 and BGP? |
This I don't know. I have an L2 setup only. |
I'm running into this exact same issue with an L2 setup {"caller":"service.go:74","event":"clearAssignment","level":"error","msg":"Failed to retrieve lbIPs family","reason":"nolbIPsIPFamily","ts":"2022-12-28T20:58:14Z"} k3s: v1.24.8+k3s1 I tried re-imaging the machine a few times, installing k3s & metallb from scratch. I can reproduce this issue very consistently. I have been able to install pihole ( https://github.com/MoJo2600/pihole-kubernetes ) inside k3s, but exposing some of the services is a no go because of metallb, metalllb eventually tries to assign the IPs of the k3s worker nodes (10.0.0.4 & 10.0.0.5 )to the service even though that is not what i'm asking it it do, it's supposed to get 10.0.0.15
|
@auxworker Are you, by chance, missing the address pool annotation? I only see I did not observe that MetalLB would assign ClusterIPs, only that it could not change the settings when ClusterIPs were already assigned. |
the pihole chart assumes that metallb is used, I added the allow-shared-ip annotation and it didnt make any difference
|
@auxworker I assume you did defined |
here is my metallb config:
I'm able to assign IPs to another service without any issue:
|
here are some logs from metallb controller
|
Sorry for the delay, I filed #1778 based on the op's issue. |
@fedepaol Thank you very much for taking care of this issue! |
I have faced the same issues at k3s, and the solution for me was to update the service config.
|
Following initial situation:
I decided to add MetalLB as load balancer, mostly to have a fixed IP for firewall and DNS handling. Setup via Helm chart went well so far, but I got this weird error message:
reason: "nolbIPsIPFamily"
message: "Failed to retrieve lbIPs family"
Searching did not help much but turn up this part of code:
metallb/controller/service.go
Line 74 in 889a4bd
After reading some more code I ended up here:
metallb/internal/ipfamily/ipfamily.go
Line 27 in b7a8f7b
My understanding: MetalLB tries to determine IPv4/Ipv6/Dual Stack behavior based on the Service's IP addresses. In this regard, the service is expected to have either one IPv4 or one IPv6 or an IPv4 and IPv6 address.
My service, at this point, had three IPv4 addresses, which has been discarded as invalid in a Dual Stack context.
Unfortunately, because of this, MetalLB also did not go along and assigned the new address to my Ingress, leaving it with the three addresses that would let MetalLB run into the same issue over and over.
After two hours of code reading and thinking that I am too stupid to set up the lb based on its documentation, I decided to reinstall the nginx ingress controller → this solved my problem and it now got the correct IP address.
So, what happened: MetalLB stumbled over existing services with external IPs not matching its expectations
What I expected: MetalLB would re-configure these services
To solve this issue I needed to delete these services and deploy them again.
(Luckily this wasn't too hard with Helm, but it means that MetalLB cannot be introduced into a larger existing setup.)
I am not sure how well the problem can be solved, but I'm hoping that, even if it cannot or will not be fixed, with this issue thre is another point to end an search other than the line of code that generates this error.
Thank you and keep up the good work!
The text was updated successfully, but these errors were encountered: