One tenant may run several HPC clusters at the same time. The code did not allow for that: a single tenant_id drove the bridge, the subnet, the MAC prefix, the VM names, the vendor-data filename and the public hostname. A tenant asking for a second cluster while the first was running would have been handed the same bridge, the same subnet and the same MAC prefix - and Warewulf matches nodes by MAC, so the second cluster would have broken the first rather than failing cleanly. Everything that must not collide is now keyed on cluster_id, and tenant_id survives as what it always meant: who owns this. Bridges are vmbrC###, hosts c###-head and c###-node#, the portal is c###.hpc.example.org, and the Slurm ClusterName is the cluster's - which matters for the accounting work next, because records attributed to a shared name cannot be separated afterwards. The bound of 254 therefore applies to clusters running at one time, not to tenants. It comes from the addressing and nothing else: cluster_id is the third octet of 10.64.x.0/24 and one byte of the MAC. That is written down in 20.5a rather than left to be rediscovered. The registry keeps its shape but not its name: /etc/hpcod/clusters.yaml with a clusters: key, /etc/hpcod/clusters/ for the pinned certificates, -clusters and -cluster-domain on the portal, and the two scripts renamed to match. A half-finished rename would have left the most-read file still calling a cluster a tenant, which is the confusion this commit exists to remove. Verified on a cold provision: terraform 37s, self-configuration 43s, nodes 61s, 141s total; nodes named c002-node[1-2], ClusterName c002, bridge vmbrC002, and the portal answering 401 at c002.hpc.example.org. Not addressed here, and the more binding limit at the scale this is meant for: a cluster cannot span Proxmox nodes. Its bridge is bridge-ports none, a local L2 island, so two hypervisors would give two segments and PXE would not cross. Proxmox SDN is the way out and is already enabled on hv01; docs/20 anticipated it with vlan_tag in the allocation record.
24 lines
791 B
Plaintext
24 lines
791 B
Plaintext
---
|
|
# Generated from the Terraform module's ansible_inventory output.
|
|
# See: tofu output -json ansible_inventory
|
|
all:
|
|
children:
|
|
head:
|
|
hosts:
|
|
c001-head:
|
|
ansible_host: 10.0.0.60 # management address
|
|
ansible_user: ilker
|
|
ansible_become: true
|
|
vars:
|
|
cluster_id: 1
|
|
tenant_id: 1
|
|
cluster_cidr: "10.64.1.0/24"
|
|
head_cluster_ip: "10.64.1.1"
|
|
dhcp_range_start: "10.64.1.100"
|
|
dhcp_range_end: "10.64.1.199"
|
|
# Warewulf matches nodes by MAC, so these must be exactly what Terraform
|
|
# assigned. A mismatch means the node PXE boots and is never recognised.
|
|
compute_nodes:
|
|
- { name: c001-node1, mac: "BC:24:11:E0:01:01", ip: "10.64.1.11" }
|
|
- { name: c001-node2, mac: "BC:24:11:E0:01:02", ip: "10.64.1.12" }
|