forked from aws/aws-parallelcluster
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Integ-test] test slurm with custom partitions
This new test do the following checks: 1. pcluster nodes in custom partition are not brought down when the partition is set to inactive 2. cluster recovers without over-scaling after terminating EC2 instances of static nodes belonging to multiple partition 3. protected mode only manages pcluster partitions 4. pcluster stop/start only manages pcluster partitions Signed-off-by: Hanwen <[email protected]>
- Loading branch information
1 parent
e9d1ac3
commit 5acfd02
Showing
4 changed files
with
195 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
50 changes: 50 additions & 0 deletions
50
...ation-tests/tests/schedulers/test_slurm/test_slurm_custom_partitions/pcluster.config.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
Image: | ||
Os: {{ os }} | ||
HeadNode: | ||
InstanceType: {{ instance }} | ||
Networking: | ||
SubnetId: {{ public_subnet_id }} | ||
Ssh: | ||
KeyName: {{ key_name }} | ||
Scheduling: | ||
Scheduler: {{ scheduler }} | ||
SlurmSettings: | ||
CustomSlurmSettings: | ||
- NodeSet: nodeset | ||
Nodes: "ondemand1-st-ondemand1-i1-[1-2],ondemand2-dy-ondemand2-c5large-[1-10]" | ||
- PartitionName: CustomerPartition1 | ||
Nodes: nodeset | ||
- PartitionName: CustomerPartition2 | ||
Nodes: nodeset | ||
SlurmQueues: | ||
- Name: ondemand1 | ||
Networking: | ||
SubnetIds: | ||
- {{ private_subnet_id }} | ||
ComputeResources: | ||
- Name: ondemand1-c5large | ||
Instances: | ||
- InstanceType: c5.large | ||
- Name: ondemand1-i1 | ||
Instances: | ||
- InstanceType: {{ instance }} | ||
MinCount: 2 | ||
Iam: | ||
S3Access: | ||
- BucketName: {{ bucket }} | ||
CustomActions: | ||
OnNodeStart: | ||
# pre-install script to make c5.large instance type instance has bootstrap error | ||
Script: s3://{{ bucket }}/scripts/preinstall.sh | ||
- Name: ondemand2 | ||
Networking: | ||
SubnetIds: | ||
- {{ private_subnet_id }} | ||
ComputeResources: | ||
- Name: ondemand2-c5large | ||
Instances: | ||
- InstanceType: c5.large | ||
- Name: ondemand2-i1 | ||
Instances: | ||
- InstanceType: {{ instance }} | ||
MinCount: 1 |
23 changes: 23 additions & 0 deletions
23
.../integration-tests/tests/schedulers/test_slurm/test_slurm_custom_partitions/preinstall.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
#!/bin/bash | ||
# Copyright 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"). | ||
# You may not use this file except in compliance with the License. | ||
# A copy of the License is located at | ||
# | ||
# http://aws.amazon.com/apache2.0/ | ||
# | ||
# or in the "LICENSE.txt" file accompanying this file. | ||
# This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, express or implied. | ||
# See the License for the specific language governing permissions and limitations under the License. | ||
function get_instance_type() { | ||
token=$(curl -s -X PUT "http://169.254.169.254/latest/api/token" -H "X-aws-ec2-metadata-token-ttl-seconds: 300") | ||
instance_type_url="http://169.254.169.254/latest/meta-data/instance-type" | ||
instance_type=$(curl --retry 3 --retry-delay 0 --silent --fail -H "X-aws-ec2-metadata-token: ${token}" "${instance_type_url}") | ||
} | ||
get_instance_type | ||
if [ "${instance_type}" == "c5.large" ]; then | ||
echo "Test Bootstrap error that causes instance to self terminate." | ||
exit 1 | ||
fi | ||
|