Page MenuHomePhabricator

Support SIGHUP to reload daemon processes in place
ClosedPublic

Authored by epriestley on Feb 26 2015, 10:31 PM.
Tags
None
Referenced Files
Unknown Object (File)
Sat, Nov 23, 11:13 PM
Unknown Object (File)
Fri, Nov 22, 9:53 PM
Unknown Object (File)
Fri, Nov 22, 9:53 PM
Unknown Object (File)
Fri, Nov 22, 9:53 PM
Unknown Object (File)
Fri, Nov 22, 9:38 PM
Unknown Object (File)
Oct 22 2024, 7:27 PM
Unknown Object (File)
Oct 20 2024, 10:10 AM
Unknown Object (File)
Oct 17 2024, 12:38 PM

Details

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.

Diff Detail

Repository
rPHU libphutil
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

epriestley retitled this revision from to Support SIGHUP to reload daemon processes in place.
epriestley updated this object.
epriestley edited the test plan for this revision. (Show Details)
epriestley added reviewers: btrahan, hach-que.
btrahan edited edge metadata.
This revision is now accepted and ready to land.Feb 27 2015, 12:48 AM
This revision was automatically updated to reflect the committed changes.