From f11ec171cd9f5276f2dbc1ea5a4bfdae012b68e8 Mon Sep 17 00:00:00 2001 From: Morris Jette <jette@schedmd.com> Date: Thu, 21 Jan 2016 07:48:10 -0800 Subject: [PATCH] Modify error message when MaxJobCount reached bug 2366 --- src/slurmctld/job_mgr.c | 21 +++++++++------------ 1 file changed, 9 insertions(+), 12 deletions(-) diff --git a/src/slurmctld/job_mgr.c b/src/slurmctld/job_mgr.c index d592d326252..b72461477f0 100644 --- a/src/slurmctld/job_mgr.c +++ b/src/slurmctld/job_mgr.c @@ -446,8 +446,8 @@ static struct job_record *_create_job_record(int *error_code, uint32_t num_jobs) struct job_details *detail_ptr; if ((job_count + num_jobs) >= slurmctld_conf.max_job_cnt) { - error("_create_job_record: MaxJobCount reached (%u)", - slurmctld_conf.max_job_cnt); + error("%s: MaxJobCount limit from slurm.conf reached (%u)", + __func__, slurmctld_conf.max_job_cnt); } job_count += num_jobs; @@ -4012,17 +4012,14 @@ extern int job_allocate(job_desc_msg_t * job_specs, int immediate, struct job_record *job_ptr; time_t now = time(NULL); - if (job_specs->array_bitmap) { + if (job_specs->array_bitmap) i = bit_set_count(job_specs->array_bitmap); - if ((job_count + i) >= slurmctld_conf.max_job_cnt) { - info("%s: MaxJobCount limit reached (%d + %d >= %u)", - __func__, job_count, i, - slurmctld_conf.max_job_cnt); - return EAGAIN; - } - } else if (job_count >= slurmctld_conf.max_job_cnt) { - info("%s: MaxJobCount limit reached (%u)", - __func__, slurmctld_conf.max_job_cnt); + else + i = 1; + + if ((job_count + i) >= slurmctld_conf.max_job_cnt) { + error("%s: MaxJobCount limit from slurm.conf reached (%u)", + __func__, slurmctld_conf.max_job_cnt); return EAGAIN; } -- GitLab