Commit 1e01c729 authored by Mark A. Grondona's avatar Mark A. Grondona
Browse files

slurmstepd: Add new mode to run spank job prolog/epilog

The spank_job_prolog() and spank_job_epilog() spank calls need
to be run in a different address space from slurmd. This not allows
reinitializing the spank plugin stack on each run of the prolog or
epilog, but also ensures that any static data in plugins does not
propagate to each invocation of the job prolog and epilog (e.g. global
variables). Additionally, it is much safer to run these plugins
in a new process because we may be calling prolog/epilog for multiple
jobs at the same time.

This patch runs spank_job_prolog() or spank_job_epilog() from slurmstepd
when slurmstepd is invoked as

 slurmstepd spank [prolog|epilog]

The environment variables SLURM_JOBID and SLURM_UID are used to set
the jobid and uid for the prolog/epilog. Spank plugin options may
also be passed through the current environment.
parent a136a5ab
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