Drop blah2 tracker config and let it reach deployed nodes - #40
Merged
Merged
Conversation
blah2's built-in tracker has been removed, so process.tracker and network.ports.track now configure code that does not exist. Removing them from default.yml alone reaches no node. The merger seeds user.yml with a whole copy of default.yml on first boot and user.yml overrides default.yml, so every node on the estate persists the block that shipped when it booted. That is exactly how 46f7bc2 came to sit unshipped: it set process.tracker.enable: false on 2026-07-24, released in v0.4.2.0 and every tag since, and reached zero nodes in nearly two months, so every node kept running the tracker and paying for its unbounded nInactive growth. migrate_remove_tracker() is unconditional, unlike migrate_doppler_span() and migrate_tracker_forward(), which compare against a LEGACY_* value so a deliberate choice survives. There is no deliberate choice to protect once the code the keys configured is gone, and whole-block equality would skip exactly the nodes whose M/N someone had tuned. Safe to ship alongside the blah2 change: config-merger has restart "no" and blah2 depends on it completing, so the merged config is regenerated from the baked-in default.yml before blah2 may start, on every compose up. Mender does that on rollback as well, where the old merger restores the old keys for the old binary, and the migration never writes user.yml to disk. The cost is that hand-swapping a pre-removal blah2 image onto an updated node will now abort on the missing key, since ryml's default error handler calls abort(). Verified end to end against fairforest-b's real user.yml: the merged config loses both keys and keeps fc, location, node_id, tracker_forward, ADS-B truth and the detection and clutter settings. Also drops the dead "3003:3003" mapping from the staging compose. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
main added migrate_adsb_truth_server() in the same places this branch adds migrate_remove_tracker(): a function body and a call in main(). Git merged the source cleanly but collapsed two similarly-shaped tests in test_merge_config.py, whose "does not rewrite user.yml" cases have the same middle. Resolved by keeping both sides everywhere: five migrate_*() functions, both new calls, and both sets of tests. 53 tests pass on the result.
Collaborator
Author
|
Pairs with offworldlabs/blah2-arm#69. Deploy |
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.
Summary
Makes
process.tracker.enable: falseactually reach deployed nodes, and dropsthe now-dead tracker config entirely. Pairs with
offworldlabs/blah2-arm#69, which removes blah2's built-in tracker.
The problem this fixes
config/default.ymlhas shippedprocess.tracker.enable: falsesince2026-07-24 (
46f7bc2), released in v0.4.2.0 and every tag since — its owncommit message cites memory growth as the reason.
It has reached zero nodes in nearly two months.
The merger seeds
user.ymlwith a whole copy ofdefault.ymlon first boot,and
user.ymloverridesdefault.yml. So every node on the estate hasenable: truefrozen in its own overlay from whenever it first booted.Confirmed on fairforest-b and owl-ded9: both merged configs said
enable: true.That tracker was leaking 2.00 MB/h — 100% of measured RSS growth, 18 days to
exhaust a 2 GB board with no swap. See the linked PR for the measurement.
migrate_remove_tracker()stripsprocess.trackerandnetwork.ports.trackatmerge time. It joins the three existing
migrate_*()functions that exist forexactly this reason.
Design notes
Unconditional, unlike the migrations that compare against a
LEGACY_*value to let a deliberate choice survive. There is no deliberate choice to
protect: the code these keys configured no longer exists, so every value is
equally dead.
Drops the keys rather than rewriting them, leaving
user.ymlon diskuntouched. That keeps the migration load-bearing rather than a one-shot fixup,
and lets a Mender rollback regenerate the old config from the old
default.yml. Verified live: after the merger ran on owl-ded9,user.ymlwasbyte-identical to a pre-migration backup.
Verified live on owl-ded9
Both keys gone from the merged config,
user.ymluntouched,retina_trackersidecar config intact, and the node ran 12.8 h overnight with the paired blah2
image at 0.167 MB/h against the 2.00 MB/h it replaces.
Deployment: three images move together
config-merger,blah2andblah2-apimust be deployed as a set. Againsta config this migration has stripped:
process.tracker.enablethrough ryml, whose defaulterror handler calls
abort()— it dies rather than warns. The docstringcovers this.
server_tracker.listen(config.network.ports.track)with the key gone and binds a random free port, silently. This one is not
in the docstring and is worth adding: during verification
/api/trackerkeptanswering 200 after the strip, purely because the API had not restarted.
Merge note
This branch was 3 behind main and has been merged up. main added
migrate_adsb_truth_server()in the same two places this branch addsmigrate_remove_tracker()— a function body and a call inmain()— and gitcollapsed two similarly-shaped tests in
test_merge_config.pywhose "does notrewrite user.yml" cases share a middle. Resolved by keeping both sides
everywhere. 53 tests pass, covering both migrations.
🤖 Generated with Claude Code