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

in capacity plugin attr.deserved no need MinDimensionResource with attr.request #3946

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

kingeasternsun
Copy link
Contributor

What type of PR is this?

/kind cleanup

/area scheduling

What this PR does / why we need it:

In capacity plugin attr.deserved no need MinDimensionResource with attr.request.
In proportion plugin, attr.deserved is computed dynamically using min-max faire share algorithm, so attr.deserved needs MinDimensionResource with attr.request to share the ununsed quota with other queues.
But in capacity plugin, attr.deserved is configured by the user, so the MinDimensionResource is not need any more.

Which issue(s) this PR fixes:

Fixes #3944

Special notes for your reviewer:

NONE

Does this PR introduce a user-facing change?

NONE

Signed-off-by: kingeasternsun <[email protected]>
@volcano-sh-bot volcano-sh-bot added kind/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt. area/scheduling labels Dec 31, 2024
@volcano-sh-bot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
To complete the pull request process, please assign archlitchi
You can assign the PR to them by writing /assign @archlitchi in a comment when ready.

The full list of commands accepted by this bot can be found 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

@volcano-sh-bot volcano-sh-bot added the size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. label Dec 31, 2024
@@ -654,7 +652,7 @@ func (cp *capacityPlugin) checkHierarchicalQueue(attr *queueAttr) error {
attr.guarantee = totalGuarantee
cp.totalGuarantee = totalGuarantee
attr.realCapability = cp.totalResource
attr.deserved = cp.totalResource
attr.deserved = totalDeserved
Copy link
Member

Choose a reason for hiding this comment

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

Is it necessary to change this to totalDeserved?

Copy link
Member

Choose a reason for hiding this comment

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

Why is it resolved here? You didn't give your explaination in your PR's description

@@ -654,7 +652,7 @@ func (cp *capacityPlugin) checkHierarchicalQueue(attr *queueAttr) error {
attr.guarantee = totalGuarantee
cp.totalGuarantee = totalGuarantee
attr.realCapability = cp.totalResource
attr.deserved = cp.totalResource
attr.deserved = totalDeserved
Copy link
Contributor

@bogo-y bogo-y Dec 31, 2024

Choose a reason for hiding this comment

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

I guess that you will be interested in #3947. We can decouple of the queues' quota from physical resources by adding a new mode and I think we'd better avoid affecting existing features. FYI: #3929 (comment)

Copy link
Contributor Author

@kingeasternsun kingeasternsun Jan 2, 2025

Choose a reason for hiding this comment

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

Thanks, but in this PR this fix is needed, or the if attr.guarantee.LessPartly(totalGuarantee, api.Zero) may be fail.

Copy link
Contributor

Choose a reason for hiding this comment

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

Thanks, but in this PR this fix is needed, or the if attr.guarantee.LessPartly(totalGuarantee, api.Zero) may be fail.

That failure is expected according to https://cloud-native.slack.com/archives/C011GJDQS0N/p1735212321607659?thread_ts=1735042276.738339&cid=C011GJDQS0N and #3929 (comment). I think we should not fix it directly.

@Monokaix
Copy link
Member

Monokaix commented Jan 2, 2025

/ok-to-test

@volcano-sh-bot volcano-sh-bot added the ok-to-test Indicates a non-member PR verified by an org member that is safe to test. label Jan 2, 2025
@JesseStutler
Copy link
Member

/lgtm

@volcano-sh-bot volcano-sh-bot added the lgtm Indicates that a PR is ready to be merged. label Jan 2, 2025
@Monokaix
Copy link
Member

Monokaix commented Jan 3, 2025

We should add ut to cover these changes, such as make sure queue attr is rendered correctly, especially the deserved filed, both root and child queue, and queues reclaim behavior is also not affected.

@volcano-sh-bot volcano-sh-bot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Jan 15, 2025
@volcano-sh-bot
Copy link
Contributor

@kingeasternsun: PR needs rebase.

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/scheduling kind/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt. lgtm Indicates that a PR is ready to be merged. needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. ok-to-test Indicates a non-member PR verified by an org member that is safe to test. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Enhancement: in capacity plugin attr.deserved no need MinDimensionResource with attr.request
5 participants