style: gofmt normalization — no logic changes

gofmt -w across the controller tree (46 files) so gofmt -l is empty — disarms the
formatting landmine where a targeted edit + accidental gofmt -w swept ~46 unrelated
files. Pure formatting: whitespace + gofmt's optional-semicolon removal in reflowed
inline closures. One doc comment reworded ('' -> 'the empty string') to avoid gofmt's
Go-1.19 doc-comment typographic substitition ('' -> curly quote) muddying its meaning.
No build/vet/test behavior change.
This commit is contained in:
2026-07-25 07:37:02 +02:00
parent 0a582ea07b
commit 2487681396
46 changed files with 221 additions and 193 deletions
+9 -9
View File
@@ -344,15 +344,15 @@ func (s *Server) driveGateLoop() {
// retried → the app is stuck Exited forever even after the bind lands. The agent reports a `guest_boot_id`
// that changes on every guest boot but is stable across a controller-only restart; the controller
// persists the last-seen value. When it changes (the controller restarts WITH the guest), this:
// 1. gathers the deployed drive-backed apps' stable drive paths,
// 2. GATES on the REAL live in-guest bind — `pollLiveBinds`/`driveBindLive` wait (bounded) until each
// drive's stable path is an actual mountpoint in the controller's own /mnt (rslave) view, which is
// exactly when docker can recreate the app. (The old code sampled the agent's BoundUnderParent
// ONCE during fast startup, raced the ~18s rebind, recreated nothing, and persisted the boot-id —
// burning its one-shot. That is the bug this fixes.)
// 3. recreates every deployed drive-backed app whose bind is now live (`shouldRecreateOnBoot` is
// state-independent, so a stuck-Exited create-time-failure app is included), then persists the
// new boot-id.
// 1. gathers the deployed drive-backed apps' stable drive paths,
// 2. GATES on the REAL live in-guest bind — `pollLiveBinds`/`driveBindLive` wait (bounded) until each
// drive's stable path is an actual mountpoint in the controller's own /mnt (rslave) view, which is
// exactly when docker can recreate the app. (The old code sampled the agent's BoundUnderParent
// ONCE during fast startup, raced the ~18s rebind, recreated nothing, and persisted the boot-id —
// burning its one-shot. That is the bug this fixes.)
// 3. recreates every deployed drive-backed app whose bind is now live (`shouldRecreateOnBoot` is
// state-independent, so a stuck-Exited create-time-failure app is included), then persists the
// new boot-id.
//
// Apps on a drive that never goes live within the window are left to the normal gate (stop→return→
// restart). Single-flight (runs once, before the periodic gate, in driveGateLoop). Best-effort.