Tango
Tango copied to clipboard
Supervisord does not kill old Tango and TangoManager processes on restart
Expected Behavior
On restarting the Tango processes using supervisorctl
, I noticed that the Tango server and manager do not exit. supervisorctl
however starts new server and manager processes which don't function correctly since the old ones are running.
Actual Behavior
supervisorctl
should first kill the Tango server and manager processes before starting new processes.
Steps to Reproduce the Behavior
Run supervisorctl restart all
.
Possible reason and fix
In the supervisord
configuration, Tango is invoked by /bin/sh
and since the terminate signal doesn't propagate to child processes by default, the server and manager continue to run while only the original /bin/sh
is killed.
There are two possible fixes I can think of:
- Invoke the server and manager directly rather than via
/bin/sh
. I tested this and it seems to work fine. - Use the
stopasgroup
orkillasgroup
directives of supervisor to propagate the kill command to all children. I haven't tested these.