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>
55 lines
2.0 KiB
Django/Jinja
55 lines
2.0 KiB
Django/Jinja
# Managed by Ansible for tenant {{ tenant_id | default('?') }}.
|
|
ClusterName={{ slurm_cluster_name }}
|
|
SlurmctldHost={{ inventory_hostname }}({{ head_cluster_ip }})
|
|
|
|
AuthType=auth/munge
|
|
CryptoType=crypto/munge
|
|
SlurmUser=slurm
|
|
SlurmdUser=root
|
|
|
|
SlurmctldPort=6817
|
|
SlurmdPort=6818
|
|
StateSaveLocation=/var/spool/slurm/ctld
|
|
SlurmdSpoolDir=/var/spool/slurm/d
|
|
SlurmctldPidFile=/var/run/slurmctld.pid
|
|
SlurmdPidFile=/var/run/slurmd.pid
|
|
|
|
ProctrackType=proctrack/cgroup
|
|
TaskPlugin=task/affinity,task/cgroup
|
|
MpiDefault=pmix
|
|
|
|
SchedulerType=sched/backfill
|
|
SelectType=select/cons_tres
|
|
SelectTypeParameters=CR_Core
|
|
|
|
SlurmctldTimeout=300
|
|
SlurmdTimeout=300
|
|
InactiveLimit=0
|
|
MinJobAge=300
|
|
KillWait=30
|
|
Waittime=0
|
|
# A stateless node that reboots comes back with a fresh slurmd and should
|
|
# rejoin without an operator clearing its DOWN state by hand.
|
|
ReturnToService=2
|
|
|
|
SlurmctldDebug=info
|
|
SlurmctldLogFile=/var/log/slurmctld.log
|
|
SlurmdDebug=info
|
|
SlurmdLogFile=/var/log/slurmd.log
|
|
|
|
# What the nodes are comes from the cluster, through cloud-init. Two
|
|
# constants in group_vars meant every cluster was described as the lab this
|
|
# started from: a node with fewer cores than advertised is refused outright
|
|
# ("Low socket*core*thread count") and one with more is quietly scheduled
|
|
# as if it were smaller.
|
|
#
|
|
# RealMemory is set below the VM's actual memory: the root filesystem
|
|
# occupies roughly 2 GiB of RAM as tmpfs, and advertising the full amount
|
|
# would let Slurm oversubscribe a node into OOM under its own job.
|
|
{% set node_cores = compute_cores | default(slurm_node_cores) | int %}
|
|
{% set node_mem = (compute_memory_mb | default(0) | int) - (slurm_rootfs_reserve_mb | int) %}
|
|
{% for n in compute_nodes %}
|
|
NodeName={{ n.name }} CPUs={{ node_cores }} Sockets=1 CoresPerSocket={{ node_cores }} ThreadsPerCore=1 RealMemory={{ node_mem if node_mem > 0 else slurm_node_realmemory }} State=UNKNOWN
|
|
{% endfor %}
|
|
PartitionName={{ slurm_partition }} Nodes={{ compute_nodes | map(attribute='name') | join(',') }} Default=YES MaxTime=INFINITE State=UP OverSubscribe=NO
|