0550b3117e
/api/system/info reported the Proxmox host's 16GB (the controller container reads host /proc/meminfo with no lxcfs), defeating the deploy memory-headroom hard-block (deploy.go uses GetMemoryMB). readMemInfo now prefers the cgroup memory limit (v2 memory.max / v1 memory.limit_in_bytes; sentinels = unlimited) when finite and below the host total; used = memory.current/usage_in_bytes. Test info_cgroup_test.go (cgroup v2 cap wins, v2 max sentinel, v1 unlimited, v1 finite) — fails on pre-fix code.
1.5 KiB
1.5 KiB
SESSION 2026-06-14 — Fix Batch 1 (+F17) → controller v0.61.0
Branch: audit/2026-06-14-live-drive. Implementing controller-side live-drive fixes per LIVE-DRIVE-FIXSPEC-2026-06-14.md.
Exclusions: F9, F20-BUG2, F20-BUG3 (agent/golden — supervised next session).
Operator decisions applied: F17 .sql wins; F5 gate route but surface "route unpublished"; F8 0600; F11 warn-and-allow (note: F11 not in this batch's fix list — only F1, F20-BUG1, F4, F6, F7, F8, F5, F17).
Progress log
- t0 — Read CLAUDE.md (build workflow), FIXSPEC, target source files. Setting up.
- Test approach (documented assumption): controller code is largely
//go:build linux; dev host is Windows. Per-commit gate =CGO_ENABLED=0 GOOS=linux go build ./... && go vet ./...locally (compiles + type-checks code AND_test.go). Authoritativego test ./...runs on the Linux build server (192.168.0.180) against the pushed branch BEFORE the image build/deploy. Windows cannot execute linux test binaries, so this is the faithful interpretation of the per-commit green gate. - t1 — F1 (cgroup memory) DONE.
internal/system/info_linux.go:readMemInfonow prefers the cgroup memory LIMIT (v2memory.max, v1memory.limit_in_bytes, "max"/near-uint64-max = unlimited→fallback) when finite and below the host/proc/meminfototal; used =memory.current/usage_in_bytes. Restores the deploy OOM guard (deploy.go:162-185 reads GetMemoryMB). Testinfo_cgroup_test.go(4 cases) — fails on pre-fix code (ignored cgroup). GOOS=linux build+vet OK.