Skip to content

Commit 133517d

Browse files
committed
[Storage] Set EBS root volume size to 45GB in ADC as we recently increased the AMI volume size.
This is required only in ADC because in these regions the root volume must be explicitly set. In Commercial regions instead, it is inherited from the AMI volume size.
1 parent 2ddeaa1 commit 133517d

File tree

2 files changed

+7
-6
lines changed

2 files changed

+7
-6
lines changed

cli/src/pcluster/config/cluster_config.py

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@
4747
DEFAULT_MIN_COUNT,
4848
DELETE_POLICY,
4949
DETAILED_MONITORING_ENABLED_DEFAULT,
50+
EBS_ROOT_VOLUME_SIZE_DEFAULT,
5051
EBS_VOLUME_SIZE_DEFAULT,
5152
EBS_VOLUME_TYPE_DEFAULT,
5253
EBS_VOLUME_TYPE_IOPS_DEFAULT,
@@ -256,12 +257,10 @@ def __init__(self, size: int = None, delete_on_termination: bool = None, **kwarg
256257
super().__init__(**kwargs)
257258
# When the RootVolume size is None, EC2 implicitly sets it as the AMI size.
258259
# In US Isolated regions, the root volume size cannot be left unspecified,
259-
# so we consider it as the default EBS volume size.
260-
# In theory, the default value should be maximum between the default EBS volume size (35GB) and the AMI size,
261-
# but in US Isolated region this is fine because the only supported AMI as of 2023 Feb
262-
# is the official ParallelCluster AMI for Amazon Linux 2, which has size equal to
263-
# the default EBS volume size (35GB).
264-
self.size = Resource.init_param(size, EBS_VOLUME_SIZE_DEFAULT if get_region().startswith("us-iso") else None)
260+
# so we consider it as the default EBS root volume size.
261+
self.size = Resource.init_param(
262+
size, EBS_ROOT_VOLUME_SIZE_DEFAULT if get_region().startswith("us-iso") else None
263+
)
265264
# The default delete_on_termination takes effect both on head and compute nodes.
266265
# If the default of the head node is to be changed, please separate this class for different defaults.
267266
self.delete_on_termination = Resource.init_param(delete_on_termination, default=True)

cli/src/pcluster/constants.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -126,6 +126,8 @@
126126
"gp3": 3000,
127127
}
128128
EBS_VOLUME_SIZE_DEFAULT = 40
129+
# This value must be greater than or equal to the AMI volume size
130+
EBS_ROOT_VOLUME_SIZE_DEFAULT = 45
129131
EBS_VOLUME_TYPE_DEFAULT = "gp3"
130132

131133
DEFAULT_MAX_COUNT = 10

0 commit comments

Comments
 (0)