I looks like it's supported because executor prints grace period[1]. On the
other hand executor launches sh that launch command and shell executes
faster then command after receiving SIGTERM. Causing process to be attached
to init and leaked. In my opinion default executor should not sent SIGTERM
to sh but only to its children. This will allow proper escalation to
SIGKILL because sh will leave as long its children are alive.

1:
https://github.com/apache/mesos/blob/c4667d6f1b49d30089e6cb5874b6737a9bd3f044/src/launcher/executor.cpp#L479-L480

pon., 16 sty 2017 o 16:35 użytkownik haosdent <haosd...@gmail.com> napisał:

> It looks like default-executor have not yet handle
> `--executor_shutdown_grace_period`。
>
> On Mon, Jan 16, 2017 at 7:41 PM, Tomek Janiszewski <jani...@gmail.com>
> wrote:
>
> Hi
>
> I tried to use grace period with default Mesos executor. I assumed it
> works as follow:
>
>    1. Start command: sh -c "command ..."
>    2. Sent SIGSTOP to process tree: sh, command
>    3. Sent SIGTERM to process tree: sh, command
>    4. Wait for processes to finish or grace period to elapse
>    5. sh finish while command could be still running and attached to init
>    6. Sent SIGKILL to process tree: command
>
> I notice that SIGKILL is not sent and executor finished when sh returns.
> When Mesos is running with POSIX contenerizer this leads command to live
> forever (if it ignores SIGTERM). When contenerizer is used command is
> killed when it's container is destroyed.
>
> Is this desired behavior? How to use grace period with default executor?
>
> Thanks
> Tomek
>
>
>
>
> --
> Best Regards,
> Haosdent Huang
>

Reply via email to