Skip to content

Default Scheduler's node_name Plugin Doesn't Filter Out Any Nodes #128458

Open
@scheduler-tester

Description

@scheduler-tester

What happened?

Hello,
We observed that the node_name scheduler plugin might not be functioning as expected.

In the current implementation, this plugin’s Filter function checks if a given node’s name matches the scheduling pod’s spec.nodeName. So this plugin is expected to filter out any node whose name does not match at the Filter stage,

However, according to the Kubernetes documentation and our tests, any pod with a non-empty spec.nodeName will bypass the default scheduler.

This leads to a case: whenever the node_name plugin is invoked (at the Filter stage), the pod’s spec.nodeName must be empty. Then the plugin won't filter out any nodes, making it not functioning.

We're a bit confused about this and want to clarify: is this the correct behavior of the node_name plugin, or are there scenarios that it would behave differently and meaningful? Thanks for your answer!

What did you expect to happen?

If our understanding is correct,
then we think this plugin should be removed, as it does not filter out any nodes.

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

  1. By creating a pod with a non-empty spec.nodeName, the scheduler will ignore this pod.
  2. Only when creating a pod with an empty spec.nodeName, the scheduler will schedule this pod.

Anything else we need to know?

/sig scheduling

Kubernetes version

1.31

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)

Metadata

Metadata

Assignees

No one assigned

    Labels

    lifecycle/rottenDenotes an issue or PR that has aged beyond stale and will be auto-closed.needs-kindIndicates a PR lacks a `kind/foo` label and requires one.needs-triageIndicates an issue or PR lacks a `triage/foo` label and requires one.sig/schedulingCategorizes an issue or PR as relevant to SIG Scheduling.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions