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

BGP route not withdrawn for svc with externalTrafficPolicy=Cluster and empty endpoint list #312

Closed
sfudeus opened this issue Sep 13, 2018 · 1 comment · Fixed by #314
Closed

Comments

@sfudeus
Copy link
Contributor

sfudeus commented Sep 13, 2018

Is this a bug report or a feature request?:
bug report

What happened:
A service of type loadBalancer, announced via BGP, lost all its pod because their health checks failed. The endpoint list was empty because of that, but metallb kept announcing the IP address.
For externalTrafficPolicy=Local, the announcement was withdrawn.

What you expected to happen:
With no healthy endpoints, the announcement should be withdrawn. For us, this is required in the context of a failover to another datacenter where the service is still healthy.

How to reproduce it (as minimally and precisely as possible):
Single-Pod deployment (e.g. nginx) with a service of type LoadBalancer and externalTrafficPolicy=Cluster
When scaling the deployment down to 0, the announcement stays up, but shouldn't.

Anything else we need to know?:
As mentioned the withdrawal of the announcement when the cluster does not contain a healthy endpoint anymore is essential for a redundancy failover to another datacenter.

Environment:

  • MetalLB version: 0.6.2 and 0.7.3
  • Kubernetes version: 1.11.2
  • BGP router type/version: Cisco 9k
  • OS (e.g. from /etc/os-release): ContainerLinux 1855.4.0
  • Kernel (e.g. uname -a): 4.14.67-coreos
@danderson
Copy link
Contributor

This is kinda working as designed, because I didn't expect this use case. Your fix sounds great though.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants