Skip to content

Commit

Permalink
[Storage] Use gp3 as default EBS volume type in ADC regions.
Browse files Browse the repository at this point in the history
  • Loading branch information
gmarciani committed Dec 4, 2023
1 parent 2b1b4c4 commit 13e0007
Show file tree
Hide file tree
Showing 9 changed files with 15 additions and 40 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ CHANGELOG
- Add support for Python 3.10 in aws-parallelcluster-batch-cli.
- Remove `all_or_nothing_batch` resume configuration parameter, in favor of the new `scaling_strategy` parameter
that can be set using `Scheduling/ScalingStrategy` cluster configuration.
- Change default EBS volume types in ADC regions from gp2 to gp3, for both the root and additional volumes.
- The optional permissions boundary for the ParallelCluster API is now applied to every IAM role created by the API infrastructure.

**BUG FIXES**
Expand Down
3 changes: 1 addition & 2 deletions cli/src/pcluster/config/cluster_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@
DETAILED_MONITORING_ENABLED_DEFAULT,
EBS_VOLUME_SIZE_DEFAULT,
EBS_VOLUME_TYPE_DEFAULT,
EBS_VOLUME_TYPE_DEFAULT_US_ISO,
EBS_VOLUME_TYPE_IOPS_DEFAULT,
FEATURE_REQUIRING_ADDITION_BOOTSTRAP_TIME,
FEATURE_REQUIRING_ADDITION_SPACE,
Expand Down Expand Up @@ -220,7 +219,7 @@ def __init__(
self.encrypted = Resource.init_param(encrypted, default=True)
self.volume_type = Resource.init_param(
volume_type,
default=EBS_VOLUME_TYPE_DEFAULT_US_ISO if get_region().startswith("us-iso") else EBS_VOLUME_TYPE_DEFAULT,
default=EBS_VOLUME_TYPE_DEFAULT,
)
self.iops = Resource.init_param(iops, default=EBS_VOLUME_TYPE_IOPS_DEFAULT.get(self.volume_type))
self.throughput = Resource.init_param(throughput, default=125 if self.volume_type == "gp3" else None)
Expand Down
1 change: 0 additions & 1 deletion cli/src/pcluster/constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,6 @@
}
EBS_VOLUME_SIZE_DEFAULT = 40
EBS_VOLUME_TYPE_DEFAULT = "gp3"
EBS_VOLUME_TYPE_DEFAULT_US_ISO = "gp2"

DEFAULT_MAX_COUNT = 10
DEFAULT_MIN_COUNT = 0
Expand Down
16 changes: 8 additions & 8 deletions cli/tests/pcluster/config/test_cluster_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -568,8 +568,8 @@ def test_get_enabled_health_checks_section(self, queue_parameters, expected_resu
@pytest.mark.parametrize(
"region, expected_volume_type",
[
("us-iso-WHATEVER", "gp2"),
("us-isob-WHATEVER", "gp2"),
("us-iso-WHATEVER", "gp3"),
("us-isob-WHATEVER", "gp3"),
("WHATEVER_ELSE_REGION", "gp3"),
],
)
Expand All @@ -587,8 +587,8 @@ def test_head_node_root_volume(self, mocker, region, expected_volume_type):
@pytest.mark.parametrize(
"region, expected_volume_type",
[
("us-iso-WHATEVER", "gp2"),
("us-isob-WHATEVER", "gp2"),
("us-iso-WHATEVER", "gp3"),
("us-isob-WHATEVER", "gp3"),
("WHATEVER_ELSE_REGION", "gp3"),
],
)
Expand Down Expand Up @@ -727,8 +727,8 @@ class TestSharedEbs:
@pytest.mark.parametrize(
"region, expected_volume_type",
[
("us-iso-WHATEVER", "gp2"),
("us-isob-WHATEVER", "gp2"),
("us-iso-WHATEVER", "gp3"),
("us-isob-WHATEVER", "gp3"),
("WHATEVER_ELSE_REGION", "gp3"),
],
)
Expand All @@ -744,8 +744,8 @@ class TestEbs:
@pytest.mark.parametrize(
"region, expected_volume_type",
[
("us-iso-WHATEVER", "gp2"),
("us-isob-WHATEVER", "gp2"),
("us-iso-WHATEVER", "gp3"),
("us-isob-WHATEVER", "gp3"),
("WHATEVER_ELSE_REGION", "gp3"),
],
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,9 @@ HeadNode:
LocalStorage:
RootVolume:
Encrypted: false # Test turning off root volume encryption
{% if "-iso" in region %}
VolumeType: gp2
{% else %}
VolumeType: gp3
Throughput: 135
Iops: 3400
{% endif %}
Imds:
Secured: {{ imds_secured }}
Scheduling:
Expand All @@ -38,13 +34,9 @@ Scheduling:
LocalStorage:
RootVolume:
Encrypted: false # Test turning off root volume encryption
{% if "-iso" in region %}
VolumeType: gp2
{% else %}
VolumeType: gp3
Throughput: 130
Iops: 3200
{% endif %}
{% endif %}
ComputeResources:
- Name: compute-resource-0
Expand All @@ -67,13 +59,9 @@ Scheduling:
LocalStorage:
RootVolume:
Encrypted: false
{% if "-iso" in region %}
VolumeType: gp2
{% else %}
VolumeType: gp3
Throughput: 130
Iops: 3200
{% endif %}
ComputeResources:
- Name: compute-resource-0
Instances:
Expand All @@ -91,13 +79,9 @@ SharedStorage:
EbsSettings:
Size: {{ volume_sizes[0] }}
Encrypted: true
{% if "-iso" in region %}
VolumeType: gp2
{% else %}
VolumeType: gp3
Throughput: 130
Iops: 3200
{% endif %}
- MountDir: {{ mount_dirs[1] }}
Name: ebs2
StorageType: Ebs
Expand All @@ -111,7 +95,7 @@ SharedStorage:
EbsSettings:
Size: {{ volume_sizes[2] }}
{% if "-iso" in region %}
VolumeType: gp2
VolumeType: gp3
{% else %}
VolumeType: io2
Iops: 150
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ SharedStorage:
Name: /manage-ebs
StorageType: Ebs
EbsSettings:
VolumeType: {% if "-iso" in region %}gp2{% else %}gp3{% endif %}
VolumeType: gp3
DeletionPolicy: {{ new_ebs_deletion_policy }}
- MountDir: {{ existing_ebs_mount_dir }}
Name: existing_ebs
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ SharedStorage:
Name: {{ new_ebs_mount_dir }}
StorageType: Ebs
EbsSettings:
VolumeType: {% if "-iso" in region %}gp2{% else %}gp3{% endif %}
VolumeType: gp3
DeletionPolicy: Delete
- MountDir: {{ problematic_ebs_mount_dir }}
Name: {{ problematic_ebs_mount_dir }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -145,27 +145,19 @@ SharedStorage:
StorageType: Ebs
Name: raid
EbsSettings:
{% if "-iso" in region %}
VolumeType: gp2
{% else %}
VolumeType: gp3
Iops: 3200 # New parameter
Throughput: 130 # New parameter
{% endif %}
Raid:
Type: 0
NumberOfVolumes: 2
- MountDir: shared
Name: ebs
StorageType: Ebs
EbsSettings:
{% if "-iso" in region %}
VolumeType: gp2
{% else %}
VolumeType: gp3
Iops: 3200 # New parameter
Throughput: 130 # New parameter
{% endif %}
- MountDir: efs
Name: efs
StorageType: Efs
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ SharedStorage:
Name: ebs
StorageType: Ebs
EbsSettings:
VolumeType: {% if "-iso" in region %}gp2{% else %}gp3{% endif %}
VolumeType: gp3
# Iops: 3200 #Initially not set
# Throughput: 130 #Initially not set
- MountDir: efs
Expand All @@ -97,7 +97,7 @@ SharedStorage:
StorageType: Ebs
Name: raid
EbsSettings:
VolumeType: {% if "-iso" in region %}gp2{% else %}gp3{% endif %}
VolumeType: gp3
# Iops: 3200 #Initially not set
# Throughput: 130 #Initially not set
Raid:
Expand Down

0 comments on commit 13e0007

Please sign in to comment.