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

auto_queues widget should check AllowQos property for slurm partitions #3932

Open
simonLeary42 opened this issue Nov 6, 2024 · 3 comments
Open
Milestone

Comments

@simonLeary42
Copy link

a slurm partition can have a QOS whitelist (AllowQos), and users can be granted access to a QOS with an "association" in the slurm database. If a user attempts to schedule a job on an AllowQos partition, and they aren't associated with any of the allowed QOSes, they get an invalid QOS specification error. It would be nice if the auto_queues widget did not display (or grayed out) slurm partitions which aren't accessible by the current user.

I previously wrote some python code that gets the current user's QOSes from sacctmgr:

my_associations = json.loads(
    subp.check_output(
        [
            "/usr/bin/sacctmgr",
            "show",
            "association",
            "--json",
            f"user={os.getenv('USER')}",
        ]
    )
)
my_qos = [x["qos"] for x in my_associations["associations"] if "qos" in x]
@osc-bot osc-bot added this to the Backlog milestone Nov 6, 2024
@simonLeary42
Copy link
Author

The logic already exists to check whether partition access is allowed based on AllowAccounts, so it seems natural that it should also respect AllowQos:

def blocked_queue?(queue)

@simonLeary42
Copy link
Author

simonLeary42 commented Nov 6, 2024

After doing some reading, I see that OOD core already knows which QOS the current user has access to. What it doesn't know is how those accounts QOS can be used to determine partition access.

https://github.com/OSC/ood_core/blob/4342e29119c9db3a4860940f83191ba1cb760156/lib/ood_core/job/adapters/slurm.rb#L369

@simonLeary42 simonLeary42 changed the title auto_queues widget shouldn't show forbidden slurm partitions auto_queues widget should check AllowQos property for slurm partitions Nov 6, 2024
@johrstrom
Copy link
Contributor

Thanks for the issue. I don't think I can get this into 4.0, but we'll see about the next next release.

@johrstrom johrstrom modified the milestones: Backlog, 4.1 Nov 6, 2024
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

No branches or pull requests

3 participants