Create clean exit path for traffic_manager on SIGTERM#8798
Create clean exit path for traffic_manager on SIGTERM#8798bryancall merged 2 commits intoapache:masterfrom jeredfloyd:tm-clean-exit
Conversation
|
It might also be desirable to add a "--manager" option to ETA: Looking through the code further, the command The underlying state enum "MGMT_PENDING_RESTART" could be renamed to "MGMT_PENDING_EXIT" (STOP is used for stopping the traffic_server process only) and the plumbing then corrected on the traffic_ctl side to move the "--manager" option from the restart command to the stop command. This would fix the confusing behavior for that command today -- I can do that in another PR. The above commentary is independent of this PR -- a signal is still desired! |
|
@jeredfloyd We do plan to get rid of traffic_manager in the next major release (10.0.0). |
|
@bryancall Thanks! Once I have 9.x in Fedora I will try to follow future plans a little more closely. |
|
Cherry-picked to v9.2.x |
* asf/9.2.x: Updated ChangeLog HttpSM, HttpTunnel, and Http2Stream debug logging updates (apache#8788) Fix plugin parent_select failover (apache#8676) Adds new plugin, http_stats (apache#8797) SIGTERM should cause traffic_manager to exit with status 0 as a shutdown method (apache#8798) Avoid allocation when matching hosts for vol lookup (apache#8762) Check bounds before accessing Vol::evacuate array (apache#8716) Adds a simple tool to generate new escape tables (apache#8783)
Since the removal of traffic_cop, it appears that there is no way to cause traffic_manager to exit cleanly. SIGTERM causes the cleanup of child processes and a graceful shutdown, however still exits with code 15. We can ignore this in the systemd unit file, but it's cleaner to have some path to a clean exit of traffic_manager.