57 lines
3.8 KiB
Markdown
57 lines
3.8 KiB
Markdown
# REPORT — live-drive Batch 1 (+F17) → controller v0.61.0 (2026-06-14)
|
|
|
|
Implemented the controller-side fixes from `LIVE-DRIVE-FIXSPEC-2026-06-14.md` (Batch 1 + the CRITICAL
|
|
F17), shipped as **v0.61.0** to demo guest 9201. Each fix has a regression test that fails on the
|
|
pre-fix code; the authoritative `go build && go vet && go test ./...` is green on the Linux build server.
|
|
|
|
## Fixes (each its own commit)
|
|
|
|
| Finding | Sev | Change | Test | Live-verified |
|
|
|---|---|---|---|---|
|
|
| **F17** | CRIT | per-app restore now **replays the captured `.sql` dump** (new `appbackup.ImportDump` + `backup.reimportDBDumps`), AFTER volume restore so the **dump wins**; volume/DB failures now surface | `restore_db_test.go` (injectable seams) | **marker DB round-trip PASSED** on romm |
|
|
| **F1** | HIGH | guest RAM cap from `docker info` (daemon runs in LXC); deploy guard "used" = committed memory | `info_cgroup_test.go` (cgroup + docker-info paths) | `total_mem_mb=2048` (was 15771) |
|
|
| **F20-BUG1** | HIGH | `agentapi.FormatDisk` surfaces non-2xx/`ok:false` instead of zero-value success | `disks_test.go` (502→err) | unit |
|
|
| **F5 (catalog)** | HIGH | uptime-kuma healthcheck → v2 `extra/healthcheck` binary + 180s start_period | — (catalog) | uptime-kuma **healthy → route 302** (was 404) |
|
|
| **F5 (dashboard)** | HIGH | `routeUnpublished` helper + distinct indicator for unhealthy/restarting deployed apps | `route_unpublished_test.go` | render test |
|
|
| **F8** | LOW-MED | `controller.yaml` persisted 0600 (holds infra tokens) | `config_perms_test.go` | unit (Linux) |
|
|
| **F6** | LOW | deploy POST → 202 + "Telepítés elindítva" (was "deployed" before compose) | — | code/UI |
|
|
| **F7** | LOW | `status-refresh` 30s → 10s | — | cadence |
|
|
| **F4** | TRIV | `GET /api/stacks/rescan` → 405 + `Allow: POST` | — | `→ 405` |
|
|
|
|
## Key implementation notes
|
|
|
|
- **F17 reuse decision:** `ImportDump` lives in `internal/appbackup` (the DB-domain package with
|
|
`DiscoverDatabases`/`DumpOne`/`getMariaDBPassword`), NOT reusing `appexport`'s unexported copies —
|
|
`appexport→appbackup` already exists, so the reverse would import-cycle. `DiscoveredDB` carries the live
|
|
container's own creds, so no env threading. Precedence: replay runs after volume restore → `.sql` wins.
|
|
- **F1 reroot:** the FIXSPEC's cgroup-limit approach was a **no-op** on the demo (the container's own
|
|
cgroup is unlimited; the 2 GB cap is on the LXC ancestor, hidden; no lxcfs in the container). The
|
|
working source is `docker info` MemTotal. The deploy guard's "used" switched from host RSS (not
|
|
per-guest observable) to the controller's committed-memory accounting.
|
|
|
|
## Deploy & verification
|
|
|
|
- Built+pushed `gitea.dooplex.hu/admin/felhom-controller:0.61.0`; deployed via the guest-9201
|
|
golden/bootstrap mechanism (`/etc/felhom-controller-image` + restart bootstrap). Healthy, `/api/health`
|
|
+ dashboard 200, no startup errors.
|
|
- Live-verified: F1 (`total_mem_mb=2048`), F4 (405), F5 (uptime-kuma healthy → route 302), **F17 (marker
|
|
row dropped after backup was restored by `/backup/restore`)**.
|
|
|
|
## Test approach
|
|
|
|
Controller code is largely `//go:build linux`; dev host is Windows. Per-commit gate =
|
|
`CGO_ENABLED=0 GOOS=linux go build && go vet` locally (compiles code + tests); authoritative
|
|
`go test ./...` ran on the Linux build server (all green, incl. the linux `system` tests).
|
|
|
|
## Not in this batch (SUPERVISED, next session — agent/golden)
|
|
|
|
**F9** (HDD provisioning/guest-attach + reporting), **F20-BUG2** (durable_id scheme), **F20-BUG3**
|
|
(async mkfs). These touch the host agent, golden template, and bring-up (blast radius beyond the
|
|
disposable demo).
|
|
|
|
## Final state
|
|
|
|
Demo guest 9201 on `:0.61.0`, healthy; agent unchanged. Apps: actualbudget, gokapi, mealie, privatebin,
|
|
romm(+db,+redis), uptime-kuma (now **healthy**), vikunja — all healthy. felhom-usb still not attached to
|
|
the guest (F9, deferred).
|