Skip to content
This repository has been archived by the owner on May 25, 2023. It is now read-only.

added priority based preemption to priority plugin #895

Conversation

mateuszlitwin
Copy link
Contributor

@mateuszlitwin mateuszlitwin commented Oct 23, 2019

What this PR does / why we need it:
Priority plugin now adds preemptable function which makes preemptee a victim if and only if job priority of the preemptee is strictly lower than job priority of the preemptor.

This is consistent with default behavior of the standard kubernetes scheduler: if a Pod cannot be scheduled, the scheduler tries to preempt (evict) lower priority Pods to make scheduling of the pending Pod possible (see https://kubernetes.io/docs/concepts/configuration/pod-priority-preemption/).

To disable this functionality use enablePreemptable: false in the priority plugin configuration.

Closes #894

Which issue(s) this PR fixes :
Fixes #894

Special notes for your reviewer:

Release note:

Priority plugin now adds preemptable function which makes preemptee a victim if and only if job priority of the preemptee is strictly lower than job priority of the preemptor. To disable this functionality use `enablePreemptable: false` in the `priority` plugin configuration.

Priority plugin now adds preemptable function which makes preemptee a victim iff job priority of the preemptee is strictly lower than job priority of the preemptor.

This is consistent with default behavior of the standard kubernetes scheduler: if a Pod cannot be scheduled, the scheduler tries to preempt (evict) lower priority Pods to make scheduling of the pending Pod possible (see https://kubernetes.io/docs/concepts/configuration/pod-priority-preemption/).

Closes kubernetes-retired#894
@k8s-ci-robot k8s-ci-robot added the cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. label Oct 23, 2019
@k8s-ci-robot
Copy link
Contributor

Hi @mateuszlitwin. Thanks for your PR.

I'm waiting for a kubernetes-sigs or kubernetes member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

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/test-infra repository.

@k8s-ci-robot k8s-ci-robot added needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. size/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels Oct 23, 2019
@mateuszlitwin
Copy link
Contributor Author

Adjusted log level from 3 to 4 inside all preemptable functions for consistency, to make build pass and to not spam too many logs.

@k8s-ci-robot k8s-ci-robot added size/M Denotes a PR that changes 30-99 lines, ignoring generated files. and removed size/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels Oct 23, 2019
@mateuszlitwin
Copy link
Contributor Author

/assign @k82cn

@k82cn
Copy link
Contributor

k82cn commented Oct 24, 2019

/ok-to-test

@k8s-ci-robot k8s-ci-robot added ok-to-test Indicates a non-member PR verified by an org member that is safe to test. and removed needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Oct 24, 2019
@k82cn
Copy link
Contributor

k82cn commented Oct 24, 2019

/lgtm
/approve

@k8s-ci-robot k8s-ci-robot added the lgtm Indicates that a PR is ready to be merged. label Oct 24, 2019
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: k82cn, mateuszlitwin

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 /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 24, 2019
@k8s-ci-robot k8s-ci-robot merged commit fc4f930 into kubernetes-retired:master Oct 24, 2019
@mateuszlitwin mateuszlitwin deleted the mlitwin-priority-based-preemption branch October 24, 2019 17:53
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
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. lgtm Indicates that a PR is ready to be merged. ok-to-test Indicates a non-member PR verified by an org member that is safe to test. 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.

Preempt tasks with lower priority
3 participants