kubernetes: Pending should not be handled as Error in PreFilter

What happened?

https://github.com/kubernetes/kubernetes/blob/35f584187a6d1250191aa24b0dcf735350f57508/pkg/scheduler/framework/runtime/framework.go#L735-L750

Kube Scheduler will return framework.Error when any plugin return Pending in PreFilter

What did you expect to happen?

Kube Scheduler should return Pending if any plugin return Pending in PreFilter.

How can we reproduce it (as minimally and precisely as possible)?

Implement a scheduler plugin which return Pending in PreFilter.

Anything else we need to know?

No response

Kubernetes version

$ kubectl version
# paste output here

1.32

Cloud provider

OS version

# On Linux:
$ cat /etc/os-release
# paste output here
$ uname -a
# paste output here

# On Windows:
C:\> wmic os get Caption, Version, BuildNumber, OSArchitecture
# paste output here

Install tools

Container runtime (CRI) and version (if applicable)

Related plugins (CNI, CSI, …) and versions (if applicable)

About this issue

  • Original URL
  • State: closed
  • Created 2 years ago
  • Comments: 21 (8 by maintainers)

Most upvoted comments

make a small PR to enhance the comment of Pending to describe that it makes sense for only Permit to return Pending?

sure i’ll raise a new PR to enhance the comment.

However, the concern that Pending may not align with PreFilter, since Pending is meant for cases where scheduling has already succeeded, but external conditions delay binding.

Right. If you now agree that it doesn’t make sense that PreFilter returns Pending, can you close the opened PR and make a small PR to enhance the comment of Pending to describe that it makes sense for only Permit to return Pending?