Skip to content

[Validators] The validator ClusterNameValidator now enforces cluster names to be limited to 40 characters when using ExternalSlurmdbd.#7340

Merged
gmarciani merged 1 commit intoaws:developfrom
gmarciani:wip/mgiacomo/3160/fix-validation-external-slurmdbd-0415-1
Apr 16, 2026
Merged

[Validators] The validator ClusterNameValidator now enforces cluster names to be limited to 40 characters when using ExternalSlurmdbd.#7340
gmarciani merged 1 commit intoaws:developfrom
gmarciani:wip/mgiacomo/3160/fix-validation-external-slurmdbd-0415-1

Conversation

@gmarciani
Copy link
Copy Markdown
Contributor

@gmarciani gmarciani commented Apr 15, 2026

Description of changes

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

what if we do not enforce this limit?

Without enforcing this limit the user may have hard time understanding the root cause of the failure.
The cluster creation would succeed but acccunting data would not be pushed.
The user must check slurmdbd logs to spot the issue, signaled by this error line:

[2026-04-01T22:03:34.775] error: mysql_query failed: 1059 Identifier name 'integ-tests-b1scxqkp3595s8c5-integ-mgiacomo0401_assoc_usage_day_table' is too long

We did not change the error message because it was already comprehensive:

    {
      "level": "ERROR",
      "type": "ClusterNameValidator",
      "message": "Error: The cluster name can contain only alphanumeric characters (case-sensitive) and hyphens. It must start with an alphabetic character and when using Slurm accounting it can't be longer than 40 characters."
    },

Tests

  • Unit tests included in PR, which has been updated to capture the changes.
  • Verified that the validator fails as expected when external slurmdbd is used and cluster name exceeds 40 chars: succeeds otherwise.

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@gmarciani gmarciani added the 3.x label Apr 15, 2026
…r names to be limited to 40 characters when using `ExternalSlurmdbd`.

This is consistent with the existing limit for `Database`.

This limitation prevents runtime failures caused by MySQL's table name length limit.
@gmarciani gmarciani force-pushed the wip/mgiacomo/3160/fix-validation-external-slurmdbd-0415-1 branch from fa582bd to d6e6867 Compare April 15, 2026 21:10
@gmarciani gmarciani marked this pull request as ready for review April 15, 2026 21:12
@gmarciani gmarciani requested review from a team as code owners April 15, 2026 21:12
@gmarciani gmarciani closed this Apr 15, 2026
@gmarciani gmarciani reopened this Apr 15, 2026
@gmarciani gmarciani merged commit 94e5a0e into aws:develop Apr 16, 2026
50 checks passed
@gmarciani gmarciani deleted the wip/mgiacomo/3160/fix-validation-external-slurmdbd-0415-1 branch April 16, 2026 13:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants