Skip to content

chore(config): retire the two zenoh 1.9 removed routing keys - #325

Open
YuanYuYuan wants to merge 1 commit into
mainfrom
fix/config-cross-host-listen-endpoints
Open

chore(config): retire the two zenoh 1.9 removed routing keys#325
YuanYuYuan wants to merge 1 commit into
mainfrom
fix/config-cross-host-listen-endpoints

Conversation

@YuanYuYuan

@YuanYuYuan YuanYuYuan commented Aug 24, 2026

Copy link
Copy Markdown
Collaborator

Summary

zenoh 1.9 removed two config keys that hiroz still set. zenoh-config carries a deprecation wrapper for each, and warns on both.

key where hiroz set it value
routing.router.peers_failover_brokering crates/hiroz/src/config.rs, router overrides false
routing.router.peers_failover_brokering crates/rmw-zenoh-rs/config/…SESSION_CONFIG.json5 true
routing.peer.mode the same JSON5 file "peer_to_peer"

The two settings of the first key disagreed with each other. None of the three does anything. The runtime says so on every start of anything that sets it:

WARN zenoh_config: `routing.router.peers_failover_brokering` is deprecated and
has no effect; please remove it from your configuration

This change removes all three, and adds a test that pins their absence. With routing.peer gone the JSON5 file's routing block held nothing live, so that goes too.

The second one is also in the wrong file. It is a session config, and the key governs what a router does when forwarding between two peers attached to it. A session is not a router, so it would have had no effect there even on a runtime that honoured it.

What the key used to do, measured

The flag was real. It is still live on rmw_zenoh_cpp jazzy 0.2.9, where the same measurement runs both ways with one word changed in the router config:

peers_failover_brokering published cross-host heard
false (its shipped value) 75 0
true 75 75

The listener's own log gives the mechanism:

false: WARN ... Unable to connect to any locator of scouted peer c76ee898...: [tcp/[::1]:34357]
true:  [INFO] [lb1]: I heard: [Hello World: 1]

That the false cell scouted the talker proves both nodes shared a router. Gossip reached across; only the data path did not.

So zenoh 1.9 removed a capability, not a dead option. Know that before deleting the key. It also deserves a line in whatever documents the upgrade.

Why removing it costs nothing here

the capability only applies to two peers sharing one router a router does not relay between peers attached to it without this flag
hiroz defaults to a router per host connect/endpoints is tcp/localhost:7447, so every node reaches a router on its own machine
in that topology the key has no role traffic crosses router to router, which this flag never governed
both projects already shipped it off hiroz false, rmw_zenoh_cpp false

Measured across topologies, hiroz delivers cross-host either way:

router layout cross-host heard / published cross-host peer links
router per host (the default) 149 / 150 0
one shared router 0 / 150 0

The shared-router row is a separate problem, and this change does not address it. This records it rather than fixing it, because a deployment reaches that row only by overriding the shipped connect endpoint.

What fails without this

Nothing fails. The keys are inert; that is the point.

today with this change
the_shipped_overrides_name_no_removed_key fails: the router overrides name peers_failover_brokering passes
the_vendored_config_files_set_no_removed_key fails: the session JSON5 sets both keys passes
router startup warns about a deprecated key silent

Both assertions run in every direction: green as committed, then one red probe per key per surface — four in all, each returning rc=101. Each arm fires only on its own surface, so they are two independent checks rather than one written twice. Both also assert their input is non-empty, so neither can pass vacuously.

The two surfaces need different needles for the same key. An override spells it as a path, routing/peer/mode; a JSON5 file spells it as nested blocks with the value on the leaf. An earlier version of this test used one token for both and would have missed the file side in silence.

An earlier revision of that test asserted against format!("{config:?}"). That renders zenoh's whole config tree, defaults included. It therefore could not tell an override from a field that merely exists, and it failed on a clean tree. It now inspects router_overrides() and session_overrides() — what hiroz sets.

Test results

