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

Xuan Gong commented on YARN-2701:
---------------------------------

[~zxu] Thanks for the feedback.

bq. Do we need to check the directory permission?

I think we need. We need to make sure the directory has the right permission.

bq. If we want to check permission, Can we change the permission if the 
permission doesn't match?

I do not think that we need to do that. If we really want to do that, just 
changing the permission is not enough. We might need to go through all the 
sub-directories, and do some necessary checks. And it does not sound like a 
easy way to do it. I am thinking that we just keep it this way (check but no 
change the permission.). If we have further requirement, we need to spend more 
time to investigate it.




> Potential race condition in startLocalizer when using LinuxContainerExecutor  
> ------------------------------------------------------------------------------
>
>                 Key: YARN-2701
>                 URL: https://issues.apache.org/jira/browse/YARN-2701
>             Project: Hadoop YARN
>          Issue Type: Bug
>            Reporter: Xuan Gong
>            Assignee: Xuan Gong
>            Priority: Blocker
>         Attachments: YARN-2701.1.patch, YARN-2701.2.patch, YARN-2701.3.patch
>
>
> When using LinuxContainerExecutor do startLocalizer, we are using native code 
> container-executor.c. 
> {code}
>      if (stat(npath, &sb) != 0) {
>        if (mkdir(npath, perm) != 0) {
> {code}
> We are using check and create method to create the appDir under /usercache. 
> But if there are two containers trying to do this at the same time, race 
> condition may happen.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to