diff --git a/NEWS b/NEWS index 2b5d7926abce691439fa215b6af1bb5693c41bb7..dfddfef37dba45476eda8e75eeea83b4f8e31d05 100644 --- a/NEWS +++ b/NEWS @@ -87,6 +87,7 @@ documents those changes that are of interest to users and administrators. -- Fix for CPU binding for job steps run under a batch job. -- Fix 'flags' variable to be 32 bit from the old 16 bit value in the perl api. -- Export sched_nodes for a job in the perl api. + -- Improve error output when updating a reservation that has already started. * Changes in Slurm 17.02.0 ========================== diff --git a/slurm/slurm_errno.h b/slurm/slurm_errno.h index 9f6e5feec34ce9d92d8da85f7c5e608f088c52dd..95dc6ad3b97c5827757dd374cd9ffa78661049af 100644 --- a/slurm/slurm_errno.h +++ b/slurm/slurm_errno.h @@ -192,6 +192,7 @@ enum { ESLURM_PARTITION_DOWN, ESLURM_DUPLICATE_GRES, ESLURM_JOB_SETTING_DB_INX, + ESLURM_RSV_ALREADY_STARTED, /* switch specific error codes, specific values defined in plugin module */ ESLURM_SWITCH_MIN = 3000, diff --git a/src/common/slurm_errno.c b/src/common/slurm_errno.c index 2ed0f0d6cdaf97997aecf96a7a2dace5b437a1d4..ed472e87d16571329802217c38dff3f56fca02bf 100644 --- a/src/common/slurm_errno.c +++ b/src/common/slurm_errno.c @@ -331,6 +331,8 @@ static slurm_errtab_t slurm_errtab[] = { "Duplicate generic resource (gres) specification" }, { ESLURM_JOB_SETTING_DB_INX, "Job update not available right now, the DB index is being set, try again in a bit" }, + { ESLURM_RSV_ALREADY_STARTED, + "Reservation already started" }, /* slurmd error codes */ { ESLRUMD_PIPE_ERROR_ON_TASK_SPAWN, diff --git a/src/slurmctld/reservation.c b/src/slurmctld/reservation.c index 306d39dd4ef96e76d2a1d574ecf148ed3703fb47..6bbc0820d7f3caa9130a43539c87be4626dd5b48 100644 --- a/src/slurmctld/reservation.c +++ b/src/slurmctld/reservation.c @@ -2661,7 +2661,7 @@ extern int update_resv(resv_desc_msg_t *resv_desc_ptr) if (resv_desc_ptr->start_time != (time_t) NO_VAL) { if (resv_ptr->start_time <= time(NULL)) { info("%s: reservation already started", __func__); - error_code = ESLURM_INVALID_TIME_VALUE; + error_code = ESLURM_RSV_ALREADY_STARTED; goto update_failure; } if (resv_desc_ptr->start_time < (now - 60)) {