diff --git a/slurm/slurm_errno.h b/slurm/slurm_errno.h index f1dc2164ef785f1d2e991783829cbfc1422f297d..ebec2ee2790557064e54d3486ae7c029bd48799c 100644 --- a/slurm/slurm_errno.h +++ b/slurm/slurm_errno.h @@ -166,6 +166,7 @@ enum { ESLURM_RESERVATION_BUSY, ESLURM_RESERVATION_NOT_USABLE, ESLURM_INVALID_WCKEY, + ESLURM_RESERVATION_OVERLAP, /* 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 2e94c6589c11b7ed1ff64054fb22042042a6dc4f..e49274cb03744aed7b307102de880fc1be04f2b5 100644 --- a/src/common/slurm_errno.c +++ b/src/common/slurm_errno.c @@ -234,6 +234,8 @@ static slurm_errtab_t slurm_errtab[] = { "Requested reservation is in use" }, { ESLURM_RESERVATION_NOT_USABLE, "Requested reservation not usable now" }, + { ESLURM_RESERVATION_OVERLAP, + "Requested reservation overlaps with another reservation" }, /* slurmd error codes */ diff --git a/src/slurmctld/reservation.c b/src/slurmctld/reservation.c index 87a9275c95669ca9f35bfde33fba2abede728fd3..94ac02c4b48ecb1739a9963db6ce1bc0e4f0a3c9 100644 --- a/src/slurmctld/reservation.c +++ b/src/slurmctld/reservation.c @@ -900,7 +900,7 @@ extern int create_resv(reserve_request_msg_t *resv_desc_ptr) resv_desc_ptr->flags, node_bitmap, NULL)) { info("Reservation requestion overlaps another"); - rc = ESLURM_INVALID_TIME_VALUE; + rc = ESLURM_RESERVATION_OVERLAP; goto bad_parse; } resv_desc_ptr->node_cnt = bit_set_count(node_bitmap); @@ -1132,7 +1132,7 @@ extern int update_resv(reserve_request_msg_t *resv_desc_ptr) if (_resv_overlap(resv_ptr->start_time, resv_ptr->end_time, resv_ptr->flags, resv_ptr->node_bitmap, resv_ptr)) { info("Reservation requestion overlaps another"); - error_code = ESLURM_INVALID_TIME_VALUE; + error_code = ESLURM_RESERVATION_OVERLAP; goto update_failure; } _set_cpu_cnt(resv_ptr);