From db69e0cfee10d31a2599a0d6c7c2e9388f25ff0a Mon Sep 17 00:00:00 2001 From: abbas1902 Date: Wed, 8 Jan 2025 16:45:43 +0000 Subject: [PATCH] Remove provisioningModel from future reservations --- .../modules/slurm_files/scripts/resume.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/community/modules/scheduler/schedmd-slurm-gcp-v6-controller/modules/slurm_files/scripts/resume.py b/community/modules/scheduler/schedmd-slurm-gcp-v6-controller/modules/slurm_files/scripts/resume.py index de2b358882..d434ad6d8e 100755 --- a/community/modules/scheduler/schedmd-slurm-gcp-v6-controller/modules/slurm_files/scripts/resume.py +++ b/community/modules/scheduler/schedmd-slurm-gcp-v6-controller/modules/slurm_files/scripts/resume.py @@ -102,10 +102,10 @@ def instance_properties(nodeset:object, model:str, placement_group:Optional[str] props.resourcePolicies = [placement_group] if reservation := lookup().nodeset_reservation(nodeset): - update_reservation_props(reservation, props, placement_group, False) + update_reservation_props(reservation, props, placement_group) if (fr := lookup().future_reservation(nodeset)) and fr.specific: - update_reservation_props(fr.active_reservation, props, placement_group, True) + update_reservation_props(fr.active_reservation, props, placement_group) if props.resourcePolicies: props.scheduling.onHostMaintenance = "TERMINATE" @@ -120,14 +120,14 @@ def instance_properties(nodeset:object, model:str, placement_group:Optional[str] props.update(nodeset.get("instance_properties") or {}) return props -def update_reservation_props(reservation:object, props:object, placement_group:Optional[str], reservation_from_fr:bool) -> None: +def update_reservation_props(reservation:object, props:object, placement_group:Optional[str]) -> None: props.reservationAffinity = { "consumeReservationType": "SPECIFIC_RESERVATION", "key": f"compute.{util.universe_domain()}/reservation-name", "values": [reservation.bulk_insert_name], } - if reservation.dense or reservation_from_fr: + if reservation.dense: props.scheduling.provisioningModel = "RESERVATION_BOUND" # Figure out `resourcePolicies`