Ticket 12782

Summary: limit partition use by account
Product: Slurm Reporter: Todd Merritt <tmerritt>
Component: ConfigurationAssignee: Marcin Stolarek <cinek>
Status: RESOLVED INFOGIVEN QA Contact:
Severity: 4 - Minor Issue    
Priority: --- CC: cinek
Version: 21.08.2   
Hardware: Linux   
OS: Linux   
Site: U of AZ Alineos Sites: ---
Atos/Eviden Sites: --- Confidential Site: ---
Coreweave sites: --- Cray Sites: ---
DS9 clusters: --- HPCnow Sites: ---
HPE Sites: --- IBM Sites: ---
NOAA SIte: --- OCF Sites: ---
Recursion Pharma Sites: --- SFW Sites: ---
SNIC sites: --- Linux Distro: ---
Machine Name: CLE Version:
Version Fixed: Target Release: ---
DevPrio: --- Emory-Cloud Sites: ---

Description Todd Merritt 2021-10-29 06:17:01 MDT
Hi I'm wanting to create a new partition that is restricted to certain accounts. As I read the documentation and interacting with sacctmgr though, it seems that this is only settable at the user level with no way to set it at the account level. Is my understanding correct?

Thanks!
Comment 1 Marcin Stolarek 2021-10-29 06:22:07 MDT
Todd,

Doesn't AllowAccounts partition configuration parameter address your need?

per man slurm.conf:
>AllowAccounts
>Comma-separated list of accounts which may execute jobs in the partition.  The 
>default value is "ALL".  NOTE: If AllowAccounts is used then DenyAccounts will 
>not be enforced.  Also refer to DenyAccounts.

cheers,
Marcin
Comment 2 Todd Merritt 2021-10-29 06:53:08 MDT
Hi Marcin, not particularly well. I have hundreds of accounts and it is not feasible for me to edit the slurm config with the frequency that accounts come and go.
Comment 3 Marcin Stolarek 2021-10-29 07:09:17 MDT
Todd,

It's possible to update the parameter by:
>scontrol update partitionname=XXX allowaccounts=YYY

but to make it permanent slurm.conf edit is still required.

cheers,
Marcin
Comment 4 Todd Merritt 2021-10-29 07:13:05 MDT
Ok, thanks for the confirmation. I'll see if I can find a way to make managing it at the user level not horrible, or come up with a way to make allowAccounts not require adding all of our accounts to the list.

You can close this out.
Comment 5 Marcin Stolarek 2021-10-29 07:30:57 MDT
One of the tools you may find helpful in automating things is:
>scontrol write config

If it's easier for you an opposite DenyAccounts can be too.

cheers,
Marcin