-
Notifications
You must be signed in to change notification settings - Fork 30
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
add queues to the adapter interface #741
Comments
Just add that in Slurm you can associate records in Slurm database to be cluster + account + user + partition. I believe if sites use that feature you could say like |
I don't think you'll want to select based on partition though? Rather, we want all of them and construct all the possibly queues (for the current user)
and just create all the queues. I was considering having a go at an implementation (if I can find the time); do we imagine this being added as a method onto the |
I'll just add that this way to limit access to partitions is one of many ways. At OSC we don't associate users or accounts to partitions via the database. We restrict access to partitions via
Would still need to get user's account associations from database which can also be done with REST API on newer versions of Slurm I believe. |
I updated the comment. I think If the API is versioned we'd have to add the api version to the slurm config so folks can toggle back and forth, but that raises the question of what api versions would we support. We don't have a lot of support for multiple versions of schedulers (PBS I believe has a bug or 2 regarding the same. That is, the pbs adapter doesn't work for all versions of PBS). Which is all to say - if we're going to use the API we should understand it's compatibility. |
Only way to reliably check which versions of Slurm support which API version is checkout the code for Slurm from Github and look at OpenAPI spec. The official docs here: https://slurm.schedmd.com/rest_api.html , are only for the latest stable version which is 21.08 which we happen to run at OSC. When 22.05 comes out soon, the docs will be for that version and I believe the version of API will bump but Slurm tends to keep older API versions in newer Slurm versions so I'm pretty sure 22.05 will continue to have v0.0.37 even if they are adding functionality to v0.0.38 (or whatever next version is). For example, our 21.08 if you query Also I'll just add that getting the token requires |
I've started this in auto-queues but I'm having difficulty with the association tuple because our systems don't really use that. |
I can help provide example output if that helps?
would produce output something like
So, it will be unique to each user, and would be some set of My ruby is weak, but I was expecting something roughly equivalent to
|
Right now we're querying like this. Do you also use
|
Sure, that works to if you ask for the partition
|
OK - I'll add partition so it'll capture this 4 dimensional tuple Is partition always singular here? |
It would be multiple lines as each (project+partition+cluster+user+qos) association is arbitrary.
So, theoretically, it could be
So.. if one wants to map this into a hierarchy, then to map it to
if one desires to map this unto "data-option-for-xxx" type fields in the form. |
@johrstrom The QOS is not part of tuple in SLurm database, it's just an attribute on the cluster + account + user + (optional) partition association. The association can have multiple QOSes assigned to it but it's not what defines the association. An association can only have 1 of each of the tuple elements, cluster, account, user, optional partition. |
Thanks! I've got the pull request now pulling all 4 dimensions, |
you can ask for multiple partitions to a job if that's what you meant. the job will end up on whatever partition first have enough resources to fit it. |
Thanks @akesandgren! It's really about those association records. I was wondering if 1 assocication record could have multiple partitions like so (this is an edited example output from eariler):
or, if partition is 1:1 with these records and you'd get a new record for each partition.
I've come to believe it's the latter. |
Yep, sacctmgr produces one record per account/partition/cluster at least. |
Thanks for the confirmation. I'm trying to get this into 2.1 now. |
Pretty straight forward: add
queues
to the adapter interface.I think we can start off with a fairly simple interface for Queue to have a name and a list of accounts that can use the queue.
in https://github.com/OSC/ood_core/blob/01de647f2ee3ac3b218afa89581126166c7a829d/lib/ood_core/job/adapter.rb
┆Issue is synchronized with this Asana task by Unito
The text was updated successfully, but these errors were encountered: