diff --git a/NEWS b/NEWS index 088044555622df5bbf52ba8768d7143ab6cba21f..e9888497144cf46737c59a9398c33b8beb10b65e 100644 --- a/NEWS +++ b/NEWS @@ -54,6 +54,8 @@ documents those changes that are of interest to users and admins. -- If we cancel a task and we have no other exit code send the signal and exit code. -- Added note about InnoDB storage engine being used with MySQL. + -- Set the job exit code when the job is signaled and set the log level to debug2() + when processing an already completed job. * Changes in Slurm 14.03.4 ========================== diff --git a/src/slurmctld/job_mgr.c b/src/slurmctld/job_mgr.c index a75edc090fe36e657040e3031e3472a0e7ea4d09..ed0e55064f34bc870fd5c2b234389c673657bfa6 100644 --- a/src/slurmctld/job_mgr.c +++ b/src/slurmctld/job_mgr.c @@ -3809,8 +3809,11 @@ extern int job_complete(uint32_t job_id, uid_t uid, bool requeue, return ESLURM_INVALID_JOB_ID; } - if (IS_JOB_FINISHED(job_ptr)) + if (IS_JOB_FINISHED(job_ptr)) { + if (job_ptr->exit_code == 0) + job_ptr->exit_code = job_return_code; return ESLURM_ALREADY_DONE; + } if ((job_ptr->user_id != uid) && !validate_slurm_user(uid)) { error("Security violation, JOB_COMPLETE RPC for job %u " diff --git a/src/slurmctld/proc_req.c b/src/slurmctld/proc_req.c index 6feb3336a7fb3d94a5daa2c912ddd931f860b09d..0baa011c82a8e9fa60ac86a40814248091dae83a 100644 --- a/src/slurmctld/proc_req.c +++ b/src/slurmctld/proc_req.c @@ -1924,9 +1924,9 @@ static void _slurm_rpc_complete_batch_script(slurm_msg_t * msg) /* return result */ if (error_code) { - info("_slurm_rpc_complete_batch_script JobId=%u: %s ", - comp_msg->job_id, - slurm_strerror(error_code)); + debug2("_slurm_rpc_complete_batch_script JobId=%u: %s ", + comp_msg->job_id, + slurm_strerror(error_code)); slurm_send_rc_msg(msg, error_code); } else { debug2("_slurm_rpc_complete_batch_script JobId=%u %s",