Assigned Pod add/update events don't requeue Pods without PodAffinity #122626
Labels
kind/bug
Categorizes issue or PR as related to a bug.
needs-triage
Indicates an issue or PR lacks a `triage/foo` label and requires one.
sig/scheduling
Categorizes an issue or PR as relevant to SIG Scheduling.
What happened?
/sig scheduling
/kind bug
kubernetes/pkg/scheduler/internal/queue/scheduling_queue.go
Line 1044 in b529e6f
kubernetes/pkg/scheduler/internal/queue/scheduling_queue.go
Line 1069 in b529e6f
When assigned Pods are created/updated, cluster events (Pod/Add or Pod/Update) should be delivered for all plugins that subscribe those events. But, actually
getUnschedulablePodsWithMatchingAffinityTerm
pre-filters Pods to receive those events based on Pods' affinity andpod.Status.Resize
. - meaning only PodAffinity/NodeResourceFit receive them actually.The problem here is similar to #110175 - in in-tree plugins, PodAffinity, PodTopologySpread and NodeResourceFit subscribe Pod add and/or update events. And, Pods rejected by PodTopologySpread will never be requeued to activeQ by Pod-related events. The same happens for custom plugins registering pod add and/or update events.
What did you expect to happen?
All Pods will get chances to get back to activeQ by Pod-related events.
How can we reproduce it (as minimally and precisely as possible)?
Run ↓ in https://github.com/sanposhiho/kubernetes/tree/pod-bug-repro.
Anything else we need to know?
No response
Kubernetes version
master
Cloud provider
OS version
Install tools
Container runtime (CRI) and version (if applicable)
Related plugins (CNI, CSI, ...) and versions (if applicable)
The text was updated successfully, but these errors were encountered: