From ca15a31690ccd9efa1f6183e39e47fd008c3c7f1 Mon Sep 17 00:00:00 2001 From: kisfenyo Date: Thu, 29 Oct 2026 16:04:19 +0100 Subject: [PATCH] =?UTF-8?q?D65=20=3D=20A:=20reboot=5Fguest=20joins=20the?= =?UTF-8?q?=20agent's=20closed=20operator-action=20list=20=E2=80=94=20guar?= =?UTF-8?q?ds=20(busy=20controller=20file,=20heavy=20gate,=20jobs,=20lock,?= =?UTF-8?q?=20parked,=201/hour,=20the=20brake),=20result=20with=20both=20t?= =?UTF-8?q?imes,=20GET=20/guest/operator-reboot=20for=20the=20household=20?= =?UTF-8?q?line;=20one=20read-only=20sudo=20vector?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- CHANGELOG.md | 26 ++ configs/felhom-agent.sudoers | 3 + internal/capability/manifest.go | 1 + internal/localapi/controllersupervisor.go | 4 + internal/localapi/guestpower.go | 5 + internal/localapi/opactions.go | 19 +- internal/localapi/opactions_test.go | 4 +- internal/localapi/opreboot.go | 328 ++++++++++++++++++++++ internal/localapi/opreboot_test.go | 306 ++++++++++++++++++++ internal/localapi/server.go | 9 + 10 files changed, 697 insertions(+), 8 deletions(-) create mode 100644 internal/localapi/opreboot.go create mode 100644 internal/localapi/opreboot_test.go diff --git a/CHANGELOG.md b/CHANGELOG.md index df7a1c8..5dee3ba 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,29 @@ +## Unreleased — „Reboot guest" from the hub (D65 = A): `reboot_guest` joins the agent's closed list + +- **D65 = A (operator ruling 2026-10-29 15:50; felhom.eu `04` §6.1, `03`).** The agent's closed operator-action list is + now `restart_controller` and `reboot_guest` (arg: the vmid). No signature: a reboot destroys nothing. The act is the + existing guest-reboot path (`pct reboot ` of THAT guest over the existing exact grant) — never the host. +- **Guards** (each refuses with the reason; nothing is called, no record is written): a guest this agent did not + provision, not running, locked, or parked; the host-wide heavy-operation gate held (a backup of any tier the agent + runs, a restore test, an OS step — the reboot HOLDS the gate until the guest is up again); `jobBlocker` (an agent + backup job, a controller swap, a drive or NAS job, an escrow ceremony, a vzdump of the guest); the CONTROLLER busy — + its `data/ctl/busy` file (a backup, a restore, an off-site run, an app update), fresh within 90 s; a stale file is a + controller that stopped writing, not a busy one; any read failure but „no such file" refuses (fail closed); at most + ONE reboot per hour per guest (`//operator-reboot.json`, on disk — it survives an agent restart); the + operator restart's brake (a refusal in force refuses a reboot; a reboot counts as one of the 3 restarts in 15 minutes). +- **During the reboot** the guest-power watchdog and the controller supervisor leave the guest alone (`rebootInFlight`): + a racing start would fail the reboot's own start half. +- **The result** says both times from the press: „rebooted; the guest was up after 41 s, the controller answered after + 63 s" — or `failed`, said plainly. The record is written BEFORE the reboot; the new self-scoped + `GET /guest/operator-reboot` gives it to the controller for one day, for the household's line „Felhom support + restarted your box at