Skip to content

Conversation

joamaki
Copy link
Contributor

@joamaki joamaki commented Aug 13, 2025

[ upstream commit a5819f1 ]

Cilium's topology-aware implementation did not correctly implement the following safe guards 1:

  1. If no fitting backend found for current zone us backends from all zones
  2. Use all backends if one or more endpoints did not have zone hints

It did correctly implement:
(1. insufficient endpoints (endpointslice controller responsibility)
(2. unbalanced allocation (endpointslice controller responsibility)
3. Use all backends if local node missing zone label

This is fixed by doing an additional iteration over the backends to check
4. and 5. before trying to apply the zone hints.

Fixes: e35c099 ("experimental: Implement support for topology-aware routing")
Fixes: #41022

Add missing safeguards to topology-aware routing: use all backends when no suitable one matching the zone hints are found or a backend exists without a zone hint.

[ upstream commit a5819f1 ]

Cilium's topology-aware implementation did not correctly implement
the following safe guards [1]:

4. If no fitting backend found for current zone us backends from all zones
5. Use all backends if one or more endpoints did not have zone hints

It did correctly implement:
(1. insufficient endpoints (endpointslice controller responsibility)
(2. unbalanced allocation (endpointslice controller responsibility)
3. Use all backends if local node missing zone label

This is fixed by doing an additional iteration over the backends to check
4. and 5. before trying to apply the zone hints.

[1]: https://kubernetes.io/docs/concepts/services-networking/topology-aware-routing/#enabling-topology-aware-routing.

Fixes: e35c099 ("experimental: Implement support for topology-aware routing")
Fixes: cilium#41022
Signed-off-by: Jussi Maki <jussi@isovalent.com>
@joamaki joamaki requested a review from a team as a code owner August 13, 2025 11:29
@joamaki joamaki added the release-note/bug This PR fixes an issue in a previous release of Cilium. label Aug 13, 2025
@maintainer-s-little-helper maintainer-s-little-helper bot added backport/1.18 This PR represents a backport for Cilium 1.18.x of a PR that was merged to main. kind/backports This PR provides functionality previously merged into master. labels Aug 13, 2025
@joamaki
Copy link
Contributor Author

joamaki commented Aug 13, 2025

/test

@joamaki joamaki mentioned this pull request Aug 13, 2025
10 tasks
@aanm aanm enabled auto-merge August 13, 2025 13:28
@aanm aanm added this pull request to the merge queue Aug 13, 2025
@maintainer-s-little-helper maintainer-s-little-helper bot added the ready-to-merge This PR has passed all tests and received consensus from code owners to merge. label Aug 13, 2025
Merged via the queue into cilium:v1.18 with commit 4a89f63 Aug 13, 2025
89 of 115 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport/1.18 This PR represents a backport for Cilium 1.18.x of a PR that was merged to main. kind/backports This PR provides functionality previously merged into master. ready-to-merge This PR has passed all tests and received consensus from code owners to merge. release-note/bug This PR fixes an issue in a previous release of Cilium.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants