Repository navigation
fix(networking): restore and normalize EXO_BOOTSTRAP_PEERS connection resolution - #2468
Open
presentyourlove wants to merge 1 commit into
Open
presentyourlove wants to merge 1 commit into
presentyourlove wants to merge 1 commit into
Conversation
… resolution - Implement BootstrapPeerResolver to normalize IPv4, IPv6, DNS hostnames, and legacy libp2p multiaddrs into standard Zenoh locators - Implement BootstrapConnector to configure ZENOH_CONNECT_ENDPOINTS and probe peer reachability without blocking - Remove temporary ValueError block and restore CLI flag documentation for --bootstrap-peers - Add 10 comprehensive unit tests in test_bootstrap_peers.py - Resolves TODO.md item exo-explore#1 (EXO_BOOTSTRAP_PEERS is currently broken)
cdvankammen
added a commit
to cdvankammen/exo
that referenced
this pull request
Oct 23, 2026
… (exo#2468) Port of upstream PR exo-explore#2468 onto fork chain head b12c3a2. Conflict resolution: src/exo/routing/__init__.py — upstream added BootstrapConnector/BootstrapPeerResolver/ResolvedPeer exports; fork already had DeviceAwareMoERouter. Kept both sides (additive merge).
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.
Description
This PR resolves item 1 in
TODO.md:EXO_BOOTSTRAP_PEERS is currently broken, re-enabling manual bootstrap peer connection across subnets, firewalls, and public IP addresses.Background & Root Cause
During the migration from libp2p to Zenoh, manual bootstrap peering was temporarily disabled with
raise ValueError("Bootstrap peers has been temporarily removed")andhelp=argparse.SUPPRESSinsrc/exo/main.py. This occurred because users supplied diverse address formats (plain IPv4/IPv6, custom ports, hostnames, or legacy/ip4/.../tcp/.../p2p/...multiaddrs), while Zenoh requires standardized locator endpoints (e.g.tcp/<host>:<port>). Without normalized peer resolution, starting Exo with--bootstrap-peersorEXO_BOOTSTRAP_PEERScaused crashes or startup refusal.Key Changes
Peer Address Normalization (
src/exo/routing/peer_resolver.py):BootstrapPeerResolver: Parses, cleans, and standardizes multi-format peer strings:192.168.1.100->tcp/192.168.1.100:52414).10.0.0.5:6000->tcp/10.0.0.5:6000).[::1]:52414/::1->tcp/[::1]:52414).node1.cluster.local:52414->tcp/node1.cluster.local:52414)./ip4/192.168.1.100/tcp/52414/p2p/...->tcp/192.168.1.100:52414).tcp/192.168.1.100:52414-> preserved).Zenoh Connection Configuration & Probing (
src/exo/routing/bootstrap_connector.py):BootstrapConnector.apply_zenoh_env: SetsZENOH_CONNECT_ENDPOINTSenvironment variable with normalized locators so the underlying Zenoh runtime dials bootstrap peers on startup.BootstrapConnector.probe_peer_reachability: Non-blocking, asynchronous TCP probe for peer liveness with friendly logging.CLI & Main Entrypoint Restoration (
src/exo/main.py):raise ValueErrorbarrier inmain_inner.--bootstrap-peers.Args.bootstrap_peersto use robust delimiter splitting andField(default_factory=list).Unit Tests (
src/exo/shared/tests/test_bootstrap_peers.py):Verification
.venv/Scripts/pytest.exe src/exo/shared/tests/test_bootstrap_peers.py -v # 10 passed in 0.31s.venv/Scripts/ruff.exe check src/exo/routing/peer_resolver.py src/exo/routing/bootstrap_connector.py src/exo/routing/__init__.py src/exo/main.py src/exo/shared/tests/test_bootstrap_peers.py # All checks passed!Related Issues
TODO.md(EXO_BOOTSTRAP_PEERS is currently broken)