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

Allocated ip doesn't change after metallb.universe.tf/address-pool change. #448

Closed
SergeyMuha opened this issue Jul 10, 2019 · 5 comments

Comments

@SergeyMuha
Copy link

commented Jul 10, 2019

 - The bug itself, as detailed as you can.

I have two zones z1 and z2 with different subnets, and created two address pool
apiVersion: v1
kind: ConfigMap
metadata:
name: metallb
labels:
heritage: "Helm"
release: "metallb"
chart: metallb-1.0.0
app: metallb
data:
config: |
address-pools:
- addresses:
- 192.168.1.240.192.168.1.250
name: default
protocol: layer2
- addresses:
- 192.168.1.70-192.168.1.75
name: zone2
protocol: layer2

When node from z1 die pod can be rescheduled in z2 node with different network.
I have changed with

$kubectl annotate services srv-name metallb.universe.tf/address-pool=zone2

but service still has address from first pool.
As I can see from logs on controller and speaker, this change doesn't trigger anything.

I am expecting that after metallb.universe.tf/address-pool change controller should allocate address from another pool.

 - Version of MetalLB
repository: metallb/controller
tag: v0.7.3
repository: metallb/speaker
tag: v0.7.3

 - Version of Kubernetes

kubectl version
Client Version: version.Info{Major:"1", Minor:"14", GitVersion:"v1.14.0", GitCommit:"641856db18352033a0d96dbc99153fa3b27298e5", GitTreeState:"clean", BuildDate:"2019-03-25T15:53:57Z", GoVersion:"go1.12.1", Compiler:"gc", Platform:"linux/amd64"}
Server Version: version.Info{Major:"1", Minor:"14", GitVersion:"v1.14.1", GitCommit:"b7394102d6ef778017f2ca4046abbaa23b88c290", GitTreeState:"clean", BuildDate:"2019-04-08T17:02:58Z", GoVersion:"go1.12.1", Compiler:"gc", Platform:"linux/amd64"}

@danderson danderson added the bug label Jul 10, 2019

@danderson

This comment has been minimized.

Copy link
Owner

commented Jul 10, 2019

Yup, you're right. The converging logic doesn't take into account the address pool, so it doesn't notice that it changed. That's a bug.

@danderson

This comment has been minimized.

Copy link
Owner

commented Jul 10, 2019

Fixing it is a tiny bit complicated because I have to change the allocator APIs, but I'll see about getting it done today.

@SergeyMuha

This comment has been minimized.

Copy link
Author

commented Jul 10, 2019

Thanks

@danderson

This comment has been minimized.

Copy link
Owner

commented Jul 10, 2019

oh, workaround in the meantime: you can manually set loadBalancerIP on the service to an IP of the zone2 pool. MetalLB will see that and change the allocation.

@SergeyMuha

This comment has been minimized.

Copy link
Author

commented Jul 10, 2019

I tried $kubectl edit svc service-name but when I saved :wq! changes , at next time when I opened service, it still had ip from first pool... Revision has changed.

@danderson danderson closed this in 74286ac Jul 10, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.