slurmd: Call spank prolog and epilog hooks
Call spank_job_prolog() and spank_job_epilog() at prolog/epilog time by invoking "slurmstepd spank [prolog|epilog]" The prolog and epilog spank plugin hooks are not called within the virtual address space of slurmd for at least a couple of reasons, including 1. Plugins dlopened in the address space of slurmd cannot be dlopened a second time. Therefore, static and global state in the DSO may be "dirty" in that some state may be preserved from the last epilog or prolog call, or even from the slurmd_init callback. 2. The prolog and epilog need to be guaranteed reentrant. The safest way to guarantee this is to ensure prolog/epilog hooks are called from a separate address space. 3. To satisfy "principle of least surprise" we want to have new plugins installed run their prolog/epilog hooks on the next job, just as if an update to the prolog/epilog script was made. The only way to guarantee this is to reload the spank plugin stack from plugstack.conf on each run. Because of #1 above, this needs to be done in a separate process.
Please register or sign in to comment