-
Notifications
You must be signed in to change notification settings - Fork 314
[Subnet Prioritization] Support capacity-optimized-prioritized and prioritized Allocation Strategy #6865
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
base: develop
Are you sure you want to change the base?
Conversation
…d to AllocationStrategy configuration; Add new configuration of enable_single_availability_zone; Signed-off-by: Hanxuan Zhang <hanxuanz@amazon.com>
… enable_single_availability_zone
…nfig.cluster_config to pcluster.config.common
…ingle_availability_zone
…fig.py to common.py
…ster_config.py to common.py" This reverts commit 13d8cfa.
…dator in cluster_config.py and add registration tests
…ility_zone from False to None
… to slurm.full_config.snapshot.yaml
@@ -3179,6 +3191,11 @@ def _register_validators(self, context: ValidatorContext = None): # noqa: C901 | |||
] | |||
for validator in flexible_instance_types_validators: | |||
self._register_validator(validator, **validator_args) | |||
self._register_validator( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why add the EnableSingleAvailabilityZoneValidator
in a loop for each compute resource when we define the Parameters to be queue Specific and do not take any values from those said Compute resources?
@@ -752,6 +751,7 @@ class SlurmQueueNetworkingSchema(QueueNetworkingSchema): | |||
PlacementGroupSchema, metadata={"update_policy": UpdatePolicy.MANAGED_PLACEMENT_GROUP} | |||
) | |||
proxy = fields.Nested(QueueProxySchema, metadata={"update_policy": UpdatePolicy.QUEUE_UPDATE_STRATEGY}) | |||
enable_single_availability_zone = fields.Bool(metadata={"update_policy": UpdatePolicy.QUEUE_UPDATE_STRATEGY}) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Did we test the use of keeping this UpdatePolicy.QUEUE_UPDATE_STRATEGY
for this paramter?
self._add_failure( | ||
f"Compute Resource {compute_resource_name} is using a SPOT CapacityType but the " | ||
f"Allocation Strategy specified is {allocation_strategy.value}. SPOT CapacityType cannot use " | ||
f"'{common.AllocationStrategy.PRIORITIZED.value}' allocation strategy.", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Perfect! However, lets follow the messaging to specify which AllocationStrategy SPOT Capacity type supports as the last line. Similar to ONDemand
@@ -219,6 +219,7 @@ Scheduling: | |||
Networking: | |||
AdditionalSecurityGroups: null | |||
AssignPublicIp: null | |||
EnableSingleAvailabilityZone: null |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we keep one of them as True?
@@ -224,6 +224,9 @@ def test_slurm_validators_are_called_with_correct_argument(test_datadir, mocker) | |||
single_instance_type_subnet_validator = mocker.patch( | |||
networking_validators + ".SingleInstanceTypeSubnetValidator._validate", return_value=[] | |||
) | |||
enable_single_availability_zone_validator = mocker.patch( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think lets test both for true and false (values) for enable_single_availability_zone and different AllocationStrategy
I would suggest to add a title to the PR too |
…eValidator registration
…tionStrategyValidator
…tor registration test
Description of changes
Tests
References
Checklist
develop
add the branch name as prefix in the PR title (e.g.[release-3.6]
).Please review the guidelines for contributing and Pull Request Instructions.
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.