Commit 2d91ed9
fix(satellite): bridge controller-runtime logger to slog
cmd/satellite/main.go set up slog but never wired controller-
runtime's logr — so every log call from the c-r manager and the
per-CRD reconcilers (Resource, ResourceDefinition, Snapshot,
StoragePool, PhysicalDevice) was silently dropped.
Symptom: the satellite emitted only its three startup INFO lines
("blockstor-satellite starting", "agent starting", "satellite
controller-runtime manager ready"), followed by c-r's one-shot
goroutine dump warning that log.SetLogger was never called, and
then nothing — making it impossible to tell from the logs whether
reconcilers were running, returning errors, or sitting on a
blocked watch.
Hook logr.FromSlogHandler(logger.Handler()) into ctrl.SetLogger
so every reconcile event lands in the satellite's JSON log stream
next to the startup events. The controller binary already does
the same via zap (cmd/controller/main.go:105).
Co-Authored-By: Claude <noreply@anthropic.com>
Signed-off-by: Andrei Kvapil <kvapss@gmail.com>1 parent 9cc992f commit 2d91ed9
1 file changed
Lines changed: 9 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
32 | 32 | | |
33 | 33 | | |
34 | 34 | | |
| 35 | + | |
35 | 36 | | |
36 | 37 | | |
37 | 38 | | |
| |||
64 | 65 | | |
65 | 66 | | |
66 | 67 | | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
67 | 76 | | |
68 | 77 | | |
69 | 78 | | |
| |||
0 commit comments