fix(music-assistant): reconcile publish_ip/bind_ip to node's live v30iot IP #131

Merged
k.renner merged 1 commits from worktree-fix+music-assistant-sendspin-publish-ip into master 2026-07-08 15:28:07 +00:00
1 Commits
Author SHA1 Message Date
k.rennerandClaude Opus 4.8 a08bfe8f55 fix(music-assistant): reconcile publish_ip/bind_ip to node's live v30iot IP
Music Assistant persists publish_ip (the literal IP advertised to players)
and bind_ip in /data/settings.json. A prior hotfix pinned both to
10.2.30.137 because MA's auto-detect picks the mgmt default-route IP (eth1
carries routeMetric 4096, so v30iot is never the default route), which IoT
players can't reach.

After MA moved to k8s-2, whose DHCP eth1 lease is 10.2.30.193, the stored
.137 is no longer local. The stream server falls back to all-interfaces and
survives, but the Sendspin server (aiosendspin :8927) has no fallback: it
fails to bind and dies, and its proxy then targets the dead .137 instead of
loopback -> Sendspin/Voice PE players never register.

eth1 is DHCP and MA is not node-pinned, so any stored IP goes stale on the
next reschedule or lease change. Instead of pinning an IP, an initContainer
recomputes the current v30iot (10.2.30.0/24) address from the live interface
on every boot and writes publish_ip=<that IP> and bind_ip=0.0.0.0 into
settings.json before MA reads it. hostNetwork means it sees eth1 directly;
it reuses the MA image (stdlib only) and fails closed if no v30iot address
is present, so MA never comes up advertising a wrong IP.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-08 17:25:07 +02:00