DUNE-DAQ / drunc

Dune RUN Control (DRUNC) is the run control for the DUNE experiment
1 stars 1 forks source link

Don't shut down gracefully if we hangup #300

Closed plasorak closed 1 week ago

plasorak commented 2 weeks ago

Allows for much quicker drunc-controller exit: Before, if a SIGHUP was received, the controller would try to deregister itself from the connectivity service, to gracefully shuts down. Now, this happens only if SIGINT is received. If SIGHUP is received, we send a SIGKILL to the controller PID. This ensures a very fast death of the controller.

bieryAtFnal commented 1 week ago

What change(s) in the behavior of drunc and/or the system will users notice with this code change? And, what problem is this change intended to solve?

plasorak commented 1 week ago

This is intended to reduce the shutdown time of the drunc controller. So in theory, there won't need be killall drunc-controller after exiting the drunc. The reason why this happens is that on SIGHUP, there is a signal handler in the controller that makes it try to deregister itself from the connectivity service. In some cases it doesn't manage it because the connectivity service is dead. Although this is something I thought I had fixed earlier, it looks like it still a problem. This PR removes the signal handler and convert SIGHUP into SIGKILL, nuking all the drunc controller processes.