Files
ilkerandClaude Opus 5 0a1e6437f3 hpcod: tell Slurm what the nodes are, and switch them on
A desktop was requested and queued for ever: "Nodes required for job
are DOWN, DRAINED or reserved". Two faults, one on top of the other.

The compute nodes were never switched on. The module creates them off
on purpose - they PXE boot from the head, and there is nothing to
boot from until Warewulf on it is configured - and nothing ever
turned them on afterwards. The build now applies a second time with
started=true, once the head's portal answers, which is the signal
that its first-boot playbook finished. Waiting for the head moved out
of publish() to sit before both steps: it used to be inside it, so a
portal with no registry configured neither waited nor powered
anything on, and called the cluster ready.

Underneath that, slurm.conf described every cluster as the lab this
started from. group_vars carried slurm_node_cores: 2 and
slurm_node_realmemory: 4000 as constants, and the cloud-init
inventory named only each node's name, MAC and address. This cluster
asked for one core per node, got one, and Slurm refused all four:
"Low socket*core*thread count". The other direction is worse because
it looks like it works - a node with eight cores registers fine and
is then scheduled for ever as if it had two.

Terraform now says what it built: compute_cores and compute_memory_mb
travel in the inventory, and the template uses them. The rootfs
reserve stays a constant, which it genuinely is. The two old values
remain only as fallbacks for a run with no cluster inventory, which
is the golden template build and nothing else - and the comment says
why they cannot be the answer: a value in group_vars outranks an
inventory's own group vars, so the cluster could not have corrected
them even if it had tried.

The head-ready wait is injected rather than called directly, so the
runner's tests do not dial 10.0.0.160 and reach whatever is there.
The three copies of "run tofu with the right environment" are now
one.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-09-22 08:26:40 +02:00
..