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

LoadBalancer Service External-IP <pending> status #1586

Closed
KillMaster9 opened this issue Sep 5, 2022 · 7 comments · Fixed by #1645
Closed

LoadBalancer Service External-IP <pending> status #1586

KillMaster9 opened this issue Sep 5, 2022 · 7 comments · Fixed by #1645

Comments

@KillMaster9
Copy link

ConfigMap File:

apiVersion: v1
kind: ConfigMap
metadata:
namespace: metallb-system
name: config
data:
config: |
address-pools:
- name: my-ip-space
protocol: layer2
addresses:
- 192.168.1.240-192.168.1.250

the config.addresses only have 10 IPs.

  1. Create 10 Loadbalancer service(svc1 ~ svc10),All ip resources are used.
  2. when create the svc11 LoadBalancer service, because no ip,the LoadBalancer service external-ip is pedning status.
  3. delete the svc1 will release an ip address,but the svc11 still pending.

I think the svc in pending state should assign the ip address when there is an available ip.

@fedepaol
Copy link
Member

fedepaol commented Sep 5, 2022

Hi @KillMaster9 , what version of metallb are you using? Please be aware of #1473

@KillMaster9
Copy link
Author

Hi @KillMaster9 , what version of metallb are you using? Please be aware of #1473

0.12,thanks

@fedepaol
Copy link
Member

fedepaol commented Sep 9, 2022

Can you share the details of the service, and the logs of the controller with log level set to debug?
-loglevel=debug iirc

@KillMaster9
Copy link
Author

Can you share the details of the service, and the logs of the controller with log level set to debug? -loglevel=debug iirc
Read the source code and take a closer look at the relevant processing logic.
when delete service, will return k8s.SyncStateReprocessAll, forceSync.
if svcRo == nil { c.deleteBalancer(l, name) // There might be other LBs stuck waiting for an IP, so when // we delete a balancer we should reprocess all of them to // check for newly feasible balancers. return k8s.SyncStateReprocessAll }
When modifying the service type,eg, LoadBalancer ---> NodePort/ClusterIP. Does not trigger the forceSync
if svc.Spec.Type != "LoadBalancer" { level.Debug(l).Log("event", "clearAssignment", "reason", "notLoadBalancer", "msg", "not a LoadBalancer") c.clearServiceState(key, svc) // Early return, we explicitly do *not* want to reallocate // an IP. return true }

@KillMaster9
Copy link
Author

Can you share the details of the service, and the logs of the controller with log level set to debug? -loglevel=debug iirc

@fedepaol
Copy link
Member

Sorry @KillMaster9 , would you mind expanding your comment / scenario? Are you saying you changed the service type?

@KillMaster9
Copy link
Author

Sorry @KillMaster9 , would you mind expanding your comment / scenario? Are you saying you changed the service type?
Yes, Changed service type,LoadBalancer ---> NodePort

  1. Create 10 Loadbalancer service(svc1 ~ svc10),All ip resources are used.
  2. when create the svc11 LoadBalancer service, because no ip,the LoadBalancer service external-ip is pedning status.
  3. changed the svc1 type (Loadbalancer ---> NodePort) will release an ip address,but the svc11 still pending.

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 a pull request may close this issue.

2 participants