<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body text="#000000" bgcolor="#FFFFFF">
<p>But isn't that a user association setting and not an account
setting? So I would have to set it for every user/default account
association, no? Technically doable, but definitely more difficult
to manage.</p>
<p>Brian Andrus<br>
</p>
<br>
<div class="moz-cite-prefix">On 11/6/2018 3:58 AM, Yair Yarom wrote:<br>
</div>
<blockquote type="cite"
cite="mid:CAAHNG4ZCAcmCOwYcEv6_aoKiKGgL_5B-+2w9=4JjQDKaMGz4=A@mail.gmail.com">
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<div dir="ltr">
<div dir="ltr">
<div>Hi,</div>
<div><br>
</div>
<div>You can set the maxsubmitjob=0 on that default account.
That should prevent anyone from using it, but it won't have
a specific message like with the lua plugin. E.g.</div>
<div>sacctmgr update account default set maxsubmitjob=0</div>
<div><br>
</div>
<div>Regards,<br>
</div>
<div> Yair.<br>
</div>
<div><br>
</div>
</div>
</div>
<br>
<div class="gmail_quote">
<div dir="ltr">On Tue, Nov 6, 2018 at 12:58 AM Renfro, Michael
<<a href="mailto:Renfro@tntech.edu" moz-do-not-send="true">Renfro@tntech.edu</a>>
wrote:<br>
</div>
<blockquote class="gmail_quote" style="margin:0 0 0
.8ex;border-left:1px #ccc solid;padding-left:1ex">From <a
href="https://stackoverflow.com/a/46176694" rel="noreferrer"
target="_blank" moz-do-not-send="true">https://stackoverflow.com/a/46176694</a>:<br>
<br>
>> I had the same requirement to force users to specify
accounts and, after finding several ways to fulfill it with
slurm, I decided to revive this post with the shortest/easiest
solution.<br>
>> <br>
>> The slurm lua submit plugin sees the job description
before the default account is applied. Hence, you can install
the slurm-lua package, add "JobSubmitPlugins=lua" to the
slurm.conf, restart the slurmctld, and directly test against
whether the account was defined via the job_submit.lua script
(create the script wherever you keep your slurm.conf;
typically in /etc/slurm/):<br>
>> <br>
>> -- /etc/slurm/job_submit.lua to reject jobs with no
account specified<br>
>> <br>
>> function slurm_job_submit(job_desc, part_list,
submit_uid)<br>
>> if job_desc.account == nil then<br>
>> slurm.log_error("User %s did not specify
an account.", job_desc.user_id)<br>
>> slurm.log_user("You must specify an
account!")<br>
>> return slurm.ERROR<br>
>> end<br>
>> return slurm.SUCCESS<br>
>> end<br>
>> <br>
>> function slurm_job_modify(job_desc, job_rec,
part_list, modify_uid)<br>
>> return slurm.SUCCESS<br>
>> end<br>
>> <br>
>> return slurm.SUCCESS<br>
<br>
> On Nov 5, 2018, at 4:09 PM, Brian Andrus <<a
href="mailto:toomuchit@gmail.com" target="_blank"
moz-do-not-send="true">toomuchit@gmail.com</a>> wrote:<br>
> <br>
> All,<br>
> <br>
> I am trying to figure the best way to require users to
explicitly specify an account when submitting jobs (--account=
)<br>
> <br>
> What I was thinking was to create a default account for
the users that has no ability to submit any jobs, so if they
don't specify, any submission would fail.<br>
> <br>
> What I'm not seeing is how to set such an option on an
account. I was hoping to do something like cluster=none for
it's access, but that is not allowed.<br>
> <br>
> <br>
> Is there a way to set an account to not have access to
submit jobs?<br>
> Alternatively is there an easier way to require the
--account= option for jobs?<br>
> <br>
> <br>
> Brian Andrus<br>
> <br>
> <br>
<br>
<br>
</blockquote>
</div>
</blockquote>
<br>
</body>
</html>