Skip to content

Commit 7384a16

Browse files
ODCR test
Signed-off-by: Hanwen <[email protected]>
1 parent fbca32f commit 7384a16

File tree

3 files changed

+5
-45
lines changed

3 files changed

+5
-45
lines changed

tests/integration-tests/tests/efa/test_efa.py

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -54,19 +54,8 @@ def test_efa(
5454
else:
5555
head_node_instance = "c6g.16xlarge"
5656

57-
# Post-install script to use P4d targeted ODCR
58-
bucket_name = ""
59-
if instance == "p4d.24xlarge":
60-
bucket_name = s3_bucket_factory()
61-
bucket = boto3.resource("s3", region_name=region).Bucket(bucket_name)
62-
bucket.upload_file(str(test_datadir / "run_instance_override.sh"), "run_instance_override.sh")
63-
6457
slots_per_instance = fetch_instance_slots(region, instance, multithreading_disabled=True)
65-
cluster_config = pcluster_config_reader(
66-
max_queue_size=max_queue_size,
67-
head_node_instance=head_node_instance,
68-
bucket_name=bucket_name,
69-
)
58+
cluster_config = pcluster_config_reader(max_queue_size=max_queue_size, head_node_instance=head_node_instance)
7059
cluster = clusters_factory(cluster_config)
7160
remote_command_executor = RemoteCommandExecutor(cluster)
7261
scheduler_commands = scheduler_commands_factory(remote_command_executor)

tests/integration-tests/tests/efa/test_efa/test_efa/pcluster.config.yaml

Lines changed: 4 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -9,18 +9,6 @@ HeadNode:
99
KeyName: {{ key_name }}
1010
Imds:
1111
Secured: {{ imds_secured }}
12-
{% if instance == "p4d.24xlarge" %}
13-
Iam:
14-
# Needed to use the p4d capacity reservation
15-
AdditionalIamPolicies:
16-
- Policy: arn:aws:iam::aws:policy/AmazonEC2FullAccess
17-
S3Access:
18-
- BucketName: {{ bucket_name }}
19-
EnableWriteAccess: false
20-
CustomActions:
21-
OnNodeConfigured:
22-
Script: s3://{{ bucket_name }}/run_instance_override.sh
23-
{% endif %}
2412
Scheduling:
2513
Scheduler: {{ scheduler }}
2614
SlurmQueues:
@@ -39,6 +27,10 @@ Scheduling:
3927
Efa:
4028
Enabled: true
4129
{% if instance == "p4d.24xlarge" %}GdrSupport: true{% endif %}
30+
{% if instance == "p4d.24xlarge" %}
31+
CapacityReservationTarget:
32+
CapacityReservationId: cr-0fa65fcdbd597f551
33+
{% endif %}
4234
SharedStorage:
4335
- MountDir: /shared
4436
Name: name1

tests/integration-tests/tests/efa/test_efa/test_efa/run_instance_override.sh

Lines changed: 0 additions & 21 deletions
This file was deleted.

0 commit comments

Comments
 (0)