Dual-stack public IP discovery for cluster address reporting
Problem
Clusters on dual-stack VPS hosts (e.g. Hetzner Cloud) report incomplete or unusable API addresses to miren.cloud:
0.0.0.0:8443gets reported and stored — when the server binds to0.0.0.0, this address is included in the status report. Cloud stores it as-is. It's meaningless as a connectable address.- Only one address family is discovered — IP discovery calls
ifconfig.cowhich returns whichever address family the OS uses for outbound (IPv6 on Hetzner). Netcheck also runs single-stack. So only one set of public addresses is reported, even when both IPv4 and IPv6 are available and assigned to the interface.
The result: miren cluster add shows 0.0.0.0:8443 as the primary address, and may only have one address family available. Connection attempts fail or are unreliable depending on the client's connectivity.
Fix
Runtime:
- Drop
ifconfig.codependency — local interface enumeration already provides all IPs for cert SANs, and netcheck is the authoritative source for public addresses - Make netcheck dual-stack — run concurrent calls forced over
tcp4andtcp6to discover public addresses on both address families
Cloud:
- Allow zero-port netcheck requests (enables lightweight IP-only discovery)
- Filter
0.0.0.0from stored API addresses (defense in depth)
Follow-ups
miren cluster list --availableto query cloud-known clusters with full address details (including--format=jsonsupport)- Consider whether explicitly configured IPs (via
server.tomladditional_ips) should survive the netcheck filter
Workaround
miren cluster add --address <ip>:8443
Bypasses cloud address discovery entirely by connecting directly.