c3020ee3a8
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
3.8 KiB
3.8 KiB
REPORT — felhom-agent v0.43.0 (BUNDLE slice: canonical unit + Gitea publish)
Date: 2026-06-28 · Baseline: v0.42.0 @ aaa276a → v0.43.0 @ a8d14fc
What shipped
Day-0 no longer needs a hand-installed agent. The binary is published to Gitea and the host-bootstrap script fetches → verifies (sha256 vs the hub-vouched manifest) → installs it. This commit adds the canonical systemd unit and the publish tooling; the binary is a version-only rebuild (no behavioural change).
configs/felhom-agent.service(NEW, canonical) —User=felhom-agent(the documented non-root production model;privileged.mode: "sudo"+ the sudoers allowlist),ExecStart=/usr/local/bin/felhom-agent --config /etc/felhom-agent/agent.json,Restart=on-failure,StateDirectory=felhom-agent. NoNoNewPrivileges(would block thesudothe agent needs) and no mount-namespacing hardening (would put the agent in a private mount namespace, breakingmount --make-shared/--binddrive propagation into guests) — both documented inline.scripts/publish-agent.sh(NEW) — build (optional) + PUT binary to/api/packages/admin/generic/felhom-agent/<ver>/felhom-agent, printAGENT_VERSION/AGENT_SHA256, GET round-trip re-verify. Pinned version, idempotent (delete-then-PUT), asserts--versionmatches.configs/build-golden.sh— after vzdump, compute sha256 + PUT/api/packages/admin/generic/felhom-golden/<golden-ver>/golden.tar.zst, printGOLDEN_VERSION/GOLDEN_SHA256. Opt-in; local auto-discovery stays a fallback.configs/felhom-agent.sudoers(latent bug fix) — escaped the commas in thelvs -o …andlsblk -o …argument lists. Bare commas are command separators in sudoers, sovisudo -cfrejected the file; it had never been visudo-validated live because the demo ran the agent root+direct(sudoers unused). Surfaced by the live install'svisudo -cfgate.cmd/felhom-agent/main.go—version0.42.0 → 0.43.0.- README — "Process model" section made canonical (non-root + publish/install).
Green gate
go build ./... && go vet ./... && go test ./... — all green. scripts/publish-agent.sh +
configs/build-golden.sh: bash -n + shellcheck -S warning clean (the one SC2034 in build-golden.sh
is a pre-existing DHCP-wait loop counter, not this change).
Live (felhom-pve, demo-felhom) — proven
- Built + published agent 0.43.0 via
publish-agent.sh→ sha2568b989917…; GET round-trip OK. - Published the existing golden 0.85.1 (575 MiB) to Gitea → sha256
f87031cc…. - From-scratch install (after moving the live root+direct agent fully aside): the script fetched
the binary from Gitea, verified sha256 vs the hub manifest, installed the non-root
felhom-agentuser + binary + sudoers (visudo -cf-validated) + the canonical unit + config (0600felhom-agent); the service came up active as non-root felhom-agent,--selftest=hublanded a host-report, and guest 9201 stayed managed (present in the host-report).sudo -nconfirmed live for mkdir/smartctl/lvs (the escaped-comma sudoers works). - sha256 negative: a deliberately-corrupted published binary made the install abort ("Refusing to install (verify-before-use)", exit 1); the good binary was restored (sha re-verified).
Observations
- Non-root + PBS: the
felhom-agentuser cannot read/etc/pve/priv/storage/*.pw(root-only on pmxcfs), so PBS datastores are skipped with a WARN (graceful; PBS cadence is 0 on the demo). A production host using PBS needs the agent granted read access to that key (group/ACL on pmxcfs, or a sudoers entry) — follow-up, out of this slice. sudopackage must be present for the non-root model; the host-install script nowapt-get installs it (a root+directhost won't have it).