Skip to content

Commit fd1101c

Browse files
Remove the ban of using p4d as head node
Signed-off-by: Hanwen <hanwenli@amazon.com>
1 parent 4b016ad commit fd1101c

File tree

5 files changed

+4
-14
lines changed

5 files changed

+4
-14
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ CHANGELOG
2121
- Use inclusive language in user facing messages and internal naming convention.
2222
- Change the default of instance types from the hardcoded `t2.micro` to the free tier instance type
2323
(`t2.micro` or `t3.micro` dependent on region). In regions without free tier, the default is `t3.micro`.
24+
- Allow P4d as head node. (P4d was already supported as compute node in 2.10.0)
2425

2526

2627
**BUG FIXES**

cli/src/pcluster/config/validators.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@
7777
"sc1": (500, 16 * 1024),
7878
}
7979

80-
HEAD_NODE_UNSUPPORTED_INSTANCE_TYPES = ["p4d.24xlarge"]
80+
HEAD_NODE_UNSUPPORTED_INSTANCE_TYPES = []
8181
HEAD_NODE_UNSUPPORTED_MESSAGE = "The instance type '{0}' is not supported as head node."
8282

8383
# Constants for section labels

cli/tests/pcluster/config/test_validators.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -87,9 +87,7 @@ def test_ec2_instance_type_validator(mocker, instance_type, expected_message):
8787
utils.assert_param_validator(mocker, config_parser_dict, expected_message)
8888

8989

90-
@pytest.mark.parametrize(
91-
"instance_type, expected_message", [("t2.micro", None), ("c4.xlarge", None), ("p4d.24xlarge", "is not supported")]
92-
)
90+
@pytest.mark.parametrize("instance_type, expected_message", [("t2.micro", None), ("c4.xlarge", None)])
9391
def test_head_node_instance_type_validator(mocker, instance_type, expected_message):
9492
config_parser_dict = {"cluster default": {"master_instance_type": instance_type}}
9593
utils.assert_param_validator(mocker, config_parser_dict, expected_message)

cli/tests/pcluster/configure/test_pcluster_configure.py

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -914,12 +914,3 @@ def test_hit_config_file(mocker, capsys, test_datadir):
914914
# Expected sys exit with error
915915
with pytest.raises(SystemExit, match="ERROR: Configuration in file .* cannot be overwritten"):
916916
_run_configuration(mocker, old_config_file, with_config=True)
917-
918-
919-
def test_invalid_p4d_head_node_type(mocker):
920-
with pytest.raises(StopIteration):
921-
assert_that(general_wrapper_for_prompt_testing(mocker, head_node_instance="p4d.24xlarge")).is_true()
922-
923-
924-
def test_valid_p4d_compute_node_type(mocker):
925-
assert_that(general_wrapper_for_prompt_testing(mocker, compute_instance="p4d.24xlarge")).is_true()

tests/integration-tests/tests/multiple_nics/test_multiple_nics/test_multiple_nics/pcluster.config.ini

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ cluster_template = default
88
base_os = {{ os }}
99
key_name = {{ key_name }}
1010
scheduler = {{ scheduler }}
11-
master_instance_type = c5.xlarge
11+
master_instance_type = {{ instance }}
1212
compute_instance_type = {{ instance }}
1313
initial_queue_size = 1
1414
maintain_initial_size = true

0 commit comments

Comments
 (0)