two designs, proposed and not built: a box that cannot reach Proxmox still reports why (03 §12a item 8, R-1396); the delete journal keeps an id that is not a name (05 §14.3, decision 312)
Claude-Session: https://claude.ai/code/session_0159rPz1ZhFKsS53msqPYxtS
This commit is contained in:
1 parent
92853bed2c
commit
90ba98b1a0
2 files changed
+112
-1
No files matched your search
@@ -1032,6 +1032,51 @@ pinned box again and the move runs again. Tested with a cut staged at each of th
|
||||
(`TestMainCallsTheConfigRepairBeforeItLoadsTheConfig`, `TestAgentJSONWritersUseTheJournalledWrite`). **Not proven: a
|
||||
real power cut on a box.** The copy `agent.json.pre-pve-trust` stays, for a person; nothing reads it.
|
||||
|
||||
**8. A box that cannot reach Proxmox still tells the hub why `[DESIGN — proposed, not built]` (R-1396 gap 2; written 2026-11-15).**
|
||||
|
||||
*Today (read in source).* The agent's report starts with one call to Proxmox (`hub.Collector.Collect` →
|
||||
`NodeStatus`). When that call fails — the trust does not work, Proxmox is stopped, the token was removed — `Collect`
|
||||
returns an error and the cycle sends nothing. The agent goes on asking the hub for jobs, so it is alive, but the hub
|
||||
gets no report: after the stale time the operator reads „host stale”, with no cause. The causes the agent knows at
|
||||
that moment (`pinned_cert_changed`, `ca_mismatch`, `cert_expired`, …) stay in its journal. Seen on 2026-11-15: a
|
||||
wrong CA copy could raise no alarm (it also repaired itself at the agent's start).
|
||||
|
||||
*Why it is not built tonight.* The smallest change is a report with almost nothing in it. But the hub reads a report
|
||||
as the whole truth about a box: a report with no guests, no storage and no backups would raise „guest gone”,
|
||||
„storage disconnected” and stale-backup alarms, and it would write an empty recovery recipe over the good one. So
|
||||
the report's meaning changes for the hub, and every reader of a report in the hub must be read first. That is not
|
||||
small (rule: a change of the report's shape for the hub stops at the design).
|
||||
|
||||
*The design.*
|
||||
|
||||
1. **The agent** sends a *short report* when the first call fails: `host_id`, `reported_at`, `sent_at`, the agent's
|
||||
version and hash, the `proxmox_trust` stanza, and one new stanza
|
||||
`proxmox_unreachable: {since, cause, detail}` — `cause` is a trust cause, or `no_answer`, `refused`, `timeout`,
|
||||
`http_5xx`, `unauthorized`; `detail` is cut at 240 characters. **No other key is present** — no empty list that
|
||||
could be read as „the box has no guests”.
|
||||
2. **The agent sends it only to a hub that says it understands it.** The hub's answer to a report gains one field
|
||||
(`accepts_short_report: true`); the agent remembers it in memory. To an older hub the agent stays silent, as today.
|
||||
So the two sides can be released in any order, and an older hub never gets a report it would misread.
|
||||
3. **The hub**, on a report that holds `proxmox_unreachable`: it updates the box's last-seen time and agent version,
|
||||
runs the clock check and the trust check, and raises one operator-only alarm `proxmox_unreachable` per (box, cause)
|
||||
that names the cause and since when; the first full report clears it. **Every other reader is skipped** and the
|
||||
last full report stays the stored truth (guests, storage, backups, the recovery recipe, capabilities, the fill and
|
||||
disk checks). The Hosts page shows the box as „reports, cannot reach Proxmox since …”, not as healthy.
|
||||
4. **„Host stale” stays true to its meaning:** a box that sends short reports is not stale (it is alive), and it is
|
||||
not healthy. The stale alarm is for silence; the new alarm is for this state.
|
||||
|
||||
*What it costs.* One list of every place in the hub that reads a host report (to be made at the build — the count is
|
||||
not known today), one test per place that a short report changes nothing there, and the two new fields on the wire
|
||||
(the wire gate needs both sides in one series).
|
||||
|
||||
*The test on a box that settles it.* demo-hp, with nothing in flight: stop `pveproxy` for 20 minutes. Expected: one
|
||||
operator mail that names `no_answer` (or the cause), the Hosts page line above, NO guest, storage or backup alarm,
|
||||
the stored recovery recipe unchanged (compared before and after), and the alarm cleared at the first report after
|
||||
`pveproxy` starts. A second run with a wrong served certificate must name the trust cause.
|
||||
|
||||
*If nothing is built:* a box that loses Proxmox is „host stale” with no cause, as today; the operator reads the
|
||||
cause in the box's journal.
|
||||
|
||||
**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