20260910 - Feed the tracker from blah2_api, not from retina-gui - #37
Merged
Merged
Conversation
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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_forwardis turned on and pointed at the real address. The default namedblah2_tracker:3012, a container from blah2's own compose that does not exist here. retina-tracker runs withnetwork_mode: hostand binds loopback, so it is127.0.0.1:30100.Worth knowing: this flag was already
enabled: trueon 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_hexcomes 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 /resetis its own door.Loopback for both ports, same reasoning as the existing
--tcp-host 127.0.0.1comment: under host networking,0.0.0.0publishes 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/detectionwent 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'smode.pyto 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