[slurm-users] [External] Re: Testing Lua job submit plugins
fzillner at lenovo.com
Thu May 6 18:45:33 UTC 2021
I've used that approach too.
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.
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.
From: slurm-users <slurm-users-bounces at lists.schedmd.com> on behalf of Renfro, Michael <Renfro at tntech.edu>
Sent: Thursday, 6 May 2021 19:23
To: Slurm User Community List <slurm-users at lists.schedmd.com>
Subject: [External] Re: [slurm-users] Testing Lua job submit plugins
I’ve used the structure at https://gist.github.com/mikerenfro/92d70562f9bb3f721ad1b221a1356de5 to handle basic test/production branching. I can isolate the new behavior down to just a specific set of UIDs that way.
Factoring out code into separate functions helps, too.
I’ve seen others go so far as to put the functions into separate files, but I haven’t needed that yet.
On May 6, 2021, at 12:11 PM, Michael Robbert <mrobbert at mines.edu> wrote:
External Email Warning
This email originated from outside the university. Please use caution when opening attachments, clicking links, or responding to requests.
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?
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.
Thanks in advance,
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the slurm-users