Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@julianwiedmann
Copy link
Member

@julianwiedmann julianwiedmann commented Apr 8, 2024

Discussing with @borkmann we realized that service LB for established connections no longer works, if the service loses the last of its active backends. This was broken by #22388, which introduced the svc->count check too early in the code path.

Fix service connection to terminating backend, when the service has no more backends available.

Continue to forward traffic for established connections, even when a
service loses its last active backends.

This needs a small adjustment in a BPF test that was relying on this
behaviour.

Fixes: 1835011 ("bpf: drop SVC traffic if no backend is available")
Signed-off-by: Julian Wiedmann <[email protected]>
Once a LB connection has been established, we expect to continue using
its CT entry to obtain the backend. Even if the backend is in terminating
state, and the service has lost all of its backends.

Keeping this separate from the fix, in case we can't easily backport.

Signed-off-by: Julian Wiedmann <[email protected]>
@julianwiedmann julianwiedmann added kind/bug This is a bug in the Cilium logic. area/datapath Impacts bpf/ or low-level forwarding details, including map management and monitor messages. release-note/bug This PR fixes an issue in a previous release of Cilium. area/loadbalancing Impacts load-balancing and Kubernetes service implementations needs-backport/1.14 labels Apr 8, 2024
Copy link
Member

@borkmann borkmann left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome, and thx for adding a unit test!

@julianwiedmann
Copy link
Member Author

/test

@julianwiedmann julianwiedmann marked this pull request as ready for review April 8, 2024 23:18
@julianwiedmann julianwiedmann requested a review from a team as a code owner April 8, 2024 23:18
@julianwiedmann julianwiedmann added this pull request to the merge queue Apr 8, 2024
Merged via the queue into cilium:main with commit 7ece278 Apr 8, 2024
@julianwiedmann julianwiedmann deleted the 1.16-bpf-lb-terminating-backend branch April 8, 2024 23:26
@julianwiedmann julianwiedmann added the backport/author The backport will be carried out by the author of the PR. label Apr 10, 2024
@julianwiedmann julianwiedmann added backport-pending/1.14 The backport for Cilium 1.14.x for this PR is in progress. backport-pending/1.15 The backport for Cilium 1.15.x for this PR is in progress. affects/v1.13 This issue affects v1.13 branch and removed needs-backport/1.14 labels Apr 19, 2024
@github-actions github-actions bot added backport-done/1.15 The backport for Cilium 1.15.x for this PR is done. and removed backport-pending/1.15 The backport for Cilium 1.15.x for this PR is in progress. labels May 7, 2024
@github-actions github-actions bot added backport-done/1.14 The backport for Cilium 1.14.x for this PR is done. and removed backport-pending/1.14 The backport for Cilium 1.14.x for this PR is in progress. labels Jun 21, 2024
@github-actions github-actions bot added backport-done/1.13 The backport for Cilium 1.13.x for this PR is done. and removed backport-pending/1.13 labels Jul 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

affects/v1.13 This issue affects v1.13 branch area/datapath Impacts bpf/ or low-level forwarding details, including map management and monitor messages. area/loadbalancing Impacts load-balancing and Kubernetes service implementations backport/author The backport will be carried out by the author of the PR. backport-done/1.13 The backport for Cilium 1.13.x for this PR is done. backport-done/1.14 The backport for Cilium 1.14.x for this PR is done. backport-done/1.15 The backport for Cilium 1.15.x for this PR is done. kind/bug This is a bug in the Cilium logic. release-note/bug This PR fixes an issue in a previous release of Cilium.

Projects

No open projects
Status: Backport pending to v1.14
Status: Released

Development

Successfully merging this pull request may close these issues.

2 participants