Skip to content

Conversation

@ravisantoshgudimetla
Copy link
Contributor

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:

Promote resource limits priority function to beta

@k8s-ci-robot k8s-ci-robot added release-note Denotes a PR that will be considered when it comes time to generate release notes. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. needs-kind Indicates a PR lacks a `kind/foo` label and requires one. needs-sig Indicates an issue or PR lacks a `sig/foo` label and requires one. labels Oct 4, 2018
@ravisantoshgudimetla
Copy link
Contributor Author

/sig scheduling

@k8s-ci-robot k8s-ci-robot added sig/scheduling Categorizes an issue or PR as relevant to SIG Scheduling. and removed needs-sig Indicates an issue or PR lacks a `sig/foo` label and requires one. labels Oct 4, 2018
@ravisantoshgudimetla ravisantoshgudimetla force-pushed the promote-resource-limits-priority-function branch from 9468a1c to 00ba87a Compare October 4, 2018 19:45
Copy link
Member

@bsalamat bsalamat left a 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.

@k8s-ci-robot k8s-ci-robot added size/M Denotes a PR that changes 30-99 lines, ignoring generated files. sig/testing Categorizes an issue or PR as relevant to SIG Testing. and removed size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. labels Oct 5, 2018
@ravisantoshgudimetla ravisantoshgudimetla force-pushed the promote-resource-limits-priority-function branch from 5f07317 to 3df5963 Compare October 5, 2018 18:47
Copy link
Member

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?

Copy link
Contributor Author

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.

Copy link
Member

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.

Copy link
Contributor Author

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.

Copy link
Member

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.

Copy link
Contributor Author

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.

Copy link
Member

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?

Copy link
Contributor Author

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.

@ravisantoshgudimetla ravisantoshgudimetla force-pushed the promote-resource-limits-priority-function branch 3 times, most recently from 1289007 to 44ff6dc Compare October 6, 2018 17:32
Copy link
Contributor

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".

Copy link
Contributor Author

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 :(.

Copy link
Contributor

@k82cn k82cn Oct 10, 2018

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.

@k82cn
Copy link
Contributor

k82cn commented Oct 7, 2018

/kind feature

@k8s-ci-robot k8s-ci-robot added kind/feature Categorizes issue or PR as related to a new feature. and removed needs-kind Indicates a PR lacks a `kind/foo` label and requires one. labels Oct 7, 2018
Copy link
Member

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).

Copy link
Member

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.

Copy link
Member

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?

@yastij
Copy link
Member

yastij commented Oct 9, 2018

cc @kubernetes/api-approvers

@ravisantoshgudimetla ravisantoshgudimetla force-pushed the promote-resource-limits-priority-function branch 3 times, most recently from 5b8906f to 58c7768 Compare October 15, 2018 00:32
@ravisantoshgudimetla
Copy link
Contributor Author

/retest

Copy link
Member

@bsalamat bsalamat left a 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.

Copy link
Member

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.

@ravisantoshgudimetla ravisantoshgudimetla force-pushed the promote-resource-limits-priority-function branch from 58c7768 to 922ea66 Compare October 16, 2018 16:57
@ravisantoshgudimetla ravisantoshgudimetla force-pushed the promote-resource-limits-priority-function branch from 922ea66 to ba71ae7 Compare October 16, 2018 16:59
@ravisantoshgudimetla
Copy link
Contributor Author

/retest

Copy link
Member

@bsalamat bsalamat left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/lgtm

Thanks, @ravisantoshgudimetla!

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Oct 16, 2018
@ravisantoshgudimetla
Copy link
Contributor Author

/retest

1 similar comment
@ravisantoshgudimetla
Copy link
Contributor Author

/retest

@bsalamat
Copy link
Member

/approve

@k8s-ci-robot
Copy link
Contributor

[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

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Oct 17, 2018
@k8s-ci-robot k8s-ci-robot merged commit 897b3a9 into kubernetes:master Oct 17, 2018
@AishSundar
Copy link
Contributor

@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.

@ravisantoshgudimetla
Copy link
Contributor Author

@AishSundar Sure, I will look into it. FWIW, the test is also failing on master(https://k8s-testgrid.appspot.com/sig-scheduling#gce-serial).

@AishSundar
Copy link
Contributor

/milestone v1.13

Ok lets open a new test issue for this. thanks @ravisantoshgudimetla

@bsalamat
Copy link
Member

@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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. kind/feature Categorizes issue or PR as related to a new feature. lgtm "Looks good to me", indicates that a PR is ready to be merged. release-note Denotes a PR that will be considered when it comes time to generate release notes. sig/scheduling Categorizes an issue or PR as relevant to SIG Scheduling. sig/testing Categorizes an issue or PR as relevant to SIG Testing. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants