[ 
https://issues.apache.org/jira/browse/YARN-8706?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16595170#comment-16595170
 ] 

Eric Badger commented on YARN-8706:
-----------------------------------

Really it would be better if we didn't send the kill from docker stop at all. 
The reason that we're using docker stop at all instead of signaling like we do 
in all other containers (implemented in YARN-8206) is so that we can honor 
STOPSIGNAL if it's set for the docker image. I'm wondering if it's a reasonable 
solution to do a normal kill in the stop case (the SIGTERM case) and just look 
up the the STOPSIGNAL for the container using a docker inspect command. We 
might be able to leverage the docker inspect command that gets executed via 
{{getContainerStatus}}, even though that would require some refactoring and 
extra parsing of a generalized inspect. But that way we would be able to send a 
normal kill in both the stop and kill cases. We would still need to do a docker 
kill instead of a regular kill for privileged containers, just like we do for 
the SIGKILL case today.

[[email protected]], you implemented the docker life cycle changes. Any 
thoughts?

> DelayedProcessKiller is executed for Docker containers even though docker 
> stop sends a KILL signal after the specified grace period
> -----------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: YARN-8706
>                 URL: https://issues.apache.org/jira/browse/YARN-8706
>             Project: Hadoop YARN
>          Issue Type: Sub-task
>            Reporter: Chandni Singh
>            Assignee: Chandni Singh
>            Priority: Major
>              Labels: docker
>
> {{DockerStopCommand}} adds a grace period of 10 seconds.
> 10 seconds is also the default grace time use by docker stop
>  [https://docs.docker.com/engine/reference/commandline/stop/]
> Documentation of the docker stop:
> {quote}the main process inside the container will receive {{SIGTERM}}, and 
> after a grace period, {{SIGKILL}}.
> {quote}
> There is a {{DelayedProcessKiller}} in {{ContainerExcecutor}} which executes 
> for all containers after a delay when {{sleepDelayBeforeSigKill>0}}. By 
> default this is set to {{250 milliseconds}} and so irrespective of the 
> container type, it will always get executed.
>  
> For a docker container, {{docker stop}} takes care of sending a {{SIGKILL}} 
> after the grace period
> - when sleepDelayBeforeSigKill > 10 seconds, then there is no point of 
> executing DelayedProcessKiller
> - when sleepDelayBeforeSigKill < 1 second, then the grace period should be 
> the smallest value, which is 1 second, because anyways we are forcing kill 
> after 250 ms
>  



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to