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

Support deferred job start time #1013

Open
wants to merge 7 commits into
base: master
Choose a base branch
from

Conversation

milroy
Copy link
Member

@milroy milroy commented Mar 6, 2023

Issues #3271 (flux-core), #987, and #963 identify useful new capability for Fluxion: to allow a user to specify a time in the future for their job to start. If the job cannot start at that time, then Fluxion should reserve the job at the earliest time.

Functionally this is very similar to "allocate_orelse_reserve" with an "at" time in the future. This PR adds the desired capability.

TODO:

  • is specifying deferred_start in the optional jobspec system attributes the right approach?
  • how should we handle the Fluxion API? Currently a bool determines whether match_allocate also reserves.

@milroy
Copy link
Member Author

milroy commented Mar 6, 2023

I realized the PR will need updating. As it stands the job will never run, because each time qmanager iterates through the jobs and reaches the deferred job it will set the at time to be n (deferred_start) seconds in the future. We will need to specify deferred_start seconds in the future from the time at which the jobspec is first submitted, and then reduce the at time each time qmanager executes a loop.

For upcoming Fluxion use cases users will need the capability to request
a deferred allocation. The desired behavior is equivalent to match
allocate_orelse_reserve, but with a request time in the future.

Add DEFERRED_ORELSE_RESERVE match_op_t to provide the needed type.
Problem: the user needs to set an optional key "deferred_start" in their
jobspec to specify the earliest time at which the job should start.

Add capability in jobspec build function to find the optional key and
set the job "at" time to the user provided value.
The DEFERRED_ORELSE_RESERVE case should behave exactly like
MATCH_ALLOCATE_ORELSE_RESERVE with an "at" time set in the future.

Add a "fall through" case for DEFERRED_ORELSE_RESERVE so that it
executes the logic of MATCH_ALLOCATE_ORELSE_RESERVE.
The resource_match module needs to support deferred_orelse_reserve.

Add a new conditional check for the "deferred_orelse_reserve" command.
Add functions and parsing for deferred_orelse_reserve RPCs and actions
in flux-ion-resource.
Add functions, command parsing, and help string for
deferred_orelse_reserve in resource-query.
@codecov
Copy link

codecov bot commented Oct 10, 2023

Codecov Report

Merging #1013 (c4f7dfa) into master (07c36dd) will increase coverage by 2.5%.
The diff coverage is 81.2%.

❗ Current head c4f7dfa differs from pull request most recent head e3b7a96. Consider uploading reports for the commit e3b7a96 to get more accurate results

@@           Coverage Diff            @@
##           master   #1013     +/-   ##
========================================
+ Coverage    71.7%   74.3%   +2.5%     
========================================
  Files          89      86      -3     
  Lines       11665    9448   -2217     
========================================
- Hits         8374    7028   -1346     
+ Misses       3291    2420    -871     
Files Coverage Δ
resource/policies/base/matcher.hpp 100.0% <ø> (ø)
resource/traversers/dfu.cpp 87.1% <100.0%> (+0.1%) ⬆️
resource/modules/resource_match.cpp 72.0% <50.0%> (+4.4%) ⬆️
resource/traversers/dfu_impl.hpp 92.8% <88.8%> (-1.8%) ⬇️
resource/utilities/command.cpp 76.9% <75.0%> (+1.5%) ⬆️

... and 78 files with indirect coverage changes

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.

None yet

1 participant