Homec4science

Support SIGHUP to reload daemon processes in place

Authored by epriestley <git@epriestley.com> on Feb 27 2015, 20:38.

Description

Support SIGHUP to reload daemon processes in place

Summary:
Ref T7384. This is a bit out there but not wholly unreasonable and the patch is fairly small. There's at least some sort of vague argument that we'll have a use case for it in the cluster eventually.

Basically, the issue is that if you have very-long-running tasks, it's hard to restart the daemons without disrupting them. We can make this better with a signal that says "stop all the daemons gracefully, but then immediately restart them when they exit". This method will won't always work (it may not be safe across daemon or overseer change boundaries, since it leaves the overseer running older code), but will almost always work, and doesn't require some kind of mess on top of the overseer to track which overseers you've told to exit.

Test Plan: Used phd reload (next diff) to reload an overseer a bunch of times. Saw the overseer PID stay the same but all the daemon PIDs cycle. Used phd stop to stop daemons normally.

Reviewers: hach-que, btrahan

Reviewed By: btrahan

Subscribers: joshuaspence, epriestley

Maniphest Tasks: T7384

Differential Revision: https://secure.phabricator.com/D11898

Details

Committed
epriestley <git@epriestley.com>Feb 27 2015, 20:38
Pushed
aubortMar 17 2017, 12:03
Parents
rPHU124e5a41e086: Only SIGINT the daemon itself, not its entire process group
Branches
Unknown
Tags
Unknown

Event Timeline

epriestley <git@epriestley.com> committed rPHU260e6105dee5: Support SIGHUP to reload daemon processes in place (authored by epriestley <git@epriestley.com>).Feb 27 2015, 20:38