Skip to content

Commit

Permalink
test c5n.18xlarge sporadic cluster creation failure
Browse files Browse the repository at this point in the history
Signed-off-by: Hanwen <[email protected]>
  • Loading branch information
hanwen-cluster committed Jul 21, 2023
1 parent 30ff88b commit 8b8fef4
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 27 deletions.
28 changes: 4 additions & 24 deletions tests/integration-tests/tests/create/test_create.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,37 +84,17 @@ def test_create_wrong_pcluster_version(
assert_that(cluster.creation_response.get("failures")).is_equal_to(expected_failures)


@pytest.mark.usefixtures("instance", "scheduler")
@pytest.mark.parametrize(
"imds_secured, users_allow_list",
[
(True, {"root": True, "pcluster-admin": True, "slurm": False}),
(False, {"root": True, "pcluster-admin": True, "slurm": True}),
],
)
@pytest.mark.usefixtures("instance", "scheduler", "os", "region")
def test_create_imds_secured(
imds_secured, users_allow_list, region, os, pcluster_config_reader, clusters_factory, architecture
pcluster_config_reader, clusters_factory
):
"""
Test IMDS access with different configurations.
In particular, it also verifies that IMDS access is preserved on instance reboot.
Also checks that the cluster instances respect the desired ImdsSupport setting.
"""
cluster_config = pcluster_config_reader(imds_secured=imds_secured)
cluster = clusters_factory(cluster_config, raise_on_error=True)
status = "required"

logging.info("Checking cluster access after cluster creation")
assert_head_node_is_running(region, cluster)
assert_aws_identity_access_is_correct(cluster, users_allow_list)
assert_cluster_imds_v2_requirement_status(region, cluster, status)

reboot_head_node(cluster)

logging.info("Checking cluster access after head node reboot")
assert_head_node_is_running(region, cluster)
assert_aws_identity_access_is_correct(cluster, users_allow_list)
assert_cluster_imds_v2_requirement_status(region, cluster, status)
cluster_config = pcluster_config_reader()
clusters_factory(cluster_config, raise_on_error=True)


@pytest.mark.usefixtures("instance", "os", "scheduler")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,9 @@ HeadNode:
SubnetId: {{ public_subnet_id }}
Ssh:
KeyName: {{ key_name }}
Imds:
Secured: {{ imds_secured }}
Scheduling:
Scheduler: {{ scheduler }}
{% if scheduler == "awsbatch" %}AwsBatchQueues:{% else %}SlurmQueues:{% endif %}
SlurmQueues:
- Name: compute
ComputeResources:
- Name: compute-i1
Expand Down

0 comments on commit 8b8fef4

Please sign in to comment.