Skip to content
Snippets Groups Projects
Commit 70b5330a authored by Moe Jette's avatar Moe Jette
Browse files

Add an error code for overlapping reservations

parent 32b8f2ee
No related branches found
No related tags found
No related merge requests found
......@@ -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,
......
......@@ -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 */
......
......@@ -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);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment