You are viewing a plain text version of this content. The canonical link for it is here.
Posted to yarn-issues@hadoop.apache.org by "Hudson (JIRA)" <ji...@apache.org> on 2019/08/14 17:51:00 UTC

[jira] [Commented] (YARN-9074) Docker container rm command should be executed after stop

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

Hudson commented on YARN-9074:
------------------------------

FAILURE: Integrated in Jenkins build Hadoop-trunk-Commit #17126 (See [https://builds.apache.org/job/Hadoop-trunk-Commit/17126/])
YARN-9683. Remove reapDockerContainerNoPid left behind by YARN-9074 (weichiu: rev 167acd87daf61be9a27dfb5af6e7cbacb96e44de)
* (edit) hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/main/java/org/apache/hadoop/yarn/server/nodemanager/containermanager/launcher/ContainerCleanup.java


> Docker container rm command should be executed after stop
> ---------------------------------------------------------
>
>                 Key: YARN-9074
>                 URL: https://issues.apache.org/jira/browse/YARN-9074
>             Project: Hadoop YARN
>          Issue Type: Sub-task
>            Reporter: Zhaohui Xin
>            Assignee: Zhaohui Xin
>            Priority: Major
>             Fix For: 3.3.0
>
>         Attachments: YARN-9074.001.patch, YARN-9074.002.patch, YARN-9074.003.patch, image-2018-12-01-11-36-12-448.png, image-2018-12-01-11-38-18-191.png
>
>
> {code:java}
> @Override
> public void transition(ContainerImpl container, ContainerEvent event) {
> container.setIsReInitializing(false);
> // Set exit code to 0 on success 
> container.exitCode = 0;
> // TODO: Add containerWorkDir to the deletion service.
> if (DockerLinuxContainerRuntime.isDockerContainerRequested(
> container.daemonConf,
> container.getLaunchContext().getEnvironment())) {
> removeDockerContainer(container);
> }
> if (clCleanupRequired) {
> container.dispatcher.getEventHandler().handle(
> new ContainersLauncherEvent(container,
> ContainersLauncherEventType.CLEANUP_CONTAINER));
> }
> container.cleanup();
> }{code}
> Now, when container is finished, NM firstly execute "_docker rm xxx"_  to remove it and this thread is placed in DeletionService. see more in YARN-5366 .
> Next, NM will execute "_docker stop_" and "docker kill" command. these tow commands are wrapped up in ContainerCleanup thread and executed by ContainersLauncher. see more in YARN-7644. 
> The above will cause the container's cleanup to be split into two threads. I think we should refactor these code to make all docker container killing process be place in ContainerCleanup thread and "_docker rm_" should be executed last.



--
This message was sent by Atlassian JIRA
(v7.6.14#76016)

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