One Slurm cluster across the carnaval GPU VMs
Date: October 2026 · Status: built and verified 2026-10-19 (what runs); this page keeps the reasoning
Scope: turn the ten one-node Slurm clusters of gpu0–gpu9 (what runs)
into one cluster, so an MPI job can span several machines. Asked for the MPI teaching: today
srun -n 4 ./prog keeps every rank on the VM it was submitted from.
Decisions taken
- A controller outside the lab VMs — a new LXC
srv-slurmon a carnaval node, in the91subnet, VMID113=192.168.91.113(the100–119persistent range,110–112and.115being Kubernetes). The lab VMs are re-stamped every week; the scheduler must not be. Rejected:slurmctldongpu0(gone at each re-stamp, and a student saturatinggpu0starves the scheduler); an LXC on rumba (every daemon exchange would cross the router between88and91). - One shared cluster, no island mode — every
gpuNstamped oncarnaval0–9joins it. One queue, ten machines, is what students are told.gpu10(carnaval10, Tesla T4, 128 GB) stays out and keeps the current one-node generator: the stamping script decides by node name. - Accounting from the start —
slurmdbd+ MariaDB onsrv-slurm, sosacctworks and fair-share arbitrates between students instead of first-come. Associations are derived fromprovisioning/keycloak/roster.csv(vpn-carnaval→ accountstudentsorstaff) by a sync script, the same way the VMs get their accounts. - Dynamic, configless nodes — a VM gets only the munge key and the controller's name at stamp
time;
slurmdstarts with--conf-server srv-slurm(configless) and-Z(dynamic node) and registers itself with its real CPUs, memory and GPU. Nothing per VM lives on the controller, so a re-stampedgpu4is a new node with the old name and no manual step. Both features exist in the nodes' Slurm 23.11. - Same Slurm version on both sides — the controller LXC is Ubuntu 24.04 (Slurm 23.11.4, PMIx
5.0.1), like the VMs. Debian 13 would bring 24.11 on the controller: allowed by Slurm's rule
(controller newer than the nodes), but configless hands the controller's
slurm.confto 23.11 daemons, so one version avoids a class of surprises. - GPU stays local —
gres/gpu:1per node as today; a multi-node job gets one card per node it asks for. Nothing changes for the single-node GPU jobs that run now. - MPI over TCP on the
91subnet — OpenMPI'sbtl_tcp_if_includepinned to that interface inopenmpi-mca-params.conf, so ranks never try the NetBird or a stray interface. PMIx throughsrunacross nodes needs nothing else.
What stays the same
- The image recipe (
carnaval-slurm.sh --image), the packages andcgroup.confdevice constraints;sbatch,srun,squeue,sinfo,scontrolfrom any VM. - The NAS homes, mounted identically on every VM with the same UIDs: a binary built in
$HOMEis visible on every node, which is the one prerequisite of a multi-node MPI job./tmpis per node. - The weekly re-stamp and the disposability of the VMs.
Limits to tell students
- 1 GbE between the nodes: about 100 µs of MPI latency and ~110 MB/s between two machines. Good for decomposition, communication patterns and showing where scaling breaks; not a performance platform.
- Per-job ceilings:
MaxNodes=3(a cap on machines, not on cores: within each node a job gets what it asks for and shares the rest),MaxTime=1-00:00:00,DefaultTime=01:00:00,DefCpuPerGPU=8. A job that asks for the ten nodes would wait for all of them and block everyone meanwhile; the cap keeps the course usable. - The controller is one LXC with no HA. If it is down, running jobs continue, nothing new is
scheduled. Its storage is the node's
fast-vmpool (local-lvmis disabled on the carnaval nodes andlocalhas no room): a hang of that pool takes the scheduler with it, which is why it goes on one of the eight nodes that have never hung,carnaval0, and why the CT is backed up nightly to PBS (theslurmdbddatabase with it).
Steps
srv-slurm— LXC per theproxmox-guestskill: Ubuntu 24.04 template (pveam download, none is on the nodes yet), 2 cores / 2 GB / 8 GB onfast-vmofcarnaval0,192.168.91.113, DNSsrv-slurm.isc3.munge(key generated here, copied tosecretzone/),slurmctld,slurmdbd+ MariaDB,ClusterName=carnaval,PriorityType=priority/multifactorwith fair-share, thegpupartition over the dynamic nodes,MaxNodeCount=16. Script:provisioning/pve/carnaval-slurm-ctl.sh, idempotent, run from the operator machine.- Join mode in the VM recipe —
carnaval-slurm.shgains a join path: when/etc/slurm/controllerand the munge key are present, the first-boot unit writes noslurm.confand startsslurmd --conf-server srv-slurm -Z --conf "Gres=gpu:1"; otherwise it generates the one-node cluster as today (gpu10).carnaval-lab-vm.shinjects both files through the cloud-init snippet for every node butcarnaval10. - Associations —
provisioning/pve/carnaval-slurm-accounts.sh:sacctmgradds thestudentsandstaffaccounts and one association per rosteredvpn-carnavalperson; run after every roster change (hook it into the onboarding recipe) and idempotent. - Template rebuild and re-stamp —
carnaval-guests.sh --templateson one node, the dump tonas-library, restore on the others, then the ten VMs re-stamped (nobody logged in). - Verification —
sinfoshows ten nodes; an MPI ring over 2 then 4 nodes withsrun -N; a--gres=gpu:1job on each node;sacctlists them; a re-stamp of one VM re-registers it with no action on the controller. - Documentation — the Slurm section becomes the
cluster description, the student cheatsheet gains
-N, this page's status line is updated.
Effort: about two days, step 1 and 2 being most of it.
What the build taught
AccountingStorageEnforce=limitsimpliesassociationsin Slurm: a person without one is refused ("Invalid account"), there is no softer setting short of no enforcement. Hence the sync inonboard.sh.- Slurm names a job's owner by UID through the controller's passwd, so the controller carries
login-less users with the register's UIDs; added after the associations, the daemons had to be
restarted once to pick the UIDs up (
sacctmgrrecords the UID at add time when the user exists). - Clients on the nodes need
AccountingStorageHostto be the controller's name, notlocalhost, orsacctfails on every node. - The lab-VM stamping script injects the current
carnaval-slurm.shand runs it at first boot, so the template did not have to be rebuilt for the switch.
Still open: whether gpu10 should be a submit host for the shared cluster (it is not a node).