Symptom
On a default k3d install (1 server + 1 agent — two kubernetes "nodes" that are containers on the same physical machine), tracebloc resources reports double the real capacity:
Your secure environment is equipped with: 24 CPU · 13.4 GiB ← machine has 12 logical CPUs, node allocatable ~6.7 GiB
The resources set wizard header on the same machine says 2 of 12 cores / 8 of 6.7 GiB — so two adjacent surfaces disagree by exactly 2×.
Root cause
internal/resources/resources.go:67-92 — MachineCapacitysums Status.Allocatable across every Ready node (only a Ready filter, no dedup/role awareness):
forname, qty:=rangen.Status.Allocatable {
case corev1.ResourceCPU: addInto(&m.CPU, qty)
case corev1.ResourceMemory: addInto(&m.Mem, qty)The package comment (resources.go:9-10, 64-66) assumes the installer path is single-node — but the default k3d topology is server-0 + agent-0, each reporting the full Docker-VM capacity, so one machine is counted twice. Print site: internal/cli/resources.go:132 (data via :108-111). The home screen does the identical sum in sumCapacity (internal/cli/home.go:597-621).
Everything scheduling-relevant already uses the correct per-node view: the wizard uses LargestReadyNode (resources_set.go:182), and doctor's fit check is explicitly per-node (internal/doctor/doctor.go:595-605, "a pod gets ALL its requested resources from ONE node"). Only the two display surfaces sum.
Fix
Use the largest-Ready-node view for the "equipped with" headline (reuse resources.LargestReadyNode) in both resources.go:132 and home.go:597-621 — that's what "this machine" can actually give a training run. If multi-node (non-k3d) clusters should still see totals, present it explicitly as "across N nodes: …" rather than as the machine's size.
Acceptance
Symptom
On a default k3d install (1 server + 1 agent — two kubernetes "nodes" that are containers on the same physical machine),
tracebloc resourcesreports double the real capacity:The
resources setwizard header on the same machine says2 of 12 cores / 8 of 6.7 GiB— so two adjacent surfaces disagree by exactly 2×.Root cause
internal/resources/resources.go:67-92—MachineCapacitysumsStatus.Allocatableacross every Ready node (only a Ready filter, no dedup/role awareness):The package comment (
resources.go:9-10,64-66) assumes the installer path is single-node — but the default k3d topology is server-0 + agent-0, each reporting the full Docker-VM capacity, so one machine is counted twice. Print site:internal/cli/resources.go:132(data via:108-111). The home screen does the identical sum insumCapacity(internal/cli/home.go:597-621).Everything scheduling-relevant already uses the correct per-node view: the wizard uses
LargestReadyNode(resources_set.go:182), and doctor's fit check is explicitly per-node (internal/doctor/doctor.go:595-605, "a pod gets ALL its requested resources from ONE node"). Only the two display surfaces sum.Fix
Use the largest-Ready-node view for the "equipped with" headline (reuse
resources.LargestReadyNode) in bothresources.go:132andhome.go:597-621— that's what "this machine" can actually give a training run. If multi-node (non-k3d) clusters should still see totals, present it explicitly as "across N nodes: …" rather than as the machine's size.Acceptance
resources,resources set, doctor, and home all quote the same single-node capacity.