diff --git a/NEWS b/NEWS index f00d2cb339b8416e23fab1b766a9c848afa9667e..60947aac7c933cc943d5fe033fd08e576f8a2055 100644 --- a/NEWS +++ b/NEWS @@ -6,6 +6,8 @@ documents those changes that are of interest to users and admins. -- Modity job state "reason" field to report why a job failed (previously previously reported only reason waiting to run). Requires cold-start of slurmctld (-c option). + -- For sched/wiki2 job state request, return REJMESSAGE= with reason for + a job's failure. * Changes in SLURM 1.2.0-pre7 ============================= diff --git a/src/plugins/sched/wiki2/get_jobs.c b/src/plugins/sched/wiki2/get_jobs.c index c2afe9609709bca85da4a282bef622505a46c055..eabd601143252dda3648af207057e8ceac30e3f8 100644 --- a/src/plugins/sched/wiki2/get_jobs.c +++ b/src/plugins/sched/wiki2/get_jobs.c @@ -190,6 +190,13 @@ static char * _dump_job(struct job_record *job_ptr, int state_info) xstrcat(buf, tmp); } + if (job_ptr->job_state == JOB_FAILED) { + snprintf(tmp, sizeof(tmp), + "REJMESSAGE=\"%s\";", + job_reason_string(job_ptr->state_reason)); + xstrcat(buf, tmp); + } + snprintf(tmp, sizeof(tmp), "UPDATETIME=%u;WCLIMIT=%u;", (uint32_t) job_ptr->time_last_active,