Skip to content

add default quota to AW #396

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

Merged
merged 9 commits into from
Jun 12, 2023
Merged

add default quota to AW #396

merged 9 commits into from
Jun 12, 2023

Conversation

asm582
Copy link
Member

@asm582 asm582 commented May 26, 2023

No description provided.

@asm582 asm582 marked this pull request as ready for review May 28, 2023 04:34
@asm582 asm582 requested review from metalcycling and z103cb May 28, 2023 21:31
@z103cb
Copy link
Contributor

z103cb commented May 29, 2023

What is not clear from this PR how are "default" quota contexts going to be handled? Where do you intend to add the default values and what are those default values? As this PR stands now, it seems incomplete.

Copy link
Contributor

@z103cb z103cb left a comment

Choose a reason for hiding this comment

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

The PR is missing the logic for handling default quota tree nodes and the logic for adding default labels should simplified.

@tardieu tardieu mentioned this pull request May 30, 2023
@z103cb
Copy link
Contributor

z103cb commented May 31, 2023

After a conversation with @tardieu, I understand what will need to happen to have the "default" quota tree nodes. The only outstanding objection is symplication of the logic

Copy link
Collaborator

@dmatch01 dmatch01 left a comment

Choose a reason for hiding this comment

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

Thanks for the PR. Please see suggested for the more general design.

… is a label associated with every quota-sub-tree for the AppWrapper; if there is none, then it adds it with 'default' value. This way, AppWrappers submitted without labels can be dispatched using the quota management library. Added tests for this, and fixed 'quota_service' sub tree to have a 'default' node. This code assumes the quota administrator created a leaf node name 'default' that can be used to schedule AppWrappers without quota labels.
Copy link
Collaborator

@metalcycling metalcycling left a comment

Choose a reason for hiding this comment

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

I made the changes to the logic @z103cb requested as well as implementing the behavior discussed with @tardieu (and some of the suggestions by @dmatch01). @z103cb you are the gatekeeper right now, so we'll wait for your feedback. In the meantime, I'll deploy this version of quota management (with the newest changes) to the DEV cluster while the PR is reviewed.

… The code would think there is no quota (even without quota management) because the new code wasn't inside the proper scope.
Copy link
Contributor

@z103cb z103cb left a comment

Choose a reason for hiding this comment

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

  • The changes in queuejob_controller_ex.go have a bug, it does not preserve any prior labels.
  • The new method name in the quota_manager_interface.go leaks information about how the quota subsystem in implemented. I suggest chaninging is name to something a little bit more abstract, and indicative of its usage.

metalcycling and others added 3 commits June 8, 2023 19:45
…nd updates the Kubernetes object correctly. New tests added to check for AppWrappers with no labels at all and with existing labels but no quota labels.
Copy link
Collaborator

@metalcycling metalcycling left a comment

Choose a reason for hiding this comment

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

Revising

@asm582 asm582 merged commit 433d1cb into project-codeflare:main Jun 12, 2023
Srihari1192 pushed a commit to Srihari1192/multi-cluster-app-dispatcher that referenced this pull request Jul 6, 2023
* add default quota to AW

* add default quota

* resolve merge

* Added support to query existing QuotaSubTrees. MCAD checks that there is a label associated with every quota-sub-tree for the AppWrapper; if there is none, then it adds it with 'default' value. This way, AppWrappers submitted without labels can be dispatched using the quota management library. Added tests for this, and fixed 'quota_service' sub tree to have a 'default' node. This code assumes the quota administrator created a leaf node name 'default' that can be used to schedule AppWrappers without quota labels.

* Fixed bug that manifested when running MCAD without quota management. The code would think there is no quota (even without quota management) because the new code wasn't inside the proper scope.

* Renamed the function 'GetTreeNames' to 'GetValidQuotaLabels'

* Default quota labels code fixed. Code preserves the existing labels and updates the Kubernetes object correctly. New tests added to check for AppWrappers with no labels at all and with existing labels but no quota labels.

* relax testing scenario

---------

Co-authored-by: Pedro D. Bello-Maldonado <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants