Hi all

Background:

I’m new to Slurm. I Installed Slurm 16.05 (Munge auth, MariaDB managed by 
slurmdbd). Users maintained by LDAP, no LDAP user imported into Sturm DB so far.

bash$ sacctmgr show user
                     User   Def Acct     Admin
                --------- ---------- ---------
root       test Administ+

Ldap users can run jobs successfully, sacct –u <user> shows accounting 
information for past jobs. Now I want to restrict each users to only a certain 
number of jobs running in a partition at a time. Therefore I created a QoS and 
attached it to the partition (partition Qos):

bash$ sacctmgr create qos def_p_qos
# Add qos to partition definition in slurm.conf
PartitionName=all Nodes=node[02-04] Default=YES DefaultTime=01:00:00 
MaxTime=96:00:00 QOS=def_p_qos State=UP
bash$ scontrol reconfigure
bash$ saccmgr modify qos set MaxJobsPerUser=5 where name=def_p_qos

With only this, the MaxJobsPerUser limit is not applied. Accounting and 
Resource Limits Guide (http://slurm.schedmd.com/accounting.html) says:

„To enable any limit enforcement you must at least have 
AccountingStorageEnforce=limits in your slurm.conf,
otherwise, even if you have limits set, they will not be enforced.“

Consequently I set

                AccountingStorageEnforce=limits

In slurm.conf. Now job submission is prohibited: srun: error: Unable to 
allocate resources: Invalid account or account/partition combination specified. 
After adding the user to  Slurm DB, job submission works, and MaxJobsPerUser 
limits is being enforced. Success.

Question:

Is there a way to limit the max number of jobs per user on partition level 
without adding all LDAP users to Slurm DB? From Accounting and Resource Limits 
Guide:

                „Without AccountingStorageEnforce being set (the default 
behavior) jobs will be executed based upon policies configured in Slurm on each 
cluster.“

What does that mean? Where do I define those policies? Why this extra step of 
adding users to Slurm DB, how would that work without using a DB but flat files?


Many thanks,
Nico

Reply via email to