[
https://issues.apache.org/jira/browse/YARN-9959?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16974566#comment-16974566
]
Eric Badger commented on YARN-9959:
-----------------------------------
[~eyang], [~ccondit], [~Jim_Brennan], [[email protected]], [~billie], I
looked into a quick fix for this so that we could support some sort of
{{%WORK_DIR%}} variable in the mount that would get normalized to the
container's work dir. This should be possible, but is a little more than a few
lines of code. The patch will need to touch both the Java code and the C code.
On the Java side, the user mount does an {{if (!srcPath.isAbsolute()}}, which
will return false and require that the mount be mounted as read-only. The
read-only check also makes sure that the user mount is a localized resource,
which fails since the mount is prefixed with {{%WORK_DIR}}.
On the C side, logic will need to be added in mount-utils.c. I think the
easiest thing to do would be to add the container's working directory to
allowed.rw-mounts list after it is parsed from the container-executor.cfg file.
Then we can also pre-parse the passed in mounts and replace all instances of
{{%WORK_DIR%}} with the container's working directory path.
All that being said, I don't think we should implement this into the original
commits for YARN-9561 and YARN-9562. I can work on that patch for this JIRA.
Let me know if you disagree with my assessment or my proposed approach.
> Work around hard-coded tmp and /var/tmp bind-mounts in the container's
> working directory
> ----------------------------------------------------------------------------------------
>
> Key: YARN-9959
> URL: https://issues.apache.org/jira/browse/YARN-9959
> Project: Hadoop YARN
> Issue Type: Sub-task
> Reporter: Eric Badger
> Priority: Major
>
> {noformat}
> addRuncMountLocation(mounts, containerWorkDir.toString() +
> "/private_slash_tmp", "/tmp", true, true);
> addRuncMountLocation(mounts, containerWorkDir.toString() +
> "/private_var_slash_tmp", "/var/tmp", true, true);
> {noformat}
> It would be good to remove the hard-coded tmp mounts from the
> {{RuncContainerRuntime}} in place of something general or possibly a tmpfs.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]