Skip to content

Mount slurm-scripts to nodesets worker - #2715

Open
andriishestakov wants to merge 2 commits into
nebius:mainfrom
andriishestakov:nodesets-slurm-scripts
Open

andriishestakov wants to merge 2 commits into
nebius:mainfrom
andriishestakov:nodesets-slurm-scripts

Conversation

@andriishestakov

Copy link
Copy Markdown
Contributor

Mount %s-slurm-scripts configmap to worker if cluster name is set

@Uburro

Uburro commented Jul 27, 2026

Copy link
Copy Markdown
Collaborator

@andriishestakov I understand the problem, but ...

The injected entries are unconditional and unguarded. If a NodeSet's values already contain a mount named slurm-scripts at /opt/slurm_scripts, the rendered pod gets duplicate volume names and duplicate mountPaths. Both rejected by API validation (must be unique), so the StatefulSet never rolls.

CM naming duplicated across charts, and not identically. slurm-cluster computes it as default .Chart.Name .Values.clusterName | trunc 63 | trimSuffix "-" + -slurm-scripts. The new helper skips both the .Chart.Name fallback and the trunc 63, so an empty or >63-char clusterName produces divergent names (silent no-mount, or a reference to a CM that doesn't exist → pods stuck in ContainerCreating). An explicit slurmScriptsConfigMapName value that defaults to the convention would decouple the two charts.

@Uburro Uburro added the helm Functional changes in Helm charts label Jul 27, 2026
@andriishestakov
andriishestakov force-pushed the nodesets-slurm-scripts branch from 08bcc5a to 0fe8dd2 Compare July 27, 2026 13:00
@andriishestakov

Copy link
Copy Markdown
Contributor Author

Added checks for slurm-cluster and nodesets.

@asteny

asteny commented Oct 2, 2026

Copy link
Copy Markdown
Collaborator

@andriishestakov Hello!

Thanks for the updates. The explicit ConfigMap name and duplicate-name checks address part of the review, but a few issues remain before this can be merged:

  1. The templates check only existing mount names, not mount paths. A user can still have a mount with another name but with mountPath: /opt/slurm_scripts. The chart will inject another mount at the same path, producing an invalid or ambiguous pod specification. Please check both name and normalized mountPath in the NodeSet and login configurations.

  2. nodesets.slurmScriptsCMName still returns an empty string when clusterName is empty, while the slurm-cluster chart falls back to .Chart.Name. This means the NodeSet silently skips the mount with default values. Please use the same fallback in both charts, or require and validate an explicit slurmScriptsConfigMapName.

  3. Please add Helm tests covering:

  • an existing mount with the same name;
  • an existing mount with a different name but the same mountPath;
  • an empty clusterName;
  • an explicit slurmScriptsConfigMapName;
  • a long clusterName.

Once these cases are handled, the original collision and naming concerns should be fully resolved.

This branch is waiting to be deployed

1 waiting deployment
fork-ci — 9a4cac0f Waiting Oct 19, 2026 by andriishestakov via Authorize #8539
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

helm Functional changes in Helm charts

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants