[scheduler] Support preemption of pods using ReadWriteOncePod PVCs - #114051
Conversation
|
Please note that we're already in Test Freeze for the Fast forwards are scheduled to happen every 6 hours, whereas the most recent run was: Mon Nov 21 15:27:42 UTC 2022. |
|
Thinking out loud -- building the We may be able to do better than this by repurposing the |
c431e7b to
9d97867
Compare
alculquicondor
left a comment
There was a problem hiding this comment.
I didn't review tests yet.
9d97867 to
31a68ac
Compare
|
I restructured the PR to go with an approach like #114051 (comment). Please see the commit descriptions for each one for more context. At a high-level, I've changed the caches to store references to the specific pods using each PVC. In |
31a68ac to
78ca250
Compare
|
/milestone v1.27 |
|
@chrishenzie: You must be a member of the kubernetes/milestone-maintainers GitHub team to set the milestone. If you believe you should be able to issue the /milestone command, please contact your Milestone Maintainers Team and have them propose you as an additional delegate for this responsibility. DetailsIn response to this:
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. |
cf95111 to
bac3076
Compare
|
This doesn't appear to be working (preempting lower priority pods) in a multi-node environment, but does for single-node. Looking into this. |
4b58409 to
1c80d58
Compare
a4a0caa to
5ff76a0
Compare
There was a problem hiding this comment.
Looks like this is ready to merge now, anything left? @alculquicondor
5ff76a0 to
167da36
Compare
PVCs using the ReadWriteOncePod access mode can only be referenced by a single pod. When a pod is scheduled that uses a ReadWriteOncePod PVC, return "Unschedulable" if the PVC is already in-use in the cluster. To support preemption, the "VolumeRestrictions" scheduler plugin computes cycle state during the PreFilter phase. This cycle state contains the number of references to the ReadWriteOncePod PVCs used by the pod-to-be-scheduled. During scheduler simulation (AddPod and RemovePod), we add and remove reference counts from the cycle state if they use any of these ReadWriteOncePod PVCs. In the Filter phase, the scheduler checks if there are any PVC reference conflicts, and returns "Unschedulable" if there is a conflict. This is a required feature for the ReadWriteOncePod beta. See for more context: https://github.com/kubernetes/enhancements/tree/master/keps/sig-storage/2485-read-write-once-pod-pv-access-mode#beta
167da36 to
dbc7d8d
Compare
| t.Errorf("Unexpected PreFilter status (-want, +got): %s", diff) | ||
| } | ||
| // If PreFilter fails, then Filter will not run. | ||
| if test.preFilterWantStatus.IsSuccess() { |
alculquicondor
left a comment
There was a problem hiding this comment.
/approve
/hold cancel
/lgtm
|
LGTM label has been added. DetailsGit tree hash: f308a56055752323b5ae6ae2fe129430c4da8eaa |
|
/assign @aojea |
|
PRR approved, this is ready for merge. See #114494 for e2e test changes and feature gate bump to beta. |
|
/lgtm |
/approve |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: alculquicondor, aojea, chrishenzie 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 |
[scheduler] Support preemption of pods using ReadWriteOncePod PVCs
What type of PR is this?
/kind feature
What this PR does / why we need it:
Adds support for preemption of pods using
ReadWriteOncePodPVCs. This is a required feature for beta graduation.Which issue(s) this PR fixes:
Fixes #103132
Does this PR introduce a user-facing change?
Additional documentation e.g., KEPs (Kubernetes Enhancement Proposals), usage docs, etc.:
Testing
This feature can be tested the following ways:
/sig storage
/sig scheduling
/cc @msau42
/cc @jsafrane
/cc @alculquicondor