Commit 3edc31ad authored by Mark A. Grondona's avatar Mark A. Grondona Committed by Morris Jette
Browse files

RFC: Support glob patterns for Prolog and Epilog conf keywords

When prolog and epilog scripts start to diverge on multiple clusters
within the same center it begins to get very painful to keep these
scripts up-to-date, and their implementation usually ends up being
quite convoluted.

One solution is to have prolog and epilog simply run a series of
scripts from a directory, e.g. the epilog might do

 for script in /etc/slurm/epilog.d/*; do
   $script || exit 1;
 done

Then an optional bit of prolog/epilog logic can be implemented
as a little scriptlet and only installed on the needed clusters.

However, it might be nice if this globbing functionality was standard in
SLURM, because it would be more easily available and standardized
for sysadmins.

This is especially nice for plugins that use the job_control_env()
environment to affect behavior of the epilog and prolog. With

 Prolog=/etc/slurm/prolog.d/*
 Epilog=/etc/slurm/epilog.d/*

in slurm.conf, a plugin could be a self-contained package by dropping
a setup script into /etc/slurm/prolog.d/, a cleanup script into
/etc/slurm/epilog.d/ and the actual plugin which implements the
srun/sbatch/salloc option could be installed into /etc/slurm/lua.d/
or /etc/slurm/plugstack.conf.d/

This patch implements a glob syntax for the run_script logic
in slurmd. It should not change behavior of existing configs,
since they should not have any special glob characters in
the Prolog and Epilog config settings.

I'm just sending this out as a request for comments at this time.
parent 2ee0bfc6
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment