-
Notifications
You must be signed in to change notification settings - Fork 210
Automatically update the endpoint list when then network configuration change #2020
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
On Unix systems, use netlink to detect added or delete IPv4 addresses to: * Renew the interface list. * Update the node locators. * Restart the scouting to use the new addresses/discard the old addresses. This is still quite hacky, with the following shortcommings: * We do not handle IPv6 addresses. * We perform the locator update and the scouting reset even if the new/old addresses are not used as per the configuration. * The code overall is not the best quality.
Remove the scouting reset upon interface change. This is in preparation of an improvemnt of the scouting update upon interface change.
When updating the locators after a network change, send the new locators to the routers and the peers if in linkstate mode.
…TLINK NETLINK is only available on Linux. The poll interval may be less reactive and efficient, but it is available everywhere. Moreover, this fix the case where a new locator was not deteced if an interface IP was added before the interface was UP and RUNNING.
…ators in the same order
PR missing one of the required labels: {'new feature', 'dependencies', 'internal', 'bug', 'documentation', 'breaking-change', 'enhancement'} |
ffbdb8e
to
3d8d2b6
Compare
PR missing one of the required labels: {'documentation', 'enhancement', 'bug', 'new feature', 'breaking-change', 'dependencies', 'internal'} |
PR missing one of the required labels: {'documentation', 'dependencies', 'internal', 'new feature', 'enhancement', 'bug', 'breaking-change'} |
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #2020 +/- ##
==========================================
- Coverage 70.92% 70.82% -0.11%
==========================================
Files 370 371 +1
Lines 62781 63007 +226
==========================================
+ Hits 44527 44622 +95
- Misses 18254 18385 +131 ☔ View full report in Codecov by Sentry. |
Fix cyclic reference with Runtime and Scouting.
PR missing one of the required labels: {'breaking-change', 'internal', 'bug', 'dependencies', 'documentation', 'new feature', 'enhancement'} |
@@ -384,6 +384,9 @@ validated_struct::validator! { | |||
/// if connection timeout exceed, exit from application | |||
pub exit_on_failure: Option<ModeDependentValue<bool>>, | |||
pub retry: Option<connection_retry::ConnectionRetryModeDependentConf>, | |||
/// Interval in millisecond to check if the listening endpoints changed (e.g. when listening on 0.0.0.0). | |||
/// Also update the multicast scouting listening interfaces. Use -1 to disable. | |||
pub endpoint_poll_interval_ms: Option<i64>, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there any specific reason to use i64 for purely positive value, can Option::None be used for disabling ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I copied the idea from timeout_ms, which has the same semantic if I'm not mistaken (-1 = infinite / disabled).
After verification, I disable the poll if the interval is <= 0
, not just < 0
, while timeout_ms actually has a timeout of 0 if you set 0.
I don't mind changing
@Hugal31 could you please make any update to make the CI restart. For some reason I don't see a way to restart it from github interface. It's not clear now if CI failure is caused by PR itself or is it some sporadic thing |
I think the macos tests fails only because they are flaky, they fail on main right now. |
Set up a configurable 10s poll interval to:
This allows Zenoh to react to a network configuration change (i.e. connections and disconnections).
I tried to use the NETLINK socket in #1824 to be more efficient and reactive but it only worked on Linux and I didn't knew how to make it work with IPv6.
Replaces #1824
Closes #1823