Skip to content

Conversation

squeed
Copy link
Contributor

@squeed squeed commented Aug 26, 2025

lbmaps.go had code to ignore any expected ErrKeyNotExist errors on deletion. However, this still caused the metric cilium_bpf_map_ops_total error counter to increment.

The BPF wrapper already exposes the SilentDelete() function, which correctly prevents the error metric from being incremented. Use that instead, and remove the special-casing of ErrKeyDoesNotExist in the loadbalancer code.

Fixes: #41255

Fixes a cosmetic bug where the cilium_bpf_map_ops_total error count was incorrectly being incremented for map cilium_lb_affinity_match.

lbmaps.go had code to ignore any expected ErrKeyNotExist errors on
deletion. However, this still caused the metric cilium_bpf_map_ops_total error
counter to increment.

The BPF wrapper already exposes the `SilentDelete()` function, which
correctly prevents the error metric from being incremented. Use that
instead, and remove the special-casing of ErrKeyDoesNotExist in the
loadbalancer code.

Fixes: cilium#41255

Signed-off-by: Casey Callendrello <cdc@isovalent.com>
@squeed squeed requested a review from a team as a code owner August 26, 2025 09:30
@squeed squeed requested a review from aspsk August 26, 2025 09:30
@squeed squeed added kind/bug This is a bug in the Cilium logic. release-note/bug This PR fixes an issue in a previous release of Cilium. needs-backport/1.18 This PR / issue needs backporting to the v1.18 branch labels Aug 26, 2025
@squeed
Copy link
Contributor Author

squeed commented Aug 26, 2025

/test

Copy link
Contributor

@aspsk aspsk left a comment

Choose a reason for hiding this comment

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

👍

@squeed squeed enabled auto-merge August 27, 2025 09:33
@julianwiedmann julianwiedmann added the area/loadbalancing Impacts load-balancing and Kubernetes service implementations label Sep 1, 2025
@squeed squeed added this pull request to the merge queue Sep 1, 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 Sep 1, 2025
Merged via the queue into cilium:main with commit d890e52 Sep 1, 2025
74 checks passed
@squeed squeed deleted the bpf-affinity-silent-delete branch September 1, 2025 04:59
@squeed squeed added the area/metrics Impacts statistics / metrics gathering, eg via Prometheus. label Sep 1, 2025
@viktor-kurchenko viktor-kurchenko mentioned this pull request Sep 2, 2025
18 tasks
@viktor-kurchenko viktor-kurchenko added backport-pending/1.18 The backport for Cilium 1.18.x for this PR is in progress. and removed needs-backport/1.18 This PR / issue needs backporting to the v1.18 branch labels Sep 2, 2025
@github-actions github-actions bot added backport-done/1.18 The backport for Cilium 1.18.x for this PR is done. and removed backport-pending/1.18 The backport for Cilium 1.18.x for this PR is in progress. labels Sep 9, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/loadbalancing Impacts load-balancing and Kubernetes service implementations area/metrics Impacts statistics / metrics gathering, eg via Prometheus. backport-done/1.18 The backport for Cilium 1.18.x for this PR is done. kind/bug This is a bug in the Cilium logic. 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.

1.18: cilium_lb_affinity_match map delete operation spuriously increments error counter
4 participants