New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Change EvaluatedNodes to count Nodes that reach Filter phase only #124735
Conversation
This issue is currently awaiting triage. If a SIG or subproject determines this is a relevant issue, they will accept it by applying the The Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
pkg/scheduler/schedule_one.go
Outdated
@@ -594,6 +594,7 @@ func (sched *Scheduler) findNodesThatPassFilters( | |||
for i := range feasibleNodes { | |||
feasibleNodes[i] = nodes[(sched.nextStartNodeIndex+i)%numAllNodes] | |||
} | |||
diagnosis.EvaluatedNodes = len(feasibleNodes) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is same as the old logic(before #119779), however it seems a little weird to me.
As we don't actually evaluate
some pods here(there is no filter plugin), I think evaluatedNodes equal to 0 in this scenario is more reasonable to me.
WDYT @alculquicondor @sanposhiho
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm fine with this
7030d89
to
1a82e82
Compare
@@ -2143,6 +2149,7 @@ func TestSchedulerSchedulePod(t *testing.T) { | |||
"3": framework.NewStatus(framework.Unschedulable, "injecting failure for pod test-filter").WithPlugin("FakeFilter"), | |||
}, | |||
UnschedulablePlugins: sets.New("FakeFilter", framework.ExtenderName), | |||
EvaluatedNodes: 3, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why are these values changing?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Because I added a new field to type Diagnosis struct
.
And in these test cases, we use reflect.deepequal
to compare two fitError, so it will compare the new field EvaluatedNodes
too.
It is set to 0 default, which is inconsistent with the real situation.
pkg/scheduler/schedule_one.go
Outdated
@@ -594,6 +594,7 @@ func (sched *Scheduler) findNodesThatPassFilters( | |||
for i := range feasibleNodes { | |||
feasibleNodes[i] = nodes[(sched.nextStartNodeIndex+i)%numAllNodes] | |||
} | |||
diagnosis.EvaluatedNodes = len(feasibleNodes) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm fine with this
/lgtm |
LGTM label has been added. Git tree hash: b09d16286e866d79a2a22ee20b59e61e8bd2c6e7
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/lgtm
/approve
LGTM label has been added. Git tree hash: 4102c726233540ff450ba93e1031e48f8e93761f
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: AxeZhan, sanposhiho The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
What type of PR is this?
/kind feature
What this PR does / why we need it:
Currently, EvaluatedNodes contains the number of nodes that filtered out by PreFilterResult and Filter plugins.
In this pr, it's changed back to
only contains Nodes reach Filter plugins
, same as before #119779Which issue(s) this PR fixes:
Fixes #124705
Special notes for your reviewer:
Does this PR introduce a user-facing change?
Additional documentation e.g., KEPs (Kubernetes Enhancement Proposals), usage docs, etc.: