-
Notifications
You must be signed in to change notification settings - Fork 182
[rcl] Improve handling of dynamic discovery #1023
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
Merged
Merged
Conversation
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
8 tasks
|
This pull request has been mentioned on ROS Discourse. There might be relevant details there: https://discourse.ros.org/t/ros-2-tsc-meeting-minutes-2023-02-16/29927/1 |
Signed-off-by: Geoffrey Biggs <[email protected]>
Signed-off-by: Geoffrey Biggs <[email protected]>
Signed-off-by: Geoffrey Biggs <[email protected]>
Only print out the warning if it is actually specified. Signed-off-by: Chris Lalancette <[email protected]>
Mostly to get rid of the use of strtok_r, which is dangerous and also should not be used on our static environment variables. Instead, use rcutils_split(), which is much better. Signed-off-by: Chris Lalancette <[email protected]>
Signed-off-by: Chris Lalancette <[email protected]>
731106f to
4529112
Compare
Signed-off-by: Michael X. Grey <[email protected]>
This commit adds support for dynamic allocation for unlimited number of static peers. Signed-off-by: Arjo Chakravarty <[email protected]>
set. Signed-off-by: Arjo Chakravarty <[email protected]>
Signed-off-by: Michael X. Grey <[email protected]>
Signed-off-by: Michael X. Grey <[email protected]>
audrow
approved these changes
Mar 27, 2023
Member
audrow
left a comment
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.
The logic makes sense and the tests seem thorough, so I'd think this is good to go with green CI.
Signed-off-by: Shane Loretz <[email protected]>
wjwwood
reviewed
Mar 28, 2023
Signed-off-by: Arjo Chakravarty <[email protected]>
Signed-off-by: Arjo Chakravarty <[email protected]>
Signed-off-by: Arjo Chakravarty <[email protected]>
Signed-off-by: Arjo Chakravarty <[email protected]>
Signed-off-by: Arjo Chakravarty <[email protected]>
Signed-off-by: Arjo Chakravarty <[email protected]>
Signed-off-by: Arjo Chakravarty <[email protected]>
Signed-off-by: Arjo Chakravarty <[email protected]>
Signed-off-by: Arjo Chakravarty <[email protected]>
…e in test Signed-off-by: Shane Loretz <[email protected]>
Signed-off-by: Arjo Chakravarty <[email protected]>
Signed-off-by: Arjo Chakravarty <[email protected]>
Signed-off-by: Arjo Chakravarty <[email protected]>
Signed-off-by: Arjo Chakravarty <[email protected]>
Signed-off-by: Arjo Chakravarty <[email protected]>
Signed-off-by: Arjo Chakravarty <[email protected]>
Signed-off-by: William Woodall <[email protected]>
Signed-off-by: Shane Loretz <[email protected]>
…ingifying enums Signed-off-by: William Woodall <[email protected]>
Signed-off-by: William Woodall <[email protected]>
Signed-off-by: William Woodall <[email protected]>
Signed-off-by: Shane Loretz <[email protected]>
Signed-off-by: Shane Loretz <[email protected]>
Signed-off-by: Shane Loretz <[email protected]>
Signed-off-by: Shane Loretz <[email protected]>
wjwwood
approved these changes
Apr 7, 2023
achim-k
pushed a commit
to achim-k/rcl
that referenced
this pull request
Apr 10, 2023
* Get discovery preferences from the environment Signed-off-by: Geoffrey Biggs <[email protected]> * Support specification of discovery range and static peers Signed-off-by: Geoffrey Biggs <[email protected]> * Add some debug helpers Signed-off-by: Geoffrey Biggs <[email protected]> * Cleanup the LOCALHOST_ONLY deprecation a bit. Only print out the warning if it is actually specified. Signed-off-by: Chris Lalancette <[email protected]> * Rewrite parsing of static peers. Mostly to get rid of the use of strtok_r, which is dangerous and also should not be used on our static environment variables. Instead, use rcutils_split(), which is much better. Signed-off-by: Chris Lalancette <[email protected]> * Fix some silly bugs. Signed-off-by: Chris Lalancette <[email protected]> * Use names instead of integers for discovery range env vars Signed-off-by: Michael X. Grey <[email protected]> * Add support for dynamic allocation This commit adds support for dynamic allocation for unlimited number of static peers. Signed-off-by: Arjo Chakravarty <[email protected]> * Add a warning if ROS_AUTOMATIC_DISCOVERY_OFF is set and STATIC_PEERS are set. Signed-off-by: Arjo Chakravarty <[email protected]> * Update to latest rmw API Signed-off-by: Michael X. Grey <[email protected]> * Uncrustify Signed-off-by: Michael X. Grey <[email protected]> * Update for rmw_discovery_options_t changes Signed-off-by: Shane Loretz <[email protected]> * Address feedback: use strncmp Signed-off-by: Arjo Chakravarty <[email protected]> * Address feedback: Log levels Signed-off-by: Arjo Chakravarty <[email protected]> * Address feedback: remove TODO Signed-off-by: Arjo Chakravarty <[email protected]> * Address feedback: rename function Signed-off-by: Arjo Chakravarty <[email protected]> * ddress feedback: Docstring Signed-off-by: Arjo Chakravarty <[email protected]> * Address feedback: comment Signed-off-by: Arjo Chakravarty <[email protected]> * Add `RCL_RET_ERROR` if fini fails. Signed-off-by: Arjo Chakravarty <[email protected]> * `snprintf`->`rcutils_snprintf` Signed-off-by: Arjo Chakravarty <[email protected]> * Rename tests Signed-off-by: Arjo Chakravarty <[email protected]> * rcl_get_discovery_automatic_range -> rcl_get_automatic_discovery_range in test Signed-off-by: Shane Loretz <[email protected]> * Annotate tests Signed-off-by: Arjo Chakravarty <[email protected]> * More comments Signed-off-by: Arjo Chakravarty <[email protected]> * Style Signed-off-by: Arjo Chakravarty <[email protected]> * Style Signed-off-by: Arjo Chakravarty <[email protected]> * Uncrustify Signed-off-by: Arjo Chakravarty <[email protected]> * Constness and warning Signed-off-by: Arjo Chakravarty <[email protected]> * address TODO about IP address validation in the static peers Signed-off-by: William Woodall <[email protected]> * NOT_SET and SYSTEM_DEFAULT values Signed-off-by: Shane Loretz <[email protected]> * refactor discovery options to handle env vars better and simplify stringifying enums Signed-off-by: William Woodall <[email protected]> * fixup docs Signed-off-by: William Woodall <[email protected]> * (re)improve the discovery range debug message Signed-off-by: William Woodall <[email protected]> * Set discovery options to NOT_SET to detect user changse Signed-off-by: Shane Loretz <[email protected]> * lint Signed-off-by: Shane Loretz <[email protected]> * strncpy_s on windows Signed-off-by: Shane Loretz <[email protected]> * Change default range to SUBNET, and allow configuring it at build time Signed-off-by: Shane Loretz <[email protected]> --------- Signed-off-by: Geoffrey Biggs <[email protected]> Signed-off-by: Chris Lalancette <[email protected]> Signed-off-by: Michael X. Grey <[email protected]> Signed-off-by: Arjo Chakravarty <[email protected]> Signed-off-by: Shane Loretz <[email protected]> Signed-off-by: William Woodall <[email protected]> Co-authored-by: Chris Lalancette <[email protected]> Co-authored-by: Michael X. Grey <[email protected]> Co-authored-by: Arjo Chakravarty <[email protected]> Co-authored-by: Shane Loretz <[email protected]> Co-authored-by: William Woodall <[email protected]>
danthony06
pushed a commit
to danthony06/rcl
that referenced
this pull request
Jun 14, 2023
* Get discovery preferences from the environment Signed-off-by: Geoffrey Biggs <[email protected]> * Support specification of discovery range and static peers Signed-off-by: Geoffrey Biggs <[email protected]> * Add some debug helpers Signed-off-by: Geoffrey Biggs <[email protected]> * Cleanup the LOCALHOST_ONLY deprecation a bit. Only print out the warning if it is actually specified. Signed-off-by: Chris Lalancette <[email protected]> * Rewrite parsing of static peers. Mostly to get rid of the use of strtok_r, which is dangerous and also should not be used on our static environment variables. Instead, use rcutils_split(), which is much better. Signed-off-by: Chris Lalancette <[email protected]> * Fix some silly bugs. Signed-off-by: Chris Lalancette <[email protected]> * Use names instead of integers for discovery range env vars Signed-off-by: Michael X. Grey <[email protected]> * Add support for dynamic allocation This commit adds support for dynamic allocation for unlimited number of static peers. Signed-off-by: Arjo Chakravarty <[email protected]> * Add a warning if ROS_AUTOMATIC_DISCOVERY_OFF is set and STATIC_PEERS are set. Signed-off-by: Arjo Chakravarty <[email protected]> * Update to latest rmw API Signed-off-by: Michael X. Grey <[email protected]> * Uncrustify Signed-off-by: Michael X. Grey <[email protected]> * Update for rmw_discovery_options_t changes Signed-off-by: Shane Loretz <[email protected]> * Address feedback: use strncmp Signed-off-by: Arjo Chakravarty <[email protected]> * Address feedback: Log levels Signed-off-by: Arjo Chakravarty <[email protected]> * Address feedback: remove TODO Signed-off-by: Arjo Chakravarty <[email protected]> * Address feedback: rename function Signed-off-by: Arjo Chakravarty <[email protected]> * ddress feedback: Docstring Signed-off-by: Arjo Chakravarty <[email protected]> * Address feedback: comment Signed-off-by: Arjo Chakravarty <[email protected]> * Add `RCL_RET_ERROR` if fini fails. Signed-off-by: Arjo Chakravarty <[email protected]> * `snprintf`->`rcutils_snprintf` Signed-off-by: Arjo Chakravarty <[email protected]> * Rename tests Signed-off-by: Arjo Chakravarty <[email protected]> * rcl_get_discovery_automatic_range -> rcl_get_automatic_discovery_range in test Signed-off-by: Shane Loretz <[email protected]> * Annotate tests Signed-off-by: Arjo Chakravarty <[email protected]> * More comments Signed-off-by: Arjo Chakravarty <[email protected]> * Style Signed-off-by: Arjo Chakravarty <[email protected]> * Style Signed-off-by: Arjo Chakravarty <[email protected]> * Uncrustify Signed-off-by: Arjo Chakravarty <[email protected]> * Constness and warning Signed-off-by: Arjo Chakravarty <[email protected]> * address TODO about IP address validation in the static peers Signed-off-by: William Woodall <[email protected]> * NOT_SET and SYSTEM_DEFAULT values Signed-off-by: Shane Loretz <[email protected]> * refactor discovery options to handle env vars better and simplify stringifying enums Signed-off-by: William Woodall <[email protected]> * fixup docs Signed-off-by: William Woodall <[email protected]> * (re)improve the discovery range debug message Signed-off-by: William Woodall <[email protected]> * Set discovery options to NOT_SET to detect user changse Signed-off-by: Shane Loretz <[email protected]> * lint Signed-off-by: Shane Loretz <[email protected]> * strncpy_s on windows Signed-off-by: Shane Loretz <[email protected]> * Change default range to SUBNET, and allow configuring it at build time Signed-off-by: Shane Loretz <[email protected]> --------- Signed-off-by: Geoffrey Biggs <[email protected]> Signed-off-by: Chris Lalancette <[email protected]> Signed-off-by: Michael X. Grey <[email protected]> Signed-off-by: Arjo Chakravarty <[email protected]> Signed-off-by: Shane Loretz <[email protected]> Signed-off-by: William Woodall <[email protected]> Co-authored-by: Chris Lalancette <[email protected]> Co-authored-by: Michael X. Grey <[email protected]> Co-authored-by: Arjo Chakravarty <[email protected]> Co-authored-by: Shane Loretz <[email protected]> Co-authored-by: William Woodall <[email protected]>
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.
This PR adds to
rclfunctionality necessary to support the improved handling of dynamic discovery.It adds a new set of parameters for dynamic discovery, one for dynamic discovery range and one for static peers specification.
It removes the
RMW_LOCALHOST_ONLYenvironment variable.