Skip to content

Commit cd7c2fd

Browse files
chenwanytilne
authored andcommitted
Change validator to unblock io2 Block Express Volume
Modify the iops and size range ro unblock user create io2 Block Express volume Signed-off-by: chenwany <[email protected]>
1 parent c9e279e commit cd7c2fd

File tree

2 files changed

+12
-12
lines changed

2 files changed

+12
-12
lines changed

cli/src/pcluster/config/validators.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@
7676
EBS_VOLUME_TYPE_TO_VOLUME_SIZE_BOUNDS = {
7777
"standard": (1, 1024),
7878
"io1": (4, 16 * 1024),
79-
"io2": (4, 16 * 1024),
79+
"io2": (4, 64 * 1024),
8080
"gp2": (1, 16 * 1024),
8181
"gp3": (1, 16 * 1024),
8282
"st1": (500, 16 * 1024),
@@ -85,7 +85,7 @@
8585

8686
EBS_VOLUME_IOPS_BOUNDS = {
8787
"io1": (100, 64000),
88-
"io2": (100, 64000),
88+
"io2": (100, 256000),
8989
"gp3": (3000, 16000),
9090
}
9191

@@ -1360,7 +1360,7 @@ def ebs_volume_iops_validator(section_key, section_label, pcluster_config):
13601360
section = pcluster_config.get_section(section_key, section_label)
13611361
volume_size = section.get_param_value("volume_size")
13621362
volume_type = section.get_param_value("volume_type")
1363-
volume_type_to_iops_ratio = {"io1": 50, "io2": 500, "gp3": 500}
1363+
volume_type_to_iops_ratio = {"io1": 50, "io2": 1000, "gp3": 500}
13641364
volume_iops = section.get_param_value("volume_iops")
13651365

13661366
if volume_type in EBS_VOLUME_IOPS_BOUNDS:

cli/tests/pcluster/config/test_validators.py

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -698,14 +698,14 @@ def test_efs_validator(mocker, section_dict, expected_message):
698698
({"volume_type": "io2", "volume_size": 20, "volume_iops": 120}, None),
699699
(
700700
{"volume_type": "io2", "volume_size": 20, "volume_iops": 90},
701-
"IOPS rate must be between 100 and 64000 when provisioning io2 volumes.",
701+
"IOPS rate must be between 100 and 256000 when provisioning io2 volumes.",
702702
),
703703
(
704-
{"volume_type": "io2", "volume_size": 20, "volume_iops": 64001},
705-
"IOPS rate must be between 100 and 64000 when provisioning io2 volumes.",
704+
{"volume_type": "io2", "volume_size": 20, "volume_iops": 256001},
705+
"IOPS rate must be between 100 and 256000 when provisioning io2 volumes.",
706706
),
707707
(
708-
{"volume_type": "io2", "volume_size": 20, "volume_iops": 10001},
708+
{"volume_type": "io2", "volume_size": 20, "volume_iops": 20001},
709709
"IOPS to volume size ratio of .* is too high",
710710
),
711711
({"volume_type": "gp3", "volume_size": 20, "volume_iops": 3000}, None),
@@ -2449,7 +2449,7 @@ def test_fsx_ignored_parameters_validator(mocker, section_dict, expected_error):
24492449
({"volume_type": "io1", "volume_size": 16385}, "The size of io1 volumes can not exceed 16384 GiB"),
24502450
({"volume_type": "io2", "volume_size": 15}, None),
24512451
({"volume_type": "io2", "volume_size": 3}, "The size of io2 volumes must be at least 4 GiB"),
2452-
({"volume_type": "io2", "volume_size": 16385}, "The size of io2 volumes can not exceed 16384 GiB"),
2452+
({"volume_type": "io2", "volume_size": 65537}, "The size of io2 volumes can not exceed 65536 GiB"),
24532453
({"volume_type": "gp2", "volume_size": 15}, None),
24542454
({"volume_type": "gp2", "volume_size": 0}, "The size of gp2 volumes must be at least 1 GiB"),
24552455
({"volume_type": "gp2", "volume_size": 16385}, "The size of gp2 volumes can not exceed 16384 GiB"),
@@ -2493,14 +2493,14 @@ def test_ebs_allowed_values_all_have_volume_size_bounds():
24932493
({"volume_type": "io2", "volume_size": 20, "volume_iops": 120}, None),
24942494
(
24952495
{"volume_type": "io2", "volume_size": 20, "volume_iops": 90},
2496-
"IOPS rate must be between 100 and 64000 when provisioning io2 volumes.",
2496+
"IOPS rate must be between 100 and 256000 when provisioning io2 volumes.",
24972497
),
24982498
(
2499-
{"volume_type": "io2", "volume_size": 20, "volume_iops": 64001},
2500-
"IOPS rate must be between 100 and 64000 when provisioning io2 volumes.",
2499+
{"volume_type": "io2", "volume_size": 20, "volume_iops": 256001},
2500+
"IOPS rate must be between 100 and 256000 when provisioning io2 volumes.",
25012501
),
25022502
(
2503-
{"volume_type": "io2", "volume_size": 20, "volume_iops": 10001},
2503+
{"volume_type": "io2", "volume_size": 20, "volume_iops": 20001},
25042504
"IOPS to volume size ratio of .* is too high",
25052505
),
25062506
({"volume_type": "gp3", "volume_size": 20, "volume_iops": 3000}, None),

0 commit comments

Comments
 (0)