Re: Graceful Shutdown Design

2014-11-14 Thread Alex Rukletsov
I think we misunderstand each other a bit. Usually under "executor" I understand every executor, except the base one, ExecutorProcess. If under task finalization we understand sending SIGTERM / SIGKILL to a child process, then you are right, it's only relevant for the CommandExecutor. But custom (

Re: Graceful Shutdown Design

2014-11-14 Thread Benjamin Mahler
For (2), sorry, I get a bit confused when "executor" and "CommandExecutor" are used interchangeably. So let me confirm we're on the same page: Task finalization is only relevant for the CommandExecutor, that's where the CommandExecutor assumes that all tasks need a similar grace period. For regula

Re: Graceful Shutdown Design

2014-11-14 Thread Alex Rukletsov
(1) When the ShutdownProcess is gone, we'll adjust the timeout calculation logic. (2) In the proposal, we tie the grace period to the executor, but use it for task finalization. Effectively we assume that each executor launches similar tasks. This may seem a bit weird, but having timeouts per task

Re: Graceful Shutdown Design

2014-11-13 Thread Benjamin Mahler
Short term, cleaning up the current static configuration mess sounds good. Some food for thought for the longer term: (1) Keep in mind that the ShutdownProcess inside ExecutorProcess will be going away when we have pure language bindings. (2) Killing a task and shutting down an executor are inde

Re: Graceful Shutdown Design

2014-11-12 Thread Niklas Nielsen
I thought signal escalation as per-executor or actually everywhere where we execute a command info as a subprocess. The new grace period is meant as the time an executor has to finish off it's things - changing the other timeouts had to be done as they will in most cases be shorter. For custom exec

Re: Graceful Shutdown Design

2014-11-11 Thread Alex Rukletsov
Ben, there are two scenarios: executor shutdown and killTask() in CommandExecutor. For the first use case, each custom executor is affected through the ExecutorProcess, that means two levels are involved (containerizer and executor) and should be synchronized. In the second scenario, each task is

Re: Graceful Shutdown Design

2014-11-10 Thread Benjamin Mahler
I'm guessing most of the motivation here is actually for task killing escalation in the command executor? The shutdown grace period was designed for executor shutdown only, which today occurs only when the framework is being shutdown (or recovery is cleaning up), or in the future, when frameworks a

Graceful Shutdown Design

2014-11-10 Thread Alex Rukletsov
Hi all, I would like to share the design doc for configurable grace period . The doc describes two approaches to calculate nested grace periods, points out implementation details and opens several des