check result
cargo test -p hiroz on this branch 55 passed, 7 failed
cargo test -p hiroz on main 55 passed, 7 failed
failures unique to this branch none
cargo clippy -p hiroz --all-targets -- -D warnings clean
cargo fmt --check clean

The 7 are pre-existing doctest compile failures in action/client.rs and action/server.rs (ZActionClient, ZActionClientBuilder, GoalHandle, ZActionServerBuilder). Confirmed against main rather than assumed.

Breaking changes

None. Both keys are inert on zenoh 1.9, so no behaviour changes at any setting.

Not verified

  • hiroz on zenoh 1.8. Every "the flag was live" number above comes from rmw_zenoh_cpp jazzy 0.2.9, which is a different stack. A true before-and-after needs hiroz pinned to zenoh = "1.8".
  • The zenoh version behind that C++ build. libzenohc.so carries no symbols, and three probe strategies recovered no version string.
  • Whether any deployment relied on this flag. Both projects shipped it off, but a user config could have set it.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Updates peer networking defaults so hiroz nodes can communicate across hosts.

Changes:

  • Binds peer sessions to all interfaces.
  • Removes a deprecated router override.
  • Adds default-session connectivity and configuration tests.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
crates/hiroz/src/config.rs Updates session and router defaults.
crates/hiroz/tests/two_session_default_config.rs Tests independent default sessions and reachable listeners.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread crates/hiroz/src/config.rs Outdated
@YuanYuYuan
YuanYuYuan force-pushed the fix/config-cross-host-listen-endpoints branch from 34a2e00 to 3663bdd Compare August 24, 2026 18:37
@YuanYuYuan
YuanYuYuan requested a balanced review from Copilot August 25, 2026 03:39

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 3 out of 3 changed files in this pull request and generated no new comments.

@YuanYuYuan
YuanYuYuan force-pushed the fix/config-cross-host-listen-endpoints branch 3 times, most recently from 1408f31 to 06e5501 Compare August 25, 2026 08:28
@YuanYuYuan
YuanYuYuan force-pushed the fix/config-cross-host-listen-endpoints branch 2 times, most recently from 9ce79a6 to b02cb78 Compare August 25, 2026 10:25
@YuanYuYuan YuanYuYuan changed the title fix(config): two hiroz nodes on two hosts deliver nothing to each other fix(config): a peer advertises a locator no other host can dial Aug 25, 2026
@YuanYuYuan
YuanYuYuan force-pushed the fix/config-cross-host-listen-endpoints branch from b02cb78 to 625cfaa Compare August 25, 2026 18:33
@YuanYuYuan YuanYuYuan changed the title fix(config): a peer advertises a locator no other host can dial chore(config): retire peers_failover_brokering, which zenoh 1.9 removed Aug 25, 2026
zenoh 1.9 removed routing.router.peers_failover_brokering. The runtime
warns on every start of anything that sets it:

  WARN zenoh_config: `routing.router.peers_failover_brokering` is
  deprecated and has no effect; please remove it from your configuration

hiroz set it twice, and the two disagreed. The library set false; the
vendored rmw-zenoh-rs session config set true -- in a session config,
where a key about router forwarding has no meaning even on a runtime
that honoured it. Neither did anything.

Measured on rmw_zenoh_cpp jazzy 0.2.9, where the key is still live: with
one shared router and two peers across hosts, false delivers 0/75 and
true delivers 75/75. So this was a real capability, and zenoh 1.9 took
it away rather than retiring a dead flag. Both projects had already
switched it off, and both default to a router per host, where the key
has no role.

The new test pins the absence rather than the deletion. A deprecated key
compiles, validates, and produces a warning nobody reads.
@YuanYuYuan
YuanYuYuan force-pushed the fix/config-cross-host-listen-endpoints branch from 625cfaa to c34ee90 Compare August 25, 2026 19:02
@YuanYuYuan YuanYuYuan changed the title chore(config): retire peers_failover_brokering, which zenoh 1.9 removed chore(config): retire the two zenoh 1.9 removed routing keys Aug 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants