Skip to content

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

@sfudeus

Description

@sfudeus

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions