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

Akira Ajisaka commented on YARN-5679:
-------------------------------------

{code:title=TestAHSWebServices.java}
    uploadContainerLogIntoRemoteDir(ugi, conf, rootLogDirList, nodeId2,
        containerId100, path, fs);
{code}
This creates LogWriter instance and calls FileContext.setUMask(137)
{code:title=AggregatedLogFormat.java}
    public LogWriter(final Configuration conf, final Path remoteAppLogFile,
        UserGroupInformation userUgi) throws IOException {
      try {
        this.fsDataOStream =
            userUgi.doAs(new PrivilegedExceptionAction<FSDataOutputStream>() {
              @Override
              public FSDataOutputStream run() throws Exception {
                fc = FileContext.getFileContext(remoteAppLogFile.toUri(), conf);
                fc.setUMask(APP_LOG_FILE_UMASK);
{code}
After HADOOP-13140, RawFileContext reacts on changing umask via FileContext, so 
the umask of RawFileContext is set to 137 as well. Therefore the following code 
creates appLogsDir with umask 137, so the permission of appLogsDir becomes 642.
{code:title=TestAHSWebServices}
    assertTrue(fs.mkdirs(appLogsDir));
{code}
Finally the following code fails because appLogsDir is not executable.
{code:title=TestAHSWebServices}
    createContainerLogInLocalDir(appLogsDir, containerId1ForApp100, fs,
        fileName, ("Hello." + containerId1ForApp100));
{code}

> TestAHSWebServices is failing
> -----------------------------
>
>                 Key: YARN-5679
>                 URL: https://issues.apache.org/jira/browse/YARN-5679
>             Project: Hadoop YARN
>          Issue Type: Bug
>          Components: timelineserver
>            Reporter: Akira Ajisaka
>            Assignee: Akira Ajisaka
>         Attachments: YARN-5679.01.patch
>
>
> TestAHSWebServices.testContainerLogsForFinishedApps is failing.
> https://builds.apache.org/job/hadoop-qbt-trunk-java8-linux-x86/176/testReport/
> {noformat}
> java.lang.AssertionError: null
>       at org.junit.Assert.fail(Assert.java:86)
>       at org.junit.Assert.assertTrue(Assert.java:41)
>       at org.junit.Assert.assertTrue(Assert.java:52)
>       at 
> org.apache.hadoop.yarn.server.applicationhistoryservice.webapp.TestAHSWebServices.createContainerLogInLocalDir(TestAHSWebServices.java:675)
>       at 
> org.apache.hadoop.yarn.server.applicationhistoryservice.webapp.TestAHSWebServices.testContainerLogsForFinishedApps(TestAHSWebServices.java:581)
> {noformat}
> {noformat}
> java.lang.AssertionError: null
>       at org.junit.Assert.fail(Assert.java:86)
>       at org.junit.Assert.assertTrue(Assert.java:41)
>       at org.junit.Assert.assertTrue(Assert.java:52)
>       at 
> org.apache.hadoop.yarn.server.applicationhistoryservice.webapp.TestAHSWebServices.testContainerLogsForFinishedApps(TestAHSWebServices.java:519)
> {noformat}



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