Skip to content
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

Fix preemption when requesting 0 of a resource at nominal quota #2520

Conversation

alculquicondor
Copy link
Contributor

What type of PR is this?

/kind bug

What this PR does / why we need it:

The existing check that prevents borrowing when preempting didn't take in consideration that a workload could explicitly request 0 for a resource in a ClusterQueue that is at or over nominal quota.

Which issue(s) this PR fixes:

Fixes #

Special notes for your reviewer:

Does this PR introduce a user-facing change?

Fix check that prevents preemptions when a workload requests 0 for a resource that is at nominal or over it.

@k8s-ci-robot k8s-ci-robot added kind/bug Categorizes issue or PR as related to a bug. release-note Denotes a PR that will be considered when it comes time to generate release notes. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. labels Jul 2, 2024
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: alculquicondor

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 requested a review from trasc July 2, 2024 20:22
@k8s-ci-robot k8s-ci-robot added approved Indicates a PR has been approved by an approver from all required OWNERS files. size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Jul 2, 2024
@alculquicondor
Copy link
Contributor Author

/assign @gabesaba

Copy link

netlify bot commented Jul 2, 2024

Deploy Preview for kubernetes-sigs-kueue canceled.

Name Link
🔨 Latest commit 30e7799
🔍 Latest deploy log https://app.netlify.com/sites/kubernetes-sigs-kueue/deploys/6684638ab2e465000844de65

@alculquicondor
Copy link
Contributor Author

/cherry-pick release-0.7

@k8s-infra-cherrypick-robot
Copy link
Contributor

@alculquicondor: once the present PR merges, I will cherry-pick it on top of release-0.7 in a new PR and assign it to you.

In response to this:

/cherry-pick release-0.7

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.

Change-Id: I586a26b7c753da26d4460e5d2e231cecff3e58d8
@mimowo
Copy link
Contributor

mimowo commented Jul 3, 2024

/test pull-kueue-test-e2e-main-1-30
/test pull-kueue-test-e2e-main-1-29
Failed due to infra overload: "There are no nodes that your pod can schedule to - check your requests, tolerations, and node selectors (skip schedule deleting pod: test-pods/8b64ef07-d84a-4adf-adfa-85586cdb88f8)"

@mbobrovskyi
Copy link
Contributor

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Jul 3, 2024
@k8s-ci-robot
Copy link
Contributor

LGTM label has been added.

Git tree hash: b917b52d377a76bd51341a0d7fcdd55e73c07a63

@k8s-ci-robot k8s-ci-robot merged commit 33b9efb into kubernetes-sigs:main Jul 3, 2024
16 checks passed
@k8s-ci-robot k8s-ci-robot added this to the v0.8 milestone Jul 3, 2024
@k8s-infra-cherrypick-robot
Copy link
Contributor

@alculquicondor: #2520 failed to apply on top of branch "release-0.7":

Applying: Fix preemption when requesting 0 of a resource at nominal quota
Using index info to reconstruct a base tree...
M	pkg/scheduler/preemption/preemption.go
Falling back to patching base and 3-way merge...
Auto-merging pkg/scheduler/preemption/preemption.go
CONFLICT (content): Merge conflict in pkg/scheduler/preemption/preemption.go
error: Failed to merge in the changes.
hint: Use 'git am --show-current-patch=diff' to see the failed patch
Patch failed at 0001 Fix preemption when requesting 0 of a resource at nominal quota
When you have resolved this problem, run "git am --continue".
If you prefer to skip this patch, run "git am --skip" instead.
To restore the original branch and stop patching, run "git am --abort".

In response to this:

/cherry-pick release-0.7

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.

@@ -86,8 +87,8 @@ func TestPreemption(t *testing.T) {
utiltesting.MakeClusterQueue("c1").
Cohort("cohort").
ResourceGroup(*utiltesting.MakeFlavorQuotas("default").
Resource(corev1.ResourceCPU, "6", "12").
Resource(corev1.ResourceMemory, "3Gi", "6Gi").
Resource(corev1.ResourceCPU, "6", "6").
Copy link
Contributor Author

Choose a reason for hiding this comment

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

For future reference: The limit of 12 was not accurate, as there are only 6 units available for borrowing.

kannon92 pushed a commit to openshift-kannon92/kubernetes-sigs-kueue that referenced this pull request Nov 19, 2024
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/bug Categorizes issue or PR as related to a bug. 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. 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