Part B: the old-kernel clean-up rule, proven by hand on demo-hp (spike; nothing built)
gates / gates (push) Successful in 2m1s
gates / gates (push) Successful in 2m1s
One run on the demo-hp host (Tier 0), decision 286. The rule removed six of eight kernel image packages and nothing else: 6.4 GB gained on the system disk, every boot setting unchanged, one orderly reboot back on the same kernel, all containers healthy 311 s after the command, the crash guard saw a clean stop, a second run removed nothing. Five refusals shown by simulation only. - documentation/audits/kernel-cleanup-spike-2026-11-10/: README (one page), evidence 00-15, the rule as a read-only plan script - 11-os-updates.md §5.11.1: the design of the step (DESIGN, not built) - R-1368: a dated pointer line felhom-os-apply, the config bundle, the agent and rule R4 are unchanged. Claude-Session: https://claude.ai/code/session_0159rPz1ZhFKsS53msqPYxtS
This commit is contained in:
1 parent
807175c27d
commit
10ea4c2cbe
20 files changed
+2187
-1
No files matched your search
@@ -600,6 +600,46 @@ another kernel), and the kernel step (the newest result, the kernel due, whether
|
||||
7.0.14-20), so a soft lockup turning into a panic is recorded as unmeasured (no tool was built). A true dead freeze
|
||||
needs a person (accepted, decision 172). Evidence and proofs: `audits/kernel-lane-2026-10-07/`.
|
||||
|
||||
### 5.11.1 Removing old kernels `[DESIGN — proven by hand on demo-hp 2026-11-10; not built]`
|
||||
|
||||
**The ruling** (`09` §3 decision 286): the box may remove old kernels by itself, as its own step with its own narrow
|
||||
rule. **Rule R4 does not change**: an update plan that removes a package is still refused. Why a step is needed: the
|
||||
kernel step installs each image by name, so apt marks it "manual" and apt's own clean-up never takes it; and nothing
|
||||
runs that clean-up on a box. A ring-0 box got 7 kernels in 37 days, about 1 GB each (R-1368).
|
||||
|
||||
**The rule.** Keep the running kernel; the last kernel that booted well before it (the step's `from`); the newest
|
||||
installed kernel; and every kernel the lane still names — the step's `to` and `default_before`, the default in
|
||||
`grub.cfg`, the pinned default file, the one-shot flag, an operator's boot pin. Remove every other installed kernel
|
||||
image package, by its exact name, in one `apt-get purge`.
|
||||
|
||||
**It refuses the whole clean-up** — it never removes a part of the set — when:
|
||||
|
||||
| | |
|
||||
|---|---|
|
||||
| P1 | a kernel step is in a phase that has not ended (`staged`, `oneshot`, `judging`, `reverting`), or in a phase it does not know |
|
||||
| P2 | the one-shot flag names a kernel |
|
||||
| P3 | the pinned default and `grub.cfg`'s default do not name the same installed kernel |
|
||||
| K1 | a keep-kernel is in the removal set, or the running kernel is not an installed package |
|
||||
| N1 | a name in the removal set is not an installed kernel image package |
|
||||
| S1 | apt's simulation of exactly that set fails, or would install anything |
|
||||
| S2 | the simulation would remove anything that is not in the removal set |
|
||||
|
||||
K1 is the rule's own check and must stay its own: asked to remove the running signed kernel, apt does not refuse — it
|
||||
plans to put the unsigned image in its place (control A of the spike).
|
||||
|
||||
**When it may run.** Only when the newest kernel step ended `good` and the box runs its newest installed kernel — that
|
||||
is "booted well on its newest kernel" (decision 286). Never in the night of a kernel step: the step's judging, and a
|
||||
self-revert into `from`, must be over first. In the night's order it belongs where the OS leg is (§5.5): after the
|
||||
whole-guest backup. It needs no reboot and stops no guest. A box that fell back or reverted keeps all its kernels
|
||||
until a later step ends `good`.
|
||||
|
||||
**Proven** on demo-hp by hand: 8 kernels → 2, 6.4 GB gained on the system disk, the default, the pinned file and both
|
||||
generators unchanged, five refusals by simulation, one orderly reboot back onto the same kernel with a clean stop for
|
||||
the crash guard (§5.9), a second run that removed nothing. **Not proven:** a box whose running kernel is not its
|
||||
newest; a boot of the kept old kernel after the clean-up; the step as a program at night; a box that boots with
|
||||
`proxmox-boot-tool`. Evidence, the rule as a read-only script, and the full "not measured" list:
|
||||
`audits/kernel-cleanup-spike-2026-11-10/`.
|
||||
|
||||
## 6. Risks and edge cases
|
||||
|
||||
| # | What can go wrong | What the design does |
|
||||
|
||||
Reference in new issue
Block a user