Skip to content

20260910 - Feed the tracker from blah2_api, not from retina-gui - #37

Merged
Purple10101 merged 1 commit into
mainfrom
20260910-feed-tracker-from-blah2api
Sep 10, 2026
Merged

Purple10101 merged 1 commit into
mainfrom
20260910-feed-tracker-from-blah2api

Conversation

@Purple10101

Copy link
Copy Markdown
Collaborator

Config and compose, so blah2_api feeds retina-tracker directly and the tracker has its control port.

Ships with retina-gui #86 and the retina-tracker branch. Not before retina-gui: exactly one process may feed the tracker's ingest socket, and until retina-gui stops, it is the one holding it.

What changes

tracker_forward is turned on and pointed at the real address. The default named blah2_tracker:3012, a container from blah2's own compose that does not exist here. retina-tracker runs with network_mode: host and binds loopback, so it is 127.0.0.1:30100.

Worth knowing: this flag was already enabled: true on jonathan-node-1, with port 3012. blah2_api had been retrying a connection to a closed port every five seconds, indefinitely, and the node worked only because retina-gui was feeding the tracker instead. Found while surveying for the switchover.

blah2_api forwards the enriched frame. It attaches ADS-B truth per detection before forwarding, so the tracker gets the annotated frame rather than the bare one. That is where a track's adsb_hex comes from.

The tracker gains --control-host / --control-port (30101). That is what makes the handover possible at all: Auto-Calibrate resets the tracker between candidate towers and at the start of every dwell, and it used to do that with a message mixed into the detection socket. It cannot any more, because blah2_api holds that socket. POST /reset is its own door.

Loopback for both ports, same reasoning as the existing --tcp-host 127.0.0.1 comment: under host networking, 0.0.0.0 publishes on the LAN.

One deployment hazard, not caused by this but exposed by it

blah2 connects to blah2_api once, in a constructor, and never reconnects. Verified the hard way during the switchover: recreating blah2_api left blah2 talking to a closed socket, /api/detection went empty, and the radar produced nothing until blah2 itself was restarted. Restarting blah2 then wedged the RSPduo, which needed the force-reset from retina-gui's mode.py to clear.

So: a deployment that recreates blah2_api must also restart blah2. Worth confirming a mender deployment does both before this goes to the fleet.

Verification

Both files parse; the compose diff is three lines. Exercised live on jonathan-node-1: blah2_api logs Connected to tracker at 127.0.0.1:30100, and the tracker has been receiving real frames since 10:16 UTC with exactly one connection to its ingest socket.

🤖 Generated with Claude Code

Turns on network.tracker_forward and points it at the sidecar's real
address. The default names 'blah2_tracker:3012', a container from blah2's
own compose that does not exist here; retina-tracker runs with network_mode
host and binds loopback, so it is 127.0.0.1:30100.

blah2_api enriches each frame with ADS-B truth before forwarding, so the
tracker now gets the annotated frame rather than the bare one. That is where
a track's adsb_hex comes from, and it is a better frame than retina-gui was
sending.

Also gives the tracker its control port, which is what makes the handover
possible at all. Auto-Calibrate resets the tracker between candidate towers
and at the start of every dwell, and it used to do that with a message mixed
into the detection socket. It cannot any more: that socket accepts one
connection at a time and blah2_api holds it. POST /reset is its own door.

This has to ship with retina-gui's matching change and never before it.
Exactly one process may feed that socket, and until retina-gui stops, it is
the one holding it.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@Purple10101
Purple10101 merged commit 3f70924 into main Sep 10, 2026
1 check passed
@Purple10101
Purple10101 deleted the 20260910-feed-tracker-from-blah2api branch September 10, 2026 14:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant