Skip to content

Service become unreachable after loadBalancerIP change with MetalLB in L2 mode #471

@zigmund

Description

@zigmund

Hi there,

Checked few times and here the steps to reproduce:

  1. Launch metallb with L2 mode configured.
  2. Create LoadBalancer service with or without loadBalancerIP.
  3. Service is reachable via IP metallb assinged to service.
  4. Manually set another different loadBalancerIP from same pool.
  5. Metallb writes to logs and service events that IP chanched and he is announcing new IP, but is not reachable anymore via new or old IP.

Here is example, service worked well on IP 10.9.244.6 and then I changed loadBalancerIP to 10.9.244.7.
Service events:

  Normal  nodeAssigned    4s (x4 over 4m)       metallb-speaker     announcing from node "hw-kube-n5.***"
  Normal  IPAllocated     4s                    metallb-controller  Assigned IP "10.9.244.7"
  Normal  LoadbalancerIP  4s                    service-controller  10.9.244.6 -> 10.9.244.7

Controller log:

{"caller":"main.go:49","event":"startUpdate","msg":"start of service update","service":"common-testing/os-redis-frontend-dc1-common","ts":"2019-08-27T04:41:28.880651029Z"}
{"caller":"service.go:77","event":"clearAssignment","msg":"user requested a different IP than the one currently assigned","reason":"differentIPRequested","service":"common-testing/os-redis-frontend-dc1-common","ts":"2019-08-27T04:41:28.880722368Z"}
{"caller":"service.go:98","event":"ipAllocated","ip":"10.9.244.7","msg":"IP address assigned by controller","service":"common-testing/os-redis-frontend-dc1-common","ts":"2019-08-27T04:41:28.880757651Z"}
{"caller":"main.go:96","event":"serviceUpdated","msg":"updated service object","service":"common-testing/os-redis-frontend-dc1-common","ts":"2019-08-27T04:41:28.897212655Z"}
{"caller":"main.go:98","event":"endUpdate","msg":"end of service update","service":"common-testing/os-redis-frontend-dc1-common","ts":"2019-08-27T04:41:28.897234751Z"}

Speaker log:

{"caller":"main.go:176","event":"startUpdate","msg":"start of service update","service":"common-testing/os-redis-frontend-dc1-common","ts":"2019-08-27T04:41:28.896635956Z"}
{"caller":"main.go:246","event":"serviceAnnounced","ip":"10.9.244.7","msg":"service has IP, announcing","pool":"alahd-10-9-244","protocol":"layer2","service":"common-testing/os-redis-frontend-dc1-common","ts":"2019-08-27T04:41:28.896745401Z"}
{"caller":"main.go:249","event":"endUpdate","msg":"end of service update","service":"common-testing/os-redis-frontend-dc1-common","ts":"2019-08-27T04:41:28.896834263Z"}

There are few ways to recover service access:

  • Recreate service (delete/create);
  • Change service type, for example, to NodePort and back;
  • Restart speaker POD (delete);

MetalLb version:

{"branch":"HEAD","caller":"main.go:72","commit":"v0.8.1","msg":"MetalLB speaker starting version 0.8.1 (commit v0.8.1, branch HEAD)","ts":"2019-08-27T04:37:31.972293077Z","version":"0.8.1"}

Kubernetes version:

Server Version: version.Info{Major:"1", Minor:"12", GitVersion:"v1.12.8", GitCommit:"a89f8c11a5f4f132503edbc4918c98518fd504e3", GitTreeState:"clean", BuildDate:"2019-04-23T04:41:47Z", GoVersion:"go1.10.8", Compiler:"gc", Platform:"linux/amd64"}

kube-proxy in iptables mode.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions