hadoop-yarn-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Bibin A Chundatt (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (YARN-5867) DirectoryCollection#checkDirs can cause incorrect permission of nmlocal dir
Date Fri, 11 Nov 2016 14:43:59 GMT

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

Bibin A Chundatt commented on YARN-5867:

If the disk was wiped and re-introduced then this may be more complicated than just fixing
the one directory. The NM creates quite a few directories for each disk on startup with various
Totally agree with you lot of cases need to be handled. Admin have to handle carefully.

IMO i think we could handle for the possible scenarios which can be solved (nmlocal and nmlog).If
not i am open to close this issue

> DirectoryCollection#checkDirs can cause incorrect permission of nmlocal dir
> ---------------------------------------------------------------------------
>                 Key: YARN-5867
>                 URL: https://issues.apache.org/jira/browse/YARN-5867
>             Project: Hadoop YARN
>          Issue Type: Bug
>            Reporter: Bibin A Chundatt
>            Assignee: Bibin A Chundatt
> Steps to reproduce
> ===============
> # Set umask to 077 for user
> # Start nodemanager with nmlocal dir configured
> nmlocal dir permission is *755* 
> {{LocalDirsHandlerService#serviceInit}}
> {code} 
>     FsPermission perm = new FsPermission((short)0755);
>     boolean createSucceeded = localDirs.createNonExistentDirs(localFs, perm);
>     createSucceeded &= logDirs.createNonExistentDirs(localFs, perm);
> {code}
> # After  startup delete the nmlocal dir and wait for {{MonitoringTimerTask}} to run (simulation
using delete)
> # Now check the permission of {{nmlocal dir}} will be *700*
> *Root Cause*
> {{DirectoryCollection#testDirs}} checks as following
> {code}
>         // create a random dir to make sure fs isn't in read-only mode
>         verifyDirUsingMkdir(testDir);
> {code}
> which cause a new Random directory to be create in {{localdir}} using
> {{DiskChecker.checkDir(dir)}} -> {{!mkdirsWithExistsCheck(dir)}} causing the nmlocal
dir to be created with wrong permission. *700*
> Few application fail to container launch due to permission denied.

This message was sent by Atlassian JIRA

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

View raw message