Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@ CHANGELOG
3.16.0
------

**CHANGES**
- The validator `ClusterNameValidator` now enforces cluster names to be limited to 40 characters when using `ExternalSlurmdbd`,
consistent with the existing limit for `Database`. This prevents runtime failures caused by MySQL's table name length limit.

**BUG FIXES**
- Fix sporadic S3 bucket (with name parallelcluster-*-v1-do-not-delete) creation failure when multiple create-cluster commands are running simultaneously in the same region.

Expand Down
4 changes: 3 additions & 1 deletion cli/src/pcluster/validators/cluster_validators.py
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,9 @@ class ClusterNameValidator(Validator):
"""Cluster name validator."""

def _validate(self, name, scheduling):
if scheduling.scheduler == "slurm" and scheduling.settings.database is not None:
if scheduling.scheduler == "slurm" and (
scheduling.settings.database is not None or scheduling.settings.external_slurmdbd is not None
):
if not re.match(PCLUSTER_NAME_REGEX % (PCLUSTER_NAME_MAX_LENGTH_SLURM_ACCOUNTING - 1), name):
self._add_failure(
(
Expand Down
20 changes: 20 additions & 0 deletions cli/tests/pcluster/validators/test_cluster_validators.py
Original file line number Diff line number Diff line change
Expand Up @@ -192,6 +192,26 @@ def test_cluster_name_validator(cluster_name, scheduling, should_trigger_error):
),
False,
),
(
"ClusterNameWith40------------------Chars",
SlurmScheduling(
queues=None,
settings=SlurmSettings(
external_slurmdbd=ExternalSlurmdbd(host="test.slurmdbd.host", port=6819),
),
),
False,
),
(
"ClusterNameWith41-------------------Chars",
SlurmScheduling(
queues=None,
settings=SlurmSettings(
external_slurmdbd=ExternalSlurmdbd(host="test.slurmdbd.host", port=6819),
),
),
True,
),
],
)
def test_cluster_name_validator_slurm_accounting(cluster_name, scheduling, should_trigger_error):
Expand Down
Loading