diff --git a/NEWS b/NEWS index 0c1e8a67f3befff660257289091cc91430f79f2c..ae3c6cc9d53205d118f8b3d794ff403c02215a09 100644 --- a/NEWS +++ b/NEWS @@ -239,6 +239,8 @@ documents those changes that are of interest to users and admins. -- In srun and sbatch, do not check the PATH env var if an absolute pathname of the program is specified (previously reported an error if no PATH). -- Correct output of "sinfo -o %C" (CPU counts by node state). + -- Treat attempt to submit a batch job against an existing resource allocation + as an error if sched/wiki2 is configured (Moab). * Changes in SLURM 1.2.25 ========================= diff --git a/src/slurmctld/step_mgr.c b/src/slurmctld/step_mgr.c index 7a8e917ea8369a0994b163bb0882a2d0f57d2dc1..1ec6869e96c9df218fa7c3ffd678e4b95a1838ff 100644 --- a/src/slurmctld/step_mgr.c +++ b/src/slurmctld/step_mgr.c @@ -820,11 +820,22 @@ step_create(job_step_create_request_msg_t *step_specs, } if (batch_step) { + static bool wiki_sched = false; + static bool wiki_sched_test = false; + if (!wiki_sched_test) { + char *sched_type = slurm_get_sched_type(); + if ((strcmp(sched_type, "sched/wiki") == 0) || + (strcmp(sched_type, "sched/wiki2") == 0)) + wiki_sched = true; + xfree(sched_type); + wiki_sched_test = true; + } info("user %u attempting to run batch script within " "an existing job", step_specs->user_id); /* This seems hazardous to allow, but LSF seems to - * work this way, so don't treat it as an error. - * return ESLURM_ACCESS_DENIED ; */ + * work this way, so don't treat it as an error. */ + if (wiki_sched) + return ESLURM_ACCESS_DENIED; } if ((step_specs->user_id != job_ptr->user_id) &&