-
Notifications
You must be signed in to change notification settings - Fork 10
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
bank_table: add max-preempt-after
column
#556
Open
cmoussa1
wants to merge
5
commits into
flux-framework:master
Choose a base branch
from
cmoussa1:issue#553
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Problem: The bank_table does not have a way to track a max preemptible-after value for a certain bank. This kind of information is needed to enforce a limit on association-set preemptible-after values on their jobs as well as set a default on their job in the case where the association does not set one on their own. Add a new column to the bank_table called "max_preempt_after", which is a floating point number representing the max number of seconds in which a job submitted under this bank can run before being preempted. It does not require a value and does not have a default. Update the schema version number of the flux-accounting database to account for the change to bank_table. Add "max_preempt_after" to the list of column names defined in the BANK_TABLE constant in __init__.py.
Problem: The add-bank command has no way to specify a max-preempt-after value for a bank when it is being added to the bank_table. Add a new optional argument to the add-bank command: --max-preempt-after, which takes a Flux Standard Duration (FSD) value representing the max amount of time in which a job submitted under this bank can run before being preempted.
Problem: The edit-bank command has no way to specify a max-preempt-after value for a bank when it is being edited. Add a new optional argument to the edit-bank command: --max-preempt-after, which takes a Flux Standard Duration (FSD) value representing the max amount of time in which a job submitted under this bank can run before being preempted. The max-preempt-after attribute for a bank can also be cleared by passing -1 to the --max-preempt-after optional argument in the edit-bank command.
Problem: There are a number of tests that check the output of the view-bank commands that are now out-of-date because of the addition of the max-preempt-after column. Edit the expected output for a number of files in the flux-accounting testsuite to account for the addition of the max-preempt-after column.
cmoussa1
added
new feature
new feature
database
related to the flux-accounting database
labels
Dec 19, 2024
@ryanday36 when you have some time, could you give this a look and let me know if this looks like something you'd be good with in terms of managing banks in the flux-accounting database? Note that this doesn't actually enforce the limit in the priority plugin (yet); it's just the first part in being able to define and set this limit in the DB. |
Problem: There are no tests for adding/editing banks in the bank_table with max-preempt-after values. Add some tests.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Problem
The
bank_table
does not have a way to track a maxpreemptible-after
value for a certain bank. This kind of information is needed to enforce a limit on association-setpreemptible-after
values on their jobs as well as set a default on their job in the case where the association does not set one on their own.This PR begins to add support for enforcing
preemptible-after
limits on a per-bank basis by adding a new column to thebank_table
calledmax_preempt_after
, which is a floating point number representing the max number of seconds in which a job submitted under this bank can run before being preempted. It does not require a value and does not have a default value.--max-preempt-after
optional arguments are also added to theadd-bank
andedit-bank
commands to allow an admin to both define and change themax-preempt-after
attribute for a bank. The expected format for this attribute in both theadd-bank
andedit-bank
commands is Flux Standard Duration (FSD). A bank'smax-preempt-after
can also be cleared by passing-1
as a value if the admin no longer wants to have a maxpreemptible-after
attribute defined for a particular bank.I've added some basic tests to a new test file that adds multiple banks with different FSD values as well as resets its value after setting a value initially.
Fixes #553