observability: the P10 logs live-follow SOURCE — remote node-journal streaming + the service→unit mapping (the follow #868 mounted but honest-rested) #876

Closed
opened 2026-08-26 19:23:40 +00:00 by matou-build-agent · 1 comment

Split from #868

#868 MOUNTED the P10 logs transport on the real control plane: the production LogCatalogue (control-plane/cmd/control-plane/logs_wiring.go) is real, the three routes answer instead of 404, and a composition-root regression asserts the mount. What #868 could NOT honestly build is the live-follow line source, because two owners the follow needs do not exist in the tree — so today the hub's FollowFunc fails loud (errLogSourceNotWired) and the download returns the honest empty bounded artifact.

This issue is that source.

What to build

  • A service→systemd-unit-name mapping. A catalogue service slug is NOT its systemd unit (files runs as phpfpm-nextcloud.service etc.). Nothing in the tree maps a slug to the unit(s) it runs on a node. DDR 0203 ruling 5's service-unit targets need it. This is needs-design — decide where the mapping lives (catalogue table? clan module metadata? per-service package const?).
  • A remote node-journal streaming transport. The FollowFunc for a service-unit target follows a unit on a node. The existing pattern is clan.Adapter.UnitActive (internal/clan/adapter.go) — ssh <deploy-target> systemctl is-active <unit>, one-shot buffered CombinedOutput() over the sshRun seam. The follow extends it to a STREAMING ssh <target> journalctl -u <unit> -f -o cat reading the pipe line-by-line into the channel logstream.FollowFunc requires, plus a bounded journalctl -u <unit> -n <N> for the download. journalctl is currently invoked nowhere remotely (only local in internal/vm/manager.go).
  • Operator-log posture note. Streaming raw service-unit journals to operator browser sessions was ACCEPTED by DDR 0203 ruling 5 (operators-only, no redaction — secrets never enter logs by construction). Confirm that still holds for a live journalctl -f against production nodes before wiring it live; this is the one part of #868's work that touches runtime posture.
  • Wire the real source into logsSurfaceOptions (composeWhole, via the concrete *clan.Adapter — the resting composition stays fail-loud).

Refs

DDR 0203 ruling 5, ADR 0027, #806 (the hub), #807/#808 (the seams), #868 (the mount). Found while implementing #868.

## Split from #868 #868 MOUNTED the P10 logs transport on the real control plane: the production `LogCatalogue` (`control-plane/cmd/control-plane/logs_wiring.go`) is real, the three routes answer instead of 404, and a composition-root regression asserts the mount. What #868 could NOT honestly build is the live-follow **line source**, because two owners the follow needs do not exist in the tree — so today the hub's `FollowFunc` fails loud (`errLogSourceNotWired`) and the download returns the honest empty bounded artifact. This issue is that source. ## What to build - [ ] **A service→systemd-unit-name mapping.** A catalogue service slug is NOT its systemd unit (`files` runs as `phpfpm-nextcloud.service` etc.). Nothing in the tree maps a slug to the unit(s) it runs on a node. DDR 0203 ruling 5's `service-unit` targets need it. **This is `needs-design`** — decide where the mapping lives (catalogue table? clan module metadata? per-service package const?). - [ ] **A remote node-journal streaming transport.** The `FollowFunc` for a `service-unit` target follows a unit on a node. The existing pattern is `clan.Adapter.UnitActive` (`internal/clan/adapter.go`) — `ssh <deploy-target> systemctl is-active <unit>`, one-shot buffered `CombinedOutput()` over the `sshRun` seam. The follow extends it to a STREAMING `ssh <target> journalctl -u <unit> -f -o cat` reading the pipe line-by-line into the channel `logstream.FollowFunc` requires, plus a bounded `journalctl -u <unit> -n <N>` for the download. `journalctl` is currently invoked nowhere remotely (only local in `internal/vm/manager.go`). - [ ] **Operator-log posture note.** Streaming raw service-unit journals to operator browser sessions was ACCEPTED by DDR 0203 ruling 5 (operators-only, no redaction — secrets never enter logs by construction). Confirm that still holds for a live `journalctl -f` against production nodes before wiring it live; this is the one part of #868's work that touches runtime posture. - [ ] Wire the real source into `logsSurfaceOptions` (composeWhole, via the concrete `*clan.Adapter` — the resting composition stays fail-loud). ## Refs DDR 0203 ruling 5, ADR 0027, #806 (the hub), #807/#808 (the seams), #868 (the mount). Found while implementing #868.
Owner

Landed by #870 (7292b74d, close-report 2026-08-27 00:36Z) which folded #876 + #877: internal/clan/Adapter.FollowUnit (journald-over-SSH, live-proven on a clan node, DDR 0211 service→unit map) and internal/oplog.Store (bounded, drop-oldest, ages-out; deploy tees into it; P10 catalogue/follow/download read it). Closing as landed in the 2026-08-27 sweep. Residue = the rescue/update emitters still discard their streams — filed separately.

Landed by **#870** (`7292b74d`, close-report 2026-08-27 00:36Z) which folded #876 + #877: `internal/clan/Adapter.FollowUnit` (journald-over-SSH, live-proven on a clan node, DDR 0211 service→unit map) and `internal/oplog.Store` (bounded, drop-oldest, ages-out; deploy tees into it; P10 catalogue/follow/download read it). Closing as landed in the 2026-08-27 sweep. Residue = the rescue/update emitters still discard their streams — filed separately.
ben closed this issue 2026-08-27 04:56:04 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Matou/idss#876
No description provided.