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

Eric Badger commented on YARN-9379:
-----------------------------------

Thanks for the update, [~caozhiqiang]. The findbugs is indeed unrelated. Don't 
worry about the version either. 

As for the patch, it looks pretty good. However, I have a few comments. 

All of the other environment variables that are used in 
{{DockerLinuxContainerRuntime.launchContainer()}} have a validate step against 
a yarn-site.xml config. This is so that we can fail fast without having to 
invoke the container executor if we know that we aren't going to want to launch 
with these environment variable configurations. The container-executor.cfg 
({{docker.allowed.runtimes}}) is the ultimate source of truth, but the 
yarn-site.xml configs act as a fail fast first line of defense. So it would be 
good to add that config and accompanying validation for the allowed runtimes.

On the unit test, it looks like you're checking the size of the created docker 
command, but not checking to see if the runtime was actually set correctly. 
Could you add some code to check that the runtime was correctly set to what you 
want it to be? You will also want to add a test case to make sure that the 
allowed list works. 

> Can't specify docker runtime through environment
> ------------------------------------------------
>
>                 Key: YARN-9379
>                 URL: https://issues.apache.org/jira/browse/YARN-9379
>             Project: Hadoop YARN
>          Issue Type: Bug
>          Components: nodemanager
>    Affects Versions: 3.3.0
>            Reporter: caozhiqiang
>            Assignee: caozhiqiang
>            Priority: Minor
>         Attachments: YARN-9379-branch-3.2.0.001.patch, YARN-9379.002.patch, 
> YARN-9379.003.patch, YARN-9379.004.patch
>
>
> When use docker to run yarn containers, even though there isĀ 
> docker.allowed.runtimes in container-executor.cfg, there are not parameter to 
> specify the docker runtime, such as gvisor, lxc or kata. With this patch, 
> client can add parameter such as 
> -[Dyarn.app.mapreduce.am|http://dyarn.app.mapreduce.am/].env.YARN_CONTAINER_RUNTIME_DOCKER_RUNTIME=runsc
>  to specify docker runtime.



--
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