Page MenuHomePhabricator

Implement a "graceful shutdown" mode for daemons
Closed, ResolvedPublic

Description

As daemons handle more complex tasks, being able to do graceful shutdown would be helpful. Something like:

  • bin/phd stop --graceful
  • This sends some signal to the overseers; they relay it to the daemons.
  • Daemons receive the signal and set a "exit when able" flag.
  • Daemons check the flag; taskmasters stop after the current task.

Event Timeline

epriestley raised the priority of this task from to Low.
epriestley updated the task description. (Show Details)
epriestley added a project: Daemons.
epriestley added subscribers: epriestley, hach-que.

(Maybe --graceful N, where N is the number of seconds to wait before falling back to kills. We could default it to 15 or something; you could use --graceful 0 for the current behavior, and --graceful 90000 for very-graceful.)