|
Lines 2369-2375
static int _delete_resv_internal(slurmctld_resv_t *resv_ptr)
Link Here
|
| 2369 |
} |
2369 |
} |
| 2370 |
|
2370 |
|
| 2371 |
/* Create a resource reservation */ |
2371 |
/* Create a resource reservation */ |
| 2372 |
extern int create_resv(resv_desc_msg_t *resv_desc_ptr) |
2372 |
extern int create_resv(resv_desc_msg_t *resv_desc_ptr, char **err_msg) |
| 2373 |
{ |
2373 |
{ |
| 2374 |
int i, j, rc = SLURM_SUCCESS; |
2374 |
int i, j, rc = SLURM_SUCCESS; |
| 2375 |
time_t now = time(NULL); |
2375 |
time_t now = time(NULL); |
|
Lines 2444-2455
extern int create_resv(resv_desc_msg_t *resv_desc_ptr)
Link Here
|
| 2444 |
if (resv_desc_ptr->node_list) { |
2444 |
if (resv_desc_ptr->node_list) { |
| 2445 |
info("%s: REPLACE or REPLACE_DOWN flags should be used with the NodeCnt reservation option; do not specify Nodes", |
2445 |
info("%s: REPLACE or REPLACE_DOWN flags should be used with the NodeCnt reservation option; do not specify Nodes", |
| 2446 |
__func__); |
2446 |
__func__); |
|
|
2447 |
if (err_msg) |
| 2448 |
*err_msg = xstrdup("REPLACE or REPLACE_DOWN flags should be used with the NodeCnt reservation option; do not specify Nodes"); |
| 2447 |
rc = ESLURM_INVALID_NODE_NAME; |
2449 |
rc = ESLURM_INVALID_NODE_NAME; |
| 2448 |
goto bad_parse; |
2450 |
goto bad_parse; |
| 2449 |
} |
2451 |
} |
| 2450 |
if (resv_desc_ptr->core_cnt) { |
2452 |
if (resv_desc_ptr->core_cnt) { |
| 2451 |
info("%s: REPLACE or REPLACE_DOWN flags should be used with the NodeCnt reservation option; do not specify CoreCnt", |
2453 |
info("%s: REPLACE or REPLACE_DOWN flags should be used with the NodeCnt reservation option; do not specify CoreCnt", |
| 2452 |
__func__); |
2454 |
__func__); |
|
|
2455 |
if (err_msg) |
| 2456 |
*err_msg = xstrdup("REPLACE or REPLACE_DOWN flags should be used with the NodeCnt reservation option; do not specify CoreCnt"); |
| 2453 |
rc = ESLURM_INVALID_CPU_COUNT; |
2457 |
rc = ESLURM_INVALID_CPU_COUNT; |
| 2454 |
goto bad_parse; |
2458 |
goto bad_parse; |
| 2455 |
} |
2459 |
} |
|
Lines 2460-2465
extern int create_resv(resv_desc_msg_t *resv_desc_ptr)
Link Here
|
| 2460 |
((resv_desc_ptr->flags & RESERVE_FLAG_STATIC) || |
2464 |
((resv_desc_ptr->flags & RESERVE_FLAG_STATIC) || |
| 2461 |
(resv_desc_ptr->flags & RESERVE_FLAG_MAINT))) { |
2465 |
(resv_desc_ptr->flags & RESERVE_FLAG_MAINT))) { |
| 2462 |
info("REPLACE and REPLACE_DOWN flags cannot be used with STATIC_ALLOC or MAINT flags"); |
2466 |
info("REPLACE and REPLACE_DOWN flags cannot be used with STATIC_ALLOC or MAINT flags"); |
|
|
2467 |
if (err_msg) |
| 2468 |
*err_msg = xstrdup("REPLACE and REPLACE_DOWN flags cannot be used with STATIC_ALLOC or MAINT flags"); |
| 2463 |
rc = ESLURM_NOT_SUPPORTED; |
2469 |
rc = ESLURM_NOT_SUPPORTED; |
| 2464 |
goto bad_parse; |
2470 |
goto bad_parse; |
| 2465 |
} |
2471 |
} |
|
Lines 2539-2544
extern int create_resv(resv_desc_msg_t *resv_desc_ptr)
Link Here
|
| 2539 |
if ((resv_desc_ptr->flags & RESERVE_FLAG_TIME_FLOAT) && |
2545 |
if ((resv_desc_ptr->flags & RESERVE_FLAG_TIME_FLOAT) && |
| 2540 |
(resv_desc_ptr->flags & RESERVE_REOCCURING)) { |
2546 |
(resv_desc_ptr->flags & RESERVE_REOCCURING)) { |
| 2541 |
info("Reservation request has mutually exclusive flags. Repeating floating reservations are not supported."); |
2547 |
info("Reservation request has mutually exclusive flags. Repeating floating reservations are not supported."); |
|
|
2548 |
if (err_msg) |
| 2549 |
*err_msg = xstrdup("Reservation request has mutually exclusive flags. Repeating floating reservations are not supported."); |
| 2542 |
rc = ESLURM_NOT_SUPPORTED; |
2550 |
rc = ESLURM_NOT_SUPPORTED; |
| 2543 |
goto bad_parse; |
2551 |
goto bad_parse; |
| 2544 |
} |
2552 |
} |