Skip to content

pod_scheduling_durating_seconds includes the time a Pod fails PreEnqueue #117979

@alculquicondor

Description

@alculquicondor

What happened?

pod_scheduling_durating_seconds is recording the time that a Pod is gated.

We use the timestamp when the scheduler inserts the pod into the queue:

pInfo := p.newQueuedPodInfo(pod)

What did you expect to happen?

The period of time when a Pod fails PreEnque (like being gated) shouldn't be accounted in the pod_scheduling_duration_seconds.

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

Create a Pod with scheduling gates.
Wait some time before removing the gate.
Observe the pod_scheduling_duration_seconds metric

Anything else we need to know?

No response

Kubernetes version

Details
1.26+

Cloud provider

Details Any

OS version

Details
# 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

Details

Container runtime (CRI) and version (if applicable)

Details

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

Details

Metadata

Metadata

Assignees

Labels

help wantedDenotes an issue that needs help from a contributor. Must meet "help wanted" guidelines.kind/bugCategorizes issue or PR as related to a bug.sig/schedulingCategorizes an issue or PR as relevant to SIG Scheduling.triage/acceptedIndicates an issue or PR is ready to be actively worked on.

Type

No type
No fields configured for issues without a type.

Projects

Status
Done

Relationships

None yet

Development

No branches or pull requests

Issue actions