diff --git a/NEWS b/NEWS index 59133651ede05a9dbf15a4d0937e327ef7664e0b..6ad438ffbbd69c1222eb49edb3c2459b642c2254 100644 --- a/NEWS +++ b/NEWS @@ -14,6 +14,9 @@ documents those changes that are of interest to users and admins. -- BLUEGENE - updated documentation. -- Close the batch job's environment file when it contains no data to avoid leaking file descriptors. + -- Fix sbcast's credential to last till the end of a job instead of the + previous 20 minute time limit. The previous behavior would fail for + large files 20 minutes into the transfer. * Changes in SLURM 2.4.2 ======================== diff --git a/src/common/slurm_cred.c b/src/common/slurm_cred.c index 0b278915b48388d9e73b071b571d463b4ecbb598..55b68819ef35a821ef74436039e20f1ef37670ba 100644 --- a/src/common/slurm_cred.c +++ b/src/common/slurm_cred.c @@ -2177,7 +2177,8 @@ static void _pack_sbcast_cred(sbcast_cred_t *sbcast_cred, Buf buffer) * including digital signature. * RET the sbcast credential or NULL on error */ sbcast_cred_t *create_sbcast_cred(slurm_cred_ctx_t ctx, - uint32_t job_id, char *nodes) + uint32_t job_id, char *nodes, + time_t expiration) { Buf buffer; int rc; @@ -2190,7 +2191,7 @@ sbcast_cred_t *create_sbcast_cred(slurm_cred_ctx_t ctx, sbcast_cred = xmalloc(sizeof(struct sbcast_cred)); sbcast_cred->ctime = now; - sbcast_cred->expiration = now + DEFAULT_EXPIRATION_WINDOW; + sbcast_cred->expiration = expiration; sbcast_cred->jobid = job_id; sbcast_cred->nodes = xstrdup(nodes); @@ -2371,4 +2372,5 @@ void print_sbcast_cred(sbcast_cred_t *sbcast_cred) info("Sbcast_cred: Jobid %u", sbcast_cred->jobid ); info("Sbcast_cred: Nodes %s", sbcast_cred->nodes ); info("Sbcast_cred: ctime %s", ctime(&sbcast_cred->ctime) ); + info("Sbcast_cred: Expire %s", ctime(&sbcast_cred->expiration) ); } diff --git a/src/common/slurm_cred.h b/src/common/slurm_cred.h index f77caaa46b4f664fb841c8a5d91b27319d19bec7..98312da3ec1cf7e9e839337f80fdb4584aed22df 100644 --- a/src/common/slurm_cred.h +++ b/src/common/slurm_cred.h @@ -337,7 +337,8 @@ void slurm_cred_print(slurm_cred_t *cred); * Caller of extract_sbcast_cred() must xfree returned node string */ sbcast_cred_t *create_sbcast_cred(slurm_cred_ctx_t ctx, - uint32_t job_id, char *nodes); + uint32_t job_id, char *nodes, + time_t expiration); sbcast_cred_t *copy_sbcast_cred(sbcast_cred_t *sbcast_cred); void delete_sbcast_cred(sbcast_cred_t *sbcast_cred); int extract_sbcast_cred(slurm_cred_ctx_t ctx, diff --git a/src/slurmctld/proc_req.c b/src/slurmctld/proc_req.c index 45c7e8aed1b0dc3d0ee069fb7c466b184aaaea50..6483c3f28ceb290c995ba3674b0208d5dfdac65c 100644 --- a/src/slurmctld/proc_req.c +++ b/src/slurmctld/proc_req.c @@ -2139,9 +2139,11 @@ static void _slurm_rpc_job_sbcast_cred(slurm_msg_t * msg) job_info_msg->job_id, uid, slurm_strerror(error_code)); slurm_send_rc_msg(msg, error_code); - } else if ((sbcast_cred = create_sbcast_cred(slurmctld_config.cred_ctx, - job_ptr->job_id, - job_ptr->nodes)) == NULL){ + } else if ((sbcast_cred = + create_sbcast_cred(slurmctld_config.cred_ctx, + job_ptr->job_id, + job_ptr->nodes, + job_ptr->end_time)) == NULL){ unlock_slurmctld(job_read_lock); error("_slurm_rpc_job_sbcast_cred JobId=%u cred create error", job_info_msg->job_id);