-
Notifications
You must be signed in to change notification settings - Fork 190
Fujitatomoya/clearup isolated ros2daemon #1098
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
Fujitatomoya/clearup isolated ros2daemon #1098
Conversation
Signed-off-by: Tomoya Fujita <[email protected]>
Signed-off-by: Tomoya Fujita <[email protected]>
Signed-off-by: Tomoya Fujita <[email protected]>
Signed-off-by: Tomoya Fujita <[email protected]>
Signed-off-by: Tomoya Fujita <[email protected]>
Signed-off-by: Tomoya Fujita <[email protected]>
Signed-off-by: Tomoya Fujita <[email protected]>
Signed-off-by: Tomoya Fujita <[email protected]>
| RegisterEventHandler(OnShutdown(on_shutdown=[ | ||
| # Stop daemon in isolated environment with proper ROS_DOMAIN_ID | ||
| ExecuteProcess( | ||
| cmd=['ros2', 'daemon', 'stop'], | ||
| name='daemon-stop-isolated', | ||
| # Use the same isolated environment | ||
| additional_env=dict(additional_env), | ||
| ), | ||
| # This must be done after stopping the daemon in the isolated environment | ||
| ResetEnvironment(), | ||
| ])), |
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.
This is the fix to avoid leaving the ros2 daemon processes with different ROS_DOMAIN_ID.
Right after the test, it makes sure clean up the ros2 daemon process in isolated environment, in this way we can only shut down the ros2 daemon instantiated by this isolated environment.
ros2 daemon stop above can stay there to stop the ros2 daemon with default ROS_DOMAIN_ID if that is online.
| # TODO(@fujitatomoya): rmw_zenoh_cpp is instable to find the endpoints, it does not | ||
| # matter if DaemonNode or DirectNode is used. For now, skip the test for rmw_zenoh_cpp. | ||
| if self.rmw_implementation == 'rmw_zenoh_cpp': | ||
| raise unittest.SkipTest() | ||
|
|
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.
This is another fix to support zenoh here. It now uses rmw isolated environment for the test, that will call rmw_zenoh specific setup for the isolation.
|
Pulls: #1098 |
While I'm hopeful this fixes it, I'm all green on my local build as well :( |
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.
LGTM, thanks for tackling this @fujitatomoya, I will let @cottsay also give it a look
maybe port assignment depending on the test environment...not so sure... 😓 fingers crossed 🤞 |
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.
Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.
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.
Thank you!
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.
Thanks for the PR. This is probably a good idea, and is well-implemented.
At large, this is even more evidence that we need a proper isolation mechanism for the daemon itself, but that's well outside the scope of this change.
|
all green, i will go ahead to merge this. |
|
We don't need to backport this fix, |
I do plan to backport that stuff to Kilted when we stabilize the tests on Rolling. |
* Enable RMW isolation for ros2doctor.test_report. Signed-off-by: Tomoya Fujita <[email protected]> * ResetEnvironment on shutdown is missing. Signed-off-by: Tomoya Fujita <[email protected]> * Clean up isolated ros2 daemon process when tests complete. Signed-off-by: Tomoya Fujita <[email protected]> * Clean up isolated ros2 daemon process for ros2topic. Signed-off-by: Tomoya Fujita <[email protected]> * Clean up isolated ros2 daemon process for ros2action. Signed-off-by: Tomoya Fujita <[email protected]> * Clean up isolated ros2 daemon process for ros2doctor. Signed-off-by: Tomoya Fujita <[email protected]> * Clean up isolated ros2 daemon process for ros2lifecycle and ros2node. Signed-off-by: Tomoya Fujita <[email protected]> * Clean up isolated ros2 daemon process for ros2param. Signed-off-by: Tomoya Fujita <[email protected]> --------- Signed-off-by: Tomoya Fujita <[email protected]>
Description
Fixes #1097
Possible fix for #1088, at least my local environment test results are all green and stable.
Is this user-facing behavior change?
No, only test cleanup process is fixed.
Did you use Generative AI?
No
Additional Information
This PR includes #1096