Commit Graph
3 Commits
Author SHA1 Message Date
sam 3edbd6b0a7 feat(releaseupdate): transactional self-update through archied (#1633)
archied update install verifies the release zip, checks every binary
reports the release, pulls the agent image by digest, backs up the
database in-process and stages the binaries before handing off to
archied update watchdog in its own process. The watchdog restarts units
in release order, requires archied healthy for 120s and otherwise rolls
back binaries and image policy, restoring the database only when a
migration ran. Boot recovery resumes the frozen watchdog.

Deletes scripts/archie-update-install, scripts/archie-update-watchdog,
the updater's --from-source and --auto, CommandInstaller,
ScriptInstaller and the update-image and update-topology subcommands.
2026-10-12 03:21:02 +11:00
sam a8b3dc55d0 refactor(staterpc,releaseupdate,agentexec,storecontract,worktree): cut comments down to what the code does 2026-10-03 22:00:43 +10:00
sam 29b074ef77 refactor(archied): move the update relay to the process that owns updates
The dashboard's Run read the watchdog's phase-2 report off local disk and
put it on the activity stream. That is a host-local file read in the process
that is moving off the host: the watchdog restarts archied and leaves its
verdict beside archied, so archied is what can read it.

The daemon now polls and relays it, publishing the same event through the
same bus, so it persists with every other event and reaches whichever
dashboard is watching. The event builder moves to releaseupdate, which owns
Report and its verification; the dashboard keeps only what it needs to tell
an installer where to write.

The startup poll stays: the watchdog writes its result only once the process
answers /healthz, so a single read at boot can always miss the report
describing that very boot.

persistAndBroadcastEvents takes the daemon context and detaches it for the
insert, which is what it always did with context.Background() -- the last
events of a run are the ones an operator reads afterwards.
2026-09-09 23:55:20 +10:00