From ff51e68bb857ad59873542ac6b9c0b645373b8e7 Mon Sep 17 00:00:00 2001 From: Moe Jette <jette1@llnl.gov> Date: Thu, 23 Mar 2006 22:35:43 +0000 Subject: [PATCH] Log requests to run a batch job within an existing batch job. LSF seems to work this way, so we allow it, but it does seem dangerous. --- src/slurmctld/step_mgr.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/slurmctld/step_mgr.c b/src/slurmctld/step_mgr.c index 979c199ecaf..e351fbb80ef 100644 --- a/src/slurmctld/step_mgr.c +++ b/src/slurmctld/step_mgr.c @@ -580,6 +580,15 @@ step_create ( job_step_create_request_msg_t *step_specs, if (job_ptr == NULL) return ESLURM_INVALID_JOB_ID ; + if (batch_step + && (job_ptr->batch_flag || job_ptr->next_step_id)) { + 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 ; */ + } + if ((step_specs->user_id != job_ptr->user_id) && (step_specs->user_id != 0)) return ESLURM_ACCESS_DENIED ; -- GitLab