hadoop-yarn-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jason Lowe (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (YARN-8206) Sending a kill does not immediately kill docker containers
Date Tue, 15 May 2018 21:15:00 GMT

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

Jason Lowe commented on YARN-8206:
----------------------------------

Thanks for the patch!

Calling allowPrivilegedContainerExecution in this new context is a bit problematic given how
that method behaves.  It can throw, and it also logs an info message stating a container will
be launched.  Ideally the code should be refactored to make it a pure predicate function that
can be reused in this new context and the logging/throwing can be moved to the launch path
where it was originally needed.

Nit: signalContainer always computes the containerId string when only the TERM signal case
now needs it.  It should be moved to that conditional.

Nit: The unit test changes are much bigger than they need to be.  There are a lot of unrelated
formatting changes around ENV_DOCKER_CONTAINER_RUN_PRIVILEGED_CONTAINER, and we can avoid
needing to update every caller of capturePrivilegedOperation with an overloaded method, e.g.:
{code}
  private PrivilegedOperation capturePrivilegedOperation()
      throws PrivilegedOperationException {
    return capturePrivilegedOperation(1);
  }
{code}



> Sending a kill does not immediately kill docker containers
> ----------------------------------------------------------
>
>                 Key: YARN-8206
>                 URL: https://issues.apache.org/jira/browse/YARN-8206
>             Project: Hadoop YARN
>          Issue Type: Sub-task
>            Reporter: Eric Badger
>            Assignee: Eric Badger
>            Priority: Major
>              Labels: Docker
>         Attachments: YARN-8206.001.patch, YARN-8206.002.patch, YARN-8206.003.patch, YARN-8206.004.patch,
YARN-8206.005.patch, YARN-8206.006.patch, YARN-8206.007.patch, YARN-8206.008.patch, YARN-8206.009.patch
>
>
> {noformat}
>         if (ContainerExecutor.Signal.KILL.equals(signal)
>             || ContainerExecutor.Signal.TERM.equals(signal)) {
>           handleContainerStop(containerId, env);
> {noformat}
> Currently in the code, we are handling both SIGKILL and SIGTERM as equivalent for docker
containers. However, they should actually be separate. When YARN sends a SIGKILL to a process,
it means for it to die immediately and not sit around waiting for anything. This ensures an
immediate reclamation of resources. Additionally, if a SIGTERM is sent before the SIGKILL,
the task might not handle the signal correctly, and will then end up as a failed task instead
of a killed task. This is especially bad for preemption. 



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

---------------------------------------------------------------------
To unsubscribe, e-mail: yarn-issues-unsubscribe@hadoop.apache.org
For additional commands, e-mail: yarn-issues-help@hadoop.apache.org


Mime
View raw message