Files
descheduler/pkg/descheduler
Simone Tiraboschi a7ac072c7d evictions: fix assumePod silently dropping success metric on informer race
When KubeVirt sets EvictionInProgressAnnotationKey before returning
TooManyRequests, the informer's UpdateFunc can call addPod
(evictionAssumed=false) before evictPod's assumePod call arrives.
assumePod found the entry already present and returned early, leaving
evictionAssumed=false. DeleteFunc then skipped the "success" metric.

Fix: if the existing entry has evictionAssumed=false (added by addPod),
upgrade it in place without double-counting the pod in the counters.

Adds TestEvictionInBackgroundMetrics_InformerRace to reproduce the race
deterministically.

Signed-off-by: Simone Tiraboschi <stirabos@redhat.com>
2026-05-14 17:23:18 +02:00
..
2024-08-09 09:49:59 +02:00
2022-11-07 09:11:27 +03:00