bgp: withdraw route when svc has no endpoints#40717
Conversation
e028b82 to
20c7c7a
Compare
|
/test |
|
@oblazek I think you will also need to update tests in |
|
thanks :), will take a look |
|
/test |
d18da70 to
de09a1e
Compare
|
/test |
4e146fd to
b214001
Compare
|
/test |
|
I seem to have broken |
I guess you will need to set cilium/pkg/bgpv1/test/fixtures.go Lines 196 to 257 in 88a1466 BTW, I should have said it earlier, but not sure if adding support for this to BGPv1 adds much value as it is already deprecated, probably doing this just for BGPv2 would suffice. But as you have already done all that work, lets do that, at least it will be in sync until we remove BGPv1. |
b214001 to
560ba17
Compare
|
/test |
560ba17 to
b67a0f4
Compare
|
/test |
|
/ci-verifier |
|
ci-verifier fail is not relevant, failing on: |
a6f99d3 to
f1aa910
Compare
f1aa910 to
3ce87b3
Compare
|
/test |
Signed-off-by: Ondrej Blazek <[email protected]>
Previously it was not possible to access services with 0 endpoints via socketLB and all packets were dropped with EHOSTUNREACH. With these changes it is possible to access services with 0 endpoints which can resolve in traffic being forwarded to another DC that can serve the same service (e.g. one with the same loadbalancerIP). Signed-off-by: Ondrej Blazek <[email protected]>
* update helm to include enableNoServiceEndpointsRoutable top level flag Signed-off-by: Ondrej Blazek <[email protected]>
Signed-off-by: Ondrej Blazek <[email protected]>
Signed-off-by: Ondrej Blazek <[email protected]>
Signed-off-by: Ondrej Blazek <[email protected]>
Signed-off-by: Ondrej Blazek <[email protected]>
* update lxc, nodeport logic around NO_SERVICE_BACKEND with new flag Signed-off-by: Ondrej Blazek <[email protected]>
Signed-off-by: Ondrej Blazek <[email protected]>
3ce87b3 to
896702f
Compare
|
/test |
|
|
|
/ci-integration |
|
/ci-ipsec-e2e |
|
/ci-e2e-upgrade |
Can you file an issue per the documented steps - https://docs.cilium.io/en/stable/contributing/testing/ci/#id1? |
|
@oblazek FYI -- merging is blocked as there were some unresolved comments. I resolved all of them to unblock merging, including this one as you mentioned addressing that as a follow-up - #40717 (comment). |
We have services with either externalTrafficPolicy or internalTrafficPolicy. We have discussed in the issue #40438 that according to the docs - externalTrafficPolicy applies to loadBalancerIP and/or externalIP and internalTrafficPolicy applies to clusterIP. There was also a comment that it doesn't matter where the client is located as e.g. loadBalancerIP can also be accessed from within the cluster (from e.g. pod) even though it's not that common.
When endpoints are taken into account the value of the externalTP or internalTP matters. In BGP world when either is set to
Local, the IP (LBIP, externalIP or clusterIP) is announced only if the node hosts an endpoint. When eTP/iTP is set to the other value -Cluster, then all nodes will announce the IP even though they do not host any relevant pod/endpoint.In the current codebase the code doesn't handle properly when service has zero endpoints and the eTP/iTP is set to
Cluster. In this case only forLocalthe node will stop announcing the IP and the packet targetted to the service will be dropped here. The problem is that this doesn't take eTP/iTP value into account and dropps the packet in both cases.We've agreed that for eTP/iTP ==
Clusterwe will not drop the packet, but will forward it to the stack. Aditionally our cilium bgp subsystem will stop announcing the IP so that setups that use e.g. anycast can benefit from this (and traffic will be forwarded to e.g. another DC which announces the same VIP).
This PR handles this scenario.
TLDR:
Fixes: #40438
cc @rastislavs