mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-11-01 14:22:17 +00:00
If no potential victims could be found, there is no need to evaluate the node again, since its state didn't change. It's safe to return and thus prevent scheduling from running the filter plugins again. NOTE: A node that is filtered out by filter plugins could pass the filter plugins if there is a change on that node, i.e. pods termination on that node. Previously, this could be either caught by the normal `schedule` or `preempt` (pods are terminated when the preemption logic tries to find the nodes and re-evaluate the filter plugins.) Actually, this shouldn't be taken care by the preemption, consider the routine of `schedule` is always running when the interval is "zero", let `schedule` take care of it will release `preempt` from something irrelevant with the `preemption`. Due to above reason, couple of testcase as well as the logic of checking the existence of victim pods are removed as it will never happen after the change. Signed-off-by: Dave Chen <dave.chen@arm.com>