<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<style type="text/css" style="display:none;"> P {margin-top:0;margin-bottom:0;} </style>
</head>
<body dir="ltr">
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 11pt; color: rgb(0, 0, 0); background-color: rgb(255, 255, 255);">
<span style="font-family: Calibri, Helvetica, sans-serif; font-size: 11pt;">I've used that approach too.</span></div>
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 11pt; color: rgb(0, 0, 0); background-color: rgb(255, 255, 255);">
<span style="font-family: Calibri, Helvetica, sans-serif; font-size: 11pt;">If the submitting user ID is mine, then do this or that, all other's take the else clause. That way, you can actually run on the production system without having to replicate the whole
 environment in a sandbox. Certainly not the cleanest approach, but it doesn't hurt others.</span><br>
</div>
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 11pt; color: rgb(0, 0, 0); background-color: rgb(255, 255, 255);">
<br>
</div>
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 11pt; color: rgb(0, 0, 0); background-color: rgb(255, 255, 255);">
And to answer you question Mike, the job_submit.lua file is read every time it's executed, so you can edit it on the fly.</div>
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 11pt; color: rgb(0, 0, 0); background-color: rgb(255, 255, 255);">
<br>
</div>
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 11pt; color: rgb(0, 0, 0); background-color: rgb(255, 255, 255);">
Best,</div>
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 11pt; color: rgb(0, 0, 0); background-color: rgb(255, 255, 255);">
Florian</div>
<div>
<div id="Signature">
<div>
<div style="">
<div style=""></div>
</div>
</div>
</div>
</div>
<div id="appendonsend"></div>
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 11pt; color: rgb(0, 0, 0);">
<br>
</div>
<hr tabindex="-1" style="display:inline-block; width:98%">
<div id="divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" color="#000000" style="font-size: 11pt;"><b>From:</b> slurm-users <slurm-users-bounces@lists.schedmd.com> on behalf of Renfro, Michael <Renfro@tntech.edu><br>
<b>Sent:</b> Thursday, 6 May 2021 19:23<br>
<b>To:</b> Slurm User Community List <slurm-users@lists.schedmd.com><br>
<b>Subject:</b> [External] Re: [slurm-users] Testing Lua job submit plugins</font>
<div> </div>
</div>
<div dir="auto">I’ve used the structure at <a href="https://gist.github.com/mikerenfro/92d70562f9bb3f721ad1b221a1356de5">https://gist.github.com/mikerenfro/92d70562f9bb3f721ad1b221a1356de5</a> to handle basic test/production branching. I can isolate the new
 behavior down to just a specific set of UIDs that way.
<div><br>
</div>
<div>Factoring out code into separate functions helps, too.</div>
<div><br>
</div>
<div>I’ve seen others go so far as to put the functions into separate files, but I haven’t needed that yet.<br>
<div dir="ltr"><br>
<blockquote type="cite">On May 6, 2021, at 12:11 PM, Michael Robbert <mrobbert@mines.edu> wrote:<br>
<br>
</blockquote>
</div>
<blockquote type="cite">
<div dir="ltr">
<meta name="Generator" content="Microsoft Word 15 (filtered medium)">
 <p align="center" style="text-align: center; background: white; margin: 0px;"><b><span style="font-size: 12pt; color: red; background: white; font-family: Calibri, sans-serif;">External Email Warning</span></b></p>
<p align="center" style="text-align: center; background: white; margin: 0px 12pt;">
<b><span style="font-size: 12pt; color: red; font-family: Calibri, sans-serif;">This email originated from outside the university. Please use caution when opening attachments, clicking links, or responding to requests.</span></b><span style="font-size:12.0pt"></span></p>
<hr>
<div>
<div class="x_WordSection1">
<p class="x_MsoNormal" style="margin: 0in; font-size: 12pt; font-family: Calibri, sans-serif;">
<span style="font-size:11.0pt">I’m wondering if others in the Slurm community have any tips or best practices for the development and testing of Lua job submit plugins. Is there anything that can be done prior to deployment on a production cluster that will
 help to ensure the code is going to do what you think it does or at the very least not prevent any jobs from being submitted? I realize that any configuration change in slurm.conf could break everything, but I feel like adding Lua code adds enough complexity
 that I’m a little more hesitant to just throw it in. Any way to run some kind of linting or sanity tests on the Lua script? Additionally, does the script get read in one time at startup or reconfig or can it be changed on the fly just by editing the file?
</span></p>
<p class="x_MsoNormal" style="margin: 0in; font-size: 12pt; font-family: Calibri, sans-serif;">
<span style="font-size:11.0pt">Maybe a separate issue, but does anybody have an recipes to build a local test cluster in Docker that could be used to test this? I was working on one, but broke my local Docker install and thought I’d send this note out while
 I was working on rebuilding it. </span></p>
<p class="x_MsoNormal" style="margin: 0in; font-size: 12pt; font-family: Calibri, sans-serif;">
<span style="font-size:11.0pt"> </span></p>
<p class="x_MsoNormal" style="margin: 0in; font-size: 12pt; font-family: Calibri, sans-serif;">
<span style="font-size:11.0pt">Thanks in advance,</span></p>
<p class="x_MsoNormal" style="margin: 0in; font-size: 12pt; font-family: Calibri, sans-serif;">
<span style="font-size:11.0pt">Mike Robbert</span></p>
</div>
</div>
</div>
</blockquote>
</div>
</div>
</body>
</html>