hub + installer (unreleased): fixes after an independent review of the night's code — per-thing mail cooldown, a box's input bounded and checked, both off-site account types on a reset, a quiet first run, strict-mode installer
Claude-Session: https://claude.ai/code/session_0159rPz1ZhFKsS53msqPYxtS
This commit is contained in:
1 parent
a044eb8c16
commit
f618c591eb
31 files changed
+796
-88
No files matched your search
@@ -1003,6 +1003,18 @@ a box that is fully blind sends no host report at all, so that case still reache
|
||||
LAST, in the same write that sets `ca_file`; the installer writes a fingerprint only when the copy was not proven; and
|
||||
a config that holds both is a pinned box — the agent treats it as „not moved" and runs the move.
|
||||
|
||||
**6. What an independent review changed (2026-11-14 night, built, not released).** (a) **The copy holds one or two
|
||||
certificates.** The root step writes the new root FIRST and keeps the copy's previous first certificate behind it:
|
||||
the copy is replaced before anything can be proven with the new root, and Proxmox serves its old certificate until
|
||||
pveproxy is reloaded — without the old root, an agent that restarted in that window had no root that verified the
|
||||
served certificate and no fingerprint. Never more than two; an ended one verifies nothing. (b) **One run at a time**
|
||||
(`Ensure` is called from the start, the timer, a failed collect and a bundle install), and the root step has a
|
||||
90-second deadline — it runs on the daemon's start path and inside the report loop. (c) **One lock for every writer
|
||||
of `agent.json`** in the process (`config.FileMu`: the trust move, the PBS seed, the backup-target move): each reads
|
||||
the whole file and writes the whole file. **Left open, low:** the write is in place (not a rename), and nothing reads
|
||||
the parked copy `agent.json.pre-pve-trust` back by itself — on a full disk a failed write and a failed put-back can
|
||||
leave an empty config; the hand repair is to copy the parked file back.
|
||||
|
||||
**What changes for a pinned box when Proxmox makes a new certificate:** the first failed call names
|
||||
`pinned_cert_changed`, runs the order above, and the next call works — the box is blind for one report cycle at most,
|
||||
not until a person repairs it. `runbooks/RUNBOOK-agent-proxmox-pin-repair.md` stays the hand repair for an agent older
|
||||
|
||||
Reference in new issue
Block a user