hub (unreleased): a give-up mark keeps its slot for a week after the box stops listing the guest (the commit's security review); docs for the CA copy's changeover
gates / gates (push) Successful in 2m10s
gates / gates (push) Successful in 2m10s
Claude-Session: https://claude.ai/code/session_0159rPz1ZhFKsS53msqPYxtS
This commit is contained in:
1 parent
78c08dc909
commit
d2683b28d3
7 files changed
+82
-12
No files matched your search
@@ -1007,7 +1007,11 @@ a config that holds both is a pinned box — the agent treats it as „not moved
|
||||
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**
|
||||
served certificate and no fingerprint. **Only for the changeover:** at every later run the step makes one handshake to
|
||||
the local Proxmox (`127.0.0.1:8006`) with the new root alone and drops the previous root as soon as that verifies, or
|
||||
when the previous root is no longer a CA that has not ended. The copy is compared exactly, never by its start. By
|
||||
hand, to drop an old root at once (a root that was changed because it leaked): delete the copy; the next run writes
|
||||
the new root alone. Checked with the real openssl and a real TLS server in the wrapper's tests. (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
|
||||
|
||||
@@ -731,7 +731,8 @@ the same report lists (not running), 16 entries at most.
|
||||
**The mails (after review, 2026-11-14):** each of these events tells one thing once and keeps a mark, so its mail
|
||||
cooldown is keyed per thing (`notify.perSubjectCooldownEvents`) — with the plain per-type key the second job, guest or
|
||||
skipped check inside the hour was suppressed and never told. The lost-mail scan tells only mails that failed before
|
||||
this hub process started (one that failed since still has its retry). One box holds at most 8 give-up marks.
|
||||
this hub process started (one that failed since still has its retry). One box holds at most 8 give-up marks, and the
|
||||
mark of a guest the box stops listing keeps its slot for a week.
|
||||
|
||||
**Not proven on a box or a deployed hub:** all five. The tests use fakes for the mail service and the real gate
|
||||
and verifier for the signed jobs (`audits/night-build-2026-11-14/B/`, 43 mutations seen red).
|
||||
|
||||
@@ -67,3 +67,42 @@
|
||||
|
||||
the real file: 0 failing line(s)
|
||||
3 mutations, 0 not a red-proof
|
||||
---- the CA copy, second pass (after the commit's security review: the previous root only for the changeover; exact compare) ----
|
||||
== MUTATION: the previous root is never dropped (it stays a trust anchor for ever)
|
||||
RED on the mutant: 3 failing line(s)
|
||||
FAIL: test_the_previous_root_stays_only_for_the_changeover (__main__.PVECACopy.test_the_previous_root_stays_only_for_the_changeover)
|
||||
AssertionError: b'---[86 chars]---\n-----BEGIN CERTIFICATE-----\nQUJDREVGR0hJ[49 chars]--\n' != b'---[86 chars]---\n' : after the changeover the copy is the new root alone
|
||||
FAILED (failures=1)
|
||||
== MUTATION: the previous root is dropped while Proxmox still serves the old certificate
|
||||
RED on the mutant: 3 failing line(s)
|
||||
FAIL: test_the_previous_root_stays_only_for_the_changeover (__main__.PVECACopy.test_the_previous_root_stays_only_for_the_changeover)
|
||||
AssertionError: Tuples differ: (0, 'written', [('/etc/felhom-agent/pve-root-c[108 chars]20)]) != (0, 'same', [])
|
||||
FAILED (failures=1)
|
||||
== MUTATION: a copy that only STARTS with the source is same (unchecked content stays)
|
||||
RED on the mutant: 4 failing line(s)
|
||||
KeyError: 'kept_previous'
|
||||
FAIL: test_a_copy_with_anything_unchecked_in_it_is_rewritten (__main__.PVECACopy.test_a_copy_with_anything_unchecked_in_it_is_rewritten)
|
||||
AssertionError: b'anything' unexpectedly found in b'-----BEGIN CERTIFICATE-----\nWllYV1ZVVFNSUVBPTk1MS0pJSEdGRURDQkE=\n-----END CERTIFICATE-----\nanything at all\n' : text after the source
|
||||
== MUTATION: an ended previous root is kept at a change
|
||||
RED on the mutant: 3 failing line(s)
|
||||
FAIL: test_the_previous_root_stays_only_for_the_changeover (__main__.PVECACopy.test_the_previous_root_stays_only_for_the_changeover)
|
||||
AssertionError: b'---[86 chars]---\n-----BEGIN CERTIFICATE-----\nQUJDREVGR0hJ[49 chars]--\n' != b'---[86 chars]---\n'
|
||||
FAILED (failures=1)
|
||||
== MUTATION: the handshake is verified with the system's roots too
|
||||
RED on the mutant: 3 failing line(s)
|
||||
FAIL: test_the_previous_root_stays_only_for_the_changeover (__main__.PVECACopy.test_the_previous_root_stays_only_for_the_changeover)
|
||||
AssertionError: '-no-CApath' not found in ['openssl', 's_client', '-connect', '127.0.0.1:8006', '-CAfile', '/etc/pve/pve-root-ca.pem', '-verify_return_error']
|
||||
FAILED (failures=1)
|
||||
== MUTATION: any answer of the handshake counts as verified
|
||||
RED on the mutant: 5 failing line(s)
|
||||
FAIL: test_the_previous_root_stays_only_for_the_changeover (__main__.PVECACopy.test_the_previous_root_stays_only_for_the_changeover)
|
||||
AssertionError: Tuples differ: (0, 'written', [('/etc/felhom-agent/pve-root-c[108 chars]20)]) != (0, 'same', [])
|
||||
FAIL: test_with_the_real_openssl_and_the_real_runner (__main__.PVECACopy.test_with_the_real_openssl_and_the_real_runner)
|
||||
== MUTATION: a leaf counts as a live CA
|
||||
RED on the mutant: 3 failing line(s)
|
||||
FAIL: test_with_the_real_openssl_and_the_real_runner (__main__.PVECACopy.test_with_the_real_openssl_and_the_real_runner)
|
||||
AssertionError: True is not false : a leaf is not a CA
|
||||
FAILED (failures=1)
|
||||
|
||||
the real file: 0 failing line(s)
|
||||
7 mutations, 0 not a red-proof
|
||||
@@ -110,3 +110,13 @@
|
||||
system_b3_test.go:63: last ask no_answer: {Text:7.0.14-28-pve · 0 rewritten · 18 h ago · last ask NO_ANSWER 1 h ago Class:warn Title:last ask: no_answer}, want amber, the failed ask AND the older record
|
||||
|
||||
1 mutations, 0 not a red-proof
|
||||
== MUTATION: a mark is dropped the moment the box stops listing the guest (a box mints 8 alarms per report)
|
||||
RED on the mutant, GREEN on the real file
|
||||
--- FAIL: TestGuestPowerGaveUp_ABoxCannotFillTheSettings (0.05s)
|
||||
review_fixes_test.go:69: 40 alarms for five reports of invented guests, want at most 8
|
||||
== MUTATION: a mark of a guest that is gone is never dropped
|
||||
RED on the mutant, GREEN on the real file
|
||||
--- FAIL: TestGuestPowerGaveUp_ABoxCannotFillTheSettings (0.05s)
|
||||
review_fixes_test.go:82: marks for guests the box has not listed for a week: 8 (rows 8), want 0
|
||||
|
||||
2 mutations, 0 not a red-proof
|
||||
Reference in new issue
Block a user