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

Andras Bokor commented on YARN-5425:
------------------------------------

Hi [~ajisakaa],

I am trying to understand what does this test do:
# We set umask key to 077 through configuration.
# After we create some directories with {{DirectoryCollection#createDir}} (with 
755 permission) which should create directories with the given permission 
regardless of umask on fs.
# We check if the permission of the created dir is 755.

Before HADOOP-13073:
I did some debug and {{localFs.setPermission(dir, perm)}} was not called either 
before HADOOP-13073.
The test passed because {{FileContext}} did not react on umask change so it 
used 022 as default umask and when it applied 022 on 755 we got 755 again so 
the test passed.

After HADOOP-13073:
The underlying {{RawLocalFileSystem}} now reacts on umask change via config so 
it created the new dir with 077 umask so the permission was 700 but 
{{FileContext}} was not affected by umask change so 
{{localFs.setPermission(dir, perm)}} was not hit in 
{{DirectoryCollection#createDir}} (as you mentioned above).

For me it seems {{FileContext}} had the same bug as {{RawLocalFileSystem}}.

Anyway, I think your patch handles this correctly.

> TestDirectoryCollection.testCreateDirectories failed
> ----------------------------------------------------
>
>                 Key: YARN-5425
>                 URL: https://issues.apache.org/jira/browse/YARN-5425
>             Project: Hadoop YARN
>          Issue Type: Bug
>          Components: nodemanager
>    Affects Versions: 2.9.0
>            Reporter: Yufei Gu
>            Assignee: Yufei Gu
>         Attachments: YARN-5425.00.patch
>
>
> {code}
> java.lang.AssertionError: local dir parent not created with proper 
> permissions expected:<rwxr-xr-x> but was:<rwx------>
>       at org.junit.Assert.fail(Assert.java:88)
>       at org.junit.Assert.failNotEquals(Assert.java:743)
>       at org.junit.Assert.assertEquals(Assert.java:118)
>       at 
> org.apache.hadoop.yarn.server.nodemanager.TestDirectoryCollection.testCreateDirectories(TestDirectoryCollection.java:113)
> {code}



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

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