v0.261.0 — the controller no longer swaps itself out from under an app update (R-608, R-609)
gates / gates (push) Successful in 23s

The controller self-updates daily at 04:30 by default, and after any hub report
once a floor sits above the box. That swap restarts the controller container.
The window proposed for automatic app updates is 02:30-05:00. It contains 04:30.

R-608 — a two-way lock, wired in main.go (stacks never imports selfupdate):
- stacks.Manager.AnyUpdating() -> Updater.SetAppUpdatingCheck, consulted in the
  same three places as the existing backupRunning gate.
- Updater.IsUpdateRunning -> Manager.SetSelfUpdatingCheck; UpdatePreflight
  refuses `self_updating`.
- MEASURED: the gap was narrower than assumed. The update's `backing-up` phase
  already takes the backup single-flight, so that one phase was covered. The
  other six were not, and `starting`/`verifying` are where data may have moved.
- The lock must NOT latch: a held app does not block the controller's own
  updates, including the release that might fix the hold.

R-609 — the 409 carries `data.reason`, additively. transient (busy, updating,
deploying, migrating, self_updating) vs terminal (held, downgrade). Found while
writing the test: the router refuses a HELD app on its own line before the
preflight, so `held` would have been the one reason missing.

Five red-proofs, each seen to fail.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0159rPz1ZhFKsS53msqPYxtS
This commit is contained in:
2026-09-21 14:23:59 +02:00
parent d0d431b42b
commit 811f75736e
13 changed files with 591 additions and 2 deletions
+2
View File
@@ -2018,6 +2018,8 @@
"disk.err.attach_unavailable": "This drive cannot be attached right now — it may already be registered, or it may have been unplugged. Reload the page and look at Storage → Drives.",
"err.stacks.migracio_mar_folyamatban": "a migration is already running",
"err.stacks.update_downgrade": "This version is newer than the one in the catalog — moving back needs the operator.",
"err.stacks.update_self_updating": "The controller is updating. Try again in a few minutes.",
"err.selfupdate.alkalmazas_frissites_folyamatban": "An app update is in progress. The controller update can start when it has finished.",
"err.stacks.alkalmazas_nem_talalhato": "app not found: %s",
"err.stacks.ismeretlen_migracios_hatokor": "unknown migration scope: %s",
"err.stacks.migracios_naplo_irasa": "writing the migration log: %s",
+2
View File
@@ -2015,6 +2015,8 @@
"disk.err.attach_unavailable": "Ez a meghajtó most nem csatolható — lehet, hogy már regisztrálva van, vagy időközben lecsatolódott. Frissítsd az oldalt, és nézd meg a Tárhely → Meghajtók listát.",
"err.stacks.migracio_mar_folyamatban": "migráció már folyamatban",
"err.stacks.update_downgrade": "Ez a változat újabb a katalógusban lévőnél — visszalépés csak az üzemeltető kérésére.",
"err.stacks.update_self_updating": "A vezérlő éppen frissül. Próbáld újra néhány perc múlva.",
"err.selfupdate.alkalmazas_frissites_folyamatban": "Egy alkalmazás frissítése éppen folyamatban van. A vezérlő frissítése utána indítható.",
"err.stacks.alkalmazas_nem_talalhato": "alkalmazás nem található: %s",
"err.stacks.ismeretlen_migracios_hatokor": "ismeretlen migrációs hatókör: %s",
"err.stacks.migracios_naplo_irasa": "migrációs napló írása: %s",