Skip to content

auto_queues widget should check AllowQos property for slurm partitions #3932

@simonLeary42

Description

@simonLeary42

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]

Metadata

Metadata

Assignees

Type

No type

Projects

Status

Reviewed, Scheduled

Status

In Progress ✈

Relationships

None yet

Development

No branches or pull requests

Issue actions