Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SlurmGCP. Specify provisioning_model for dense reservations. #3313

Merged
merged 1 commit into from
Nov 27, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,9 @@ def instance_properties(nodeset:object, model:str, placement_group:Optional[str]
"values": [reservation.bulk_insert_name],
}

if reservation.deployment_type == "DENSE":
props.scheduling.provisioning_model = "RESERVATION_BOUND"

if reservation.policies:
props.scheduling.onHostMaintenance = "TERMINATE"
props.resourcePolicies = reservation.policies
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -173,6 +173,7 @@ def test_nodeset_reservation_err(nodeset, err):
zone="eine",
name="robin",
policies=[],
deployment_type=None,
bulk_insert_name="projects/bobin/reservations/robin")),
(TstNodeset(
reservation_name="projects/bobin/reservations/robin",
Expand All @@ -183,6 +184,7 @@ def test_nodeset_reservation_err(nodeset, err):
zone="eine",
name="robin",
policies=["wanders", "apples", "yum"],
deployment_type=None,
bulk_insert_name="projects/bobin/reservations/robin")),
(TstNodeset(
reservation_name="projects/bobin/reservations/robin/snek/cheese-brie-6",
Expand All @@ -193,6 +195,7 @@ def test_nodeset_reservation_err(nodeset, err):
zone="eine",
name="robin",
policies=[],
deployment_type=None,
bulk_insert_name="projects/bobin/reservations/robin/snek/cheese-brie-6")),

])
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1460,6 +1460,7 @@ class ReservationDetails:
name: str
policies: List[str] # names (not URLs) of resource policies
bulk_insert_name: str # name in format suitable for bulk insert (currently identical to user supplied name in long format)
deployment_type: Optional[str]

@dataclass
class Job:
Expand Down Expand Up @@ -1792,6 +1793,7 @@ def nodeset_reservation(self, nodeset: object) -> Optional[ReservationDetails]:
zone=zone,
name=name,
policies=policies,
deployment_type=reservation.get("deploymentType"),
bulk_insert_name=nodeset.reservation_name)

@lru_cache(maxsize=1)
Expand Down