-
Notifications
You must be signed in to change notification settings - Fork 42.1k
Promote resource limits priority function to beta #69437
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
Promote resource limits priority function to beta #69437
Conversation
|
/sig scheduling |
9468a1c to
00ba87a
Compare
bsalamat
left a comment
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 am fine with the promotion, I just wonder if you have tested this feature in real clusters enough.
5f07317 to
3df5963
Compare
test/e2e/scheduling/priorities.go
Outdated
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.
Limits is smaller than Requests?
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 was part of testing, I was doing, I forgot to revert it. Thanks.
test/e2e/scheduling/priorities.go
Outdated
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.
It makes more sense for the function to receive the new amount of memory as an argument.
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.
Sure, I have added it.
test/e2e/scheduling/priorities.go
Outdated
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 think you need to revert the node resources back to avoid surprises for future test cases.
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.
Yes, I missed it. I have updated the PR now.
test/e2e/scheduling/priorities.go
Outdated
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.
Any particular reason for deleting this?
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.
Thanks for catching, you are right, I was thinking I was changing the test I am introducing as part of this PR. I was not intending to touch this.
1289007 to
44ff6dc
Compare
test/e2e/scheduling/priorities.go
Outdated
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.
hm... , seems node's memory is smaller than pod's limit :) The middle one of node list maybe better.
Including other priority test, we should check length of nodeList; if there's only one node, our test can not catch "issues".
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.
Yes, I can change it to a middle node but tbh, none of the pull-verify-* jobs are testing these current e2e's, so actually this could have failed after the PR merged :(.
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.
so actually this could have failed after the PR merged :(.
I mean set nodeName to middle of nodeList.Items:)
As I think you're setting a smaller memory (10^4) than pod's limits (3 * 10^4), it's better to use a const, e.g. node's memory is twice of big pod.
|
/kind feature |
test/e2e/scheduling/priorities.go
Outdated
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.
nit: s/value/memory/
Also, please add a comment for the function and perhaps make it private (change to lower case).
test/e2e/scheduling/priorities.go
Outdated
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.
nit: This if statement is not needed. At this point it returns 'err' regardless.
test/e2e/scheduling/priorities.go
Outdated
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.
Shouldn't you read the original amount of memory at the beginning of the function, before you update it?
|
cc @kubernetes/api-approvers |
5b8906f to
58c7768
Compare
|
/retest |
bsalamat
left a comment
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.
just a minor comment. Otherwise, LGTM.
test/e2e/scheduling/priorities.go
Outdated
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.
Looks like this var is used only in one of the tests. Please move it inside the test func.
58c7768 to
922ea66
Compare
922ea66 to
ba71ae7
Compare
|
/retest |
bsalamat
left a comment
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
Thanks, @ravisantoshgudimetla!
|
/retest |
1 similar comment
|
/retest |
|
/approve |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: bsalamat, ravisantoshgudimetla The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
|
@ravisantoshgudimetla I see the newly added Scheduler Priorities test added fail in the test run - https://k8s-testgrid.appspot.com/sig-release-master-upgrade#gke-gci-new-gci-master-upgrade-cluster-new Can you please take a look? @jberkus @mortent as FYI. We need to open a test issue to track the test failure if it repros in the next run too. |
|
@AishSundar Sure, I will look into it. FWIW, the test is also failing on master(https://k8s-testgrid.appspot.com/sig-scheduling#gce-serial). |
|
/milestone v1.13 Ok lets open a new test issue for this. thanks @ravisantoshgudimetla |
|
@ravisantoshgudimetla Looks like the e2e test for this PR is flaky: https://k8s-testgrid.appspot.com/sig-release-master-blocking#gce-cos-master-serial Could you please take a look? |
What this PR does / why we need it:
We should promote resource limits priority function to beta as this feature is useful in scenarios where the nodes that satisfies limits of pods are given higher score.
/cc @aveshagarwal @bsalamat
Which issue(s) this PR fixes (optional, in
fixes #<issue number>(, fixes #<issue_number>, ...)format, will close the issue(s) when PR gets merged):Fixes #
Special notes for your reviewer:
Release note: