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

Chandni Singh commented on YARN-8141:
-------------------------------------

[~shaneku...@gmail.com] Thanks for pointing out the issue.
{quote}As a result, the "source" of the mounts added in {{AbstractLauncher}} 
are all relative paths. These need to be specified as absolute paths in the 
final mount that is added to the {{docker run}} command
{quote}
I think it may be better not to get rid of 
{{YARN_CONTAINER_RUNTIME_DOCKER_LOCAL_RESOURCE_MOUNTS}} at this point because

{{AbstractLauncher}} in Yarn service while creating the {{LaunchContext}} 
doesn't know about the absolute path of the localized resource. 

I can put a simple fix to merge user specified 
{{YARN_CONTAINER_RUNTIME_DOCKER_LOCAL_RESOURCE_MOUNTS}} with the once computed 
by yarn service.

Let me know your thoughts?

 

> YARN Native Service: Respect 
> YARN_CONTAINER_RUNTIME_DOCKER_LOCAL_RESOURCE_MOUNTS specified in service spec
> ----------------------------------------------------------------------------------------------------------
>
>                 Key: YARN-8141
>                 URL: https://issues.apache.org/jira/browse/YARN-8141
>             Project: Hadoop YARN
>          Issue Type: Bug
>          Components: yarn-native-services
>            Reporter: Wangda Tan
>            Assignee: Chandni Singh
>            Priority: Critical
>         Attachments: YARN-8141.001.patch, YARN-8141.002.patch, 
> YARN-8141.003.patch
>
>
> Existing YARN native service overwrites 
> YARN_CONTAINER_RUNTIME_DOCKER_LOCAL_RESOURCE_MOUNTS regardless if user 
> specified this in service spec or not. It is important to allow user to mount 
> local folders like /etc/passwd, etc.
> Following logic overwrites the 
> YARN_CONTAINER_RUNTIME_DOCKER_LOCAL_RESOURCE_MOUNTS environment:
> {code:java}
> StringBuilder sb = new StringBuilder();
> for (Entry<String,String> mount : mountPaths.entrySet()) {
>   if (sb.length() > 0) {
>     sb.append(",");
>   }
>   sb.append(mount.getKey());
>   sb.append(":");
>   sb.append(mount.getValue());
> }
> env.put("YARN_CONTAINER_RUNTIME_DOCKER_LOCAL_RESOURCE_MOUNTS", 
> sb.toString());{code}
> Inside AbstractLauncher.java



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

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

Reply via email to