Skip to content

[TCL-6909] feat(slurm): support initScriptController (/root/init.sh on slurmctld) - #36

Closed
sagrawal-byte wants to merge 1 commit into
slurm-1.0-together-changesfrom
sagrawal/init-script-controller
Closed

[TCL-6909] feat(slurm): support initScriptController (/root/init.sh on slurmctld)#36
sagrawal-byte wants to merge 1 commit into
slurm-1.0-together-changesfrom
sagrawal/init-script-controller

Conversation

@sagrawal-byte

Copy link
Copy Markdown

What

Adds initScriptController — a /root/init.sh init-script hook for the controller (slurmctld), mirroring the existing initScriptLogin (login) and initScriptNodes (compute). When set, the chart renders a ConfigMap and mounts it at /root/init.sh on the slurmctld container; the controller entrypoint runs it at startup.

Pieces (all mirror the login/nodes equivalents):

  • controller-cr.yaml: inject init-script volume + /root/init.sh subPath mount onto slurmctld (gated on initScriptController).
  • init-script-configmap.yaml: new controller ConfigMap.
  • slurm.initScriptControllerName helper.
  • values.yaml: initScriptController: null.

Companion: slurmcontainers controller.sh now runs /root/init.sh (it already did transitively on worker via setup_env.sh, and directly on login).

Why

Lets an operator-supplied init script run on all three roles. Primary use: fetch role binaries (TorchPass clockworks/payload) from the substrate metadata service at startup — avoiding private image pulls / payload initContainers.

Test plan

  • helm lint → 0 failures.
  • helm template with initScriptController set: renders the ConfigMap + the slurmctld /root/init.sh mount + the init-script volume (defaultMode 0755). Default (null) renders unchanged.

🤖 Generated with Claude Code

login (initScriptLogin) and compute (initScriptNodes) already mount a
/root/init.sh init script via ConfigMap; the controller had no equivalent.
Add initScriptController: a ConfigMap mounted at /root/init.sh on the
slurmctld container, run at startup by the controller entrypoint
(slurmcontainers controller.sh). Used to fetch role binaries (e.g. TorchPass)
from the substrate metadata service. Gated/null by default -- no change to
existing renders.

Verified with helm lint + helm template.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@sagrawal-byte sagrawal-byte changed the title feat(slurm): support initScriptController (/root/init.sh on slurmctld) [TCL-6909] feat(slurm): support initScriptController (/root/init.sh on slurmctld) Jul 2, 2026
@sagrawal-byte

Copy link
Copy Markdown
Author

Superseded — combined with #35 into a single PR from the merged branch (sagrawal/torchpass-chart-pkg).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant