diff --git a/NEWS b/NEWS index db5c690a2ed7acf3a5e2c7bd1b56005cf16c0d8e..929b56fbd01e34b40b1f785f1ba41b811b27d42f 100644 --- a/NEWS +++ b/NEWS @@ -44,8 +44,6 @@ documents those changes that are of interest to users and administrators. correctly when PriorityFlags=CALCULATE_RUNNING is set. -- Add slurmdb_find_tres_count_in_string() to slurm db perl api. -- Make lua dlopen() conditional on version found at build. - -- When launching a task wait for the prolog to finish if it is still - running. -- sched/backfill - Delay backfill scheduler for completing jobs only if CompleteWait configuration parameter is set (make code match documentation). -- Release a job's allocated licenses only after epilog runs on all nodes diff --git a/src/slurmd/slurmd/req.c b/src/slurmd/slurmd/req.c index d3e367a0172f85cf84f5793fc24767ac8bedf20b..e8f635074e8292fdd0f09d2732c82ae97d90eac2 100644 --- a/src/slurmd/slurmd/req.c +++ b/src/slurmd/slurmd/req.c @@ -1184,7 +1184,7 @@ _rpc_launch_tasks(slurm_msg_t *msg) * Do not launch a new job step while prolog in progress: */ if (_prolog_is_running (req->job_id)) { - info("[job %u] prolog in progress", req->job_id); + info("[job %u] prolog in progress\n", req->job_id); errnum = EINPROGRESS; goto done; } @@ -5918,23 +5918,13 @@ static int _match_jobid(void *listentry, void *key) return (*job0 == *job1); } -static int _prolog_is_running(uint32_t jobid) +static int _prolog_is_running (uint32_t jobid) { - time_t start; - uint16_t timeout; - - timeout = slurm_get_prolog_timeout(); - start = time(NULL); - - while (time(NULL) - start < timeout) { - if (list_find_first (conf->prolog_running_jobs, - (ListFindF) _match_jobid, &jobid)) { - sleep(1); - continue; - } - return 0; - } - return 1; + int rc = 0; + if (list_find_first (conf->prolog_running_jobs, + (ListFindF) _match_jobid, &jobid)) + rc = 1; + return (rc); } /* Wait for the job's prolog to complete */