-
Notifications
You must be signed in to change notification settings - Fork 144
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
Shutdown action does not interrupt timers #180
Comments
I didn't intentionally make it so that timers would hold up the system, however, that might be important to the design right now. For example, when you call for shutdown, timers are created, that need to not immediately expire, to escalate to SIGTERM and SIGKILL for processes that are misbehaving. I think the appropriate solution is that timers are changed to intercept shutdown events and cancel themselves unless the creator of the timer specifies otherwise, and then for the timers that need to persist shutdown, specify that they should ignore shutdown. For an example of how to change the timers, look at how execute process interacts with the shutdown event:
For an example of how the timer could cancel itself, look here:
These are some of the timers that would need to be updated to ignore shutdown, but it's not an exhaustive list:
|
Thanks @wjwwood - I'll take a crack at this |
- Check that timers will shut down a launched system - Check that shutdown will cancel a timer without cancel_on_shutdown=False - Check that shutdown will not cancel a timre with cancel_on_shutdown=True
* ISSUE180 Timers will cancel on shutdown - By default, a shutdown event will cancel timers - The timers used to send SIGKILL and SIGTERM to processes don't cancel on shutdown * Add tests for issue #180 functionality - Check that timers will shut down a launched system - Check that shutdown will cancel a timer without cancel_on_shutdown=False - Check that shutdown will not cancel a timre with cancel_on_shutdown=True * fix quotes * fix include order Signed-off-by: William Woodall <william@osrfoundation.org>
Merged! |
Bug report
A launch.actions.TimerAction will keep a launch service running even after a Shutdown action
It's possible this is expected behavior, but from the description of a shutdown action I'd expect it to terminate everything right away
Required Info:
Steps to reproduce issue
Expected behavior
I'd expect the above program to terminate after about 5 seconds, once the first TimerAction causes a shutdown
Actual behavior
The talker node is shut down after 5 seconds, but the call to launch_service.run() does not return until 20 seconds have elapsed
Additional information
Just let me know if my expectations are wrong here. Since the docs say "shut down a launched system" instead of "shut down all running processes" I sort of expect the whole thing to wrap up after 5 seconds
The text was updated successfully, but these errors were encountered: