diff --git a/doc/man/man1/scontrol.1 b/doc/man/man1/scontrol.1 index 1f0fab9b918d8a7237d6c0049c268cd4ce23741c..14516aae39ae70fdaace47e98d31b69707206982 100644 --- a/doc/man/man1/scontrol.1 +++ b/doc/man/man1/scontrol.1 @@ -1252,7 +1252,8 @@ give times like \fInow + count time\-units\fR, where the time\-units can be \fIminutes\fR, \fIhours\fR, \fIdays\fR, or \fIweeks\fR and you can tell SLURM to run the job today with the keyword \fItoday\fR and to run the job tomorrow with the keyword -\fItomorrow\fR. +\fItomorrow\fR. You cannot update the \fIStartTime\fP of a reservation +in \fIACTIVE\fP state. .TP \fIEndTime\fP=<time_spec> diff --git a/src/slurmctld/reservation.c b/src/slurmctld/reservation.c index 41151c67301ea5a9bf7970018ffcbeead54f5f1c..a5c8560079e1fbaf8576d05b0b62fd68e03ff0cc 100644 --- a/src/slurmctld/reservation.c +++ b/src/slurmctld/reservation.c @@ -2160,6 +2160,11 @@ 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; + goto update_failure; + } if (resv_desc_ptr->start_time < (now - 60)) { info("Reservation request has invalid start time"); error_code = ESLURM_INVALID_TIME_VALUE;