Hadoop Map/Reduce
  1. Hadoop Map/Reduce
  2. MAPREDUCE-1657

After task logs directory is deleted, tasklog servlet displays wrong error message about job ACLs

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 0.21.0
    • Fix Version/s: 0.21.0
    • Component/s: tasktracker
    • Labels:
      None
    • Hadoop Flags:
      Reviewed
    • Release Note:
      Fixed a bug in tasklog servlet which displayed wrong error message about job ACLs - an access control error instead of the expected log files gone error - after task logs directory is deleted.

      Description

      When task log gets deleted if from Web UI we click view task log, web page displays wrong error message -:
      [
      HTTP ERROR: 401

      User user1 failed to view tasklogs of job job_201003241521_0001!

      user1 is not authorized for performing the operation VIEW_JOB on job_201003241521_0001. VIEW_JOB Access control list
      configured for this job :

      RequestURI=/tasklog
      ]
      Even if user is having view job acls set / or user is owner of job.

      1. MR1657.20S.1.patch
        7 kB
        Ravi Gummadi
      2. MR1657.patch
        7 kB
        Ravi Gummadi

        Activity

        Hide
        Ravi Gummadi added a comment -

        In tasklog servlet, the problem is even when the task log files don't exist, the first place an error is seen is authorization check.
        Avoiding authorization check for viewing task logs if job-acls.xml file doesn't exist would solve the problem.

        Show
        Ravi Gummadi added a comment - In tasklog servlet, the problem is even when the task log files don't exist, the first place an error is seen is authorization check. Avoiding authorization check for viewing task logs if job-acls.xml file doesn't exist would solve the problem.
        Hide
        Ravi Gummadi added a comment -

        Attaching patch for earlier version of hadoop. Not for commit here.

        Patch makes tasklog servlet to do authorization check only if job-acls.xml file exists. Also added a proper error message for the case of accessing task logs from tasklog servlet when the whole task log directory is not existing for a task. Added 2 testcases to TestWebUIAuthorization for (a) allowing all users to view task logs when job-acls.xml file not existing and (b) getting proper error code when the whole task log directory not existing.

        Show
        Ravi Gummadi added a comment - Attaching patch for earlier version of hadoop. Not for commit here. Patch makes tasklog servlet to do authorization check only if job-acls.xml file exists. Also added a proper error message for the case of accessing task logs from tasklog servlet when the whole task log directory is not existing for a task. Added 2 testcases to TestWebUIAuthorization for (a) allowing all users to view task logs when job-acls.xml file not existing and (b) getting proper error code when the whole task log directory not existing.
        Hide
        Ravi Gummadi added a comment -

        Attaching patch for trunk.

        Please review and provide your comments.

        Show
        Ravi Gummadi added a comment - Attaching patch for trunk. Please review and provide your comments.
        Hide
        Amareshwari Sriramadasu added a comment -

        Changes look fine. Running through Hudson.

        Show
        Amareshwari Sriramadasu added a comment - Changes look fine. Running through Hudson.
        Hide
        Vinod Kumar Vavilapalli added a comment -

        +1 for the latest patch. Waiting for Hudson's blessings.

        Show
        Vinod Kumar Vavilapalli added a comment - +1 for the latest patch. Waiting for Hudson's blessings.
        Hide
        Vinod Kumar Vavilapalli added a comment -

        +1 for the latest patch. Waiting for Hudson's blessings.

        Sorry. Wrong tab.

        Show
        Vinod Kumar Vavilapalli added a comment - +1 for the latest patch. Waiting for Hudson's blessings. Sorry. Wrong tab.
        Hide
        Hadoop QA added a comment -

        -1 overall. Here are the results of testing the latest attachment
        http://issues.apache.org/jira/secure/attachment/12442846/MR1657.patch
        against trunk revision 938387.

        +1 @author. The patch does not contain any @author tags.

        +1 tests included. The patch appears to include 3 new or modified tests.

        +1 javadoc. The javadoc tool did not generate any warning messages.

        +1 javac. The applied patch does not increase the total number of javac compiler warnings.

        +1 findbugs. The patch does not introduce any new Findbugs warnings.

        +1 release audit. The applied patch does not increase the total number of release audit warnings.

        -1 core tests. The patch failed core unit tests.

        +1 contrib tests. The patch passed contrib unit tests.

        Test results: http://hudson.zones.apache.org/hudson/job/Mapreduce-Patch-h4.grid.sp2.yahoo.net/146/testReport/
        Findbugs warnings: http://hudson.zones.apache.org/hudson/job/Mapreduce-Patch-h4.grid.sp2.yahoo.net/146/artifact/trunk/build/test/findbugs/newPatchFindbugsWarnings.html
        Checkstyle results: http://hudson.zones.apache.org/hudson/job/Mapreduce-Patch-h4.grid.sp2.yahoo.net/146/artifact/trunk/build/test/checkstyle-errors.html
        Console output: http://hudson.zones.apache.org/hudson/job/Mapreduce-Patch-h4.grid.sp2.yahoo.net/146/console

        This message is automatically generated.

        Show
        Hadoop QA added a comment - -1 overall. Here are the results of testing the latest attachment http://issues.apache.org/jira/secure/attachment/12442846/MR1657.patch against trunk revision 938387. +1 @author. The patch does not contain any @author tags. +1 tests included. The patch appears to include 3 new or modified tests. +1 javadoc. The javadoc tool did not generate any warning messages. +1 javac. The applied patch does not increase the total number of javac compiler warnings. +1 findbugs. The patch does not introduce any new Findbugs warnings. +1 release audit. The applied patch does not increase the total number of release audit warnings. -1 core tests. The patch failed core unit tests. +1 contrib tests. The patch passed contrib unit tests. Test results: http://hudson.zones.apache.org/hudson/job/Mapreduce-Patch-h4.grid.sp2.yahoo.net/146/testReport/ Findbugs warnings: http://hudson.zones.apache.org/hudson/job/Mapreduce-Patch-h4.grid.sp2.yahoo.net/146/artifact/trunk/build/test/findbugs/newPatchFindbugsWarnings.html Checkstyle results: http://hudson.zones.apache.org/hudson/job/Mapreduce-Patch-h4.grid.sp2.yahoo.net/146/artifact/trunk/build/test/checkstyle-errors.html Console output: http://hudson.zones.apache.org/hudson/job/Mapreduce-Patch-h4.grid.sp2.yahoo.net/146/console This message is automatically generated.
        Hide
        Ravi Gummadi added a comment -

        unit tests failed are not related to this patch.
        TestJobACLs failed because of MAPREDUCE-1727.
        TestLazyOutput.testLazyOutput failed with ZipException because of MAPREDUCE-1642.

        Show
        Ravi Gummadi added a comment - unit tests failed are not related to this patch. TestJobACLs failed because of MAPREDUCE-1727 . TestLazyOutput.testLazyOutput failed with ZipException because of MAPREDUCE-1642 .
        Hide
        Vinod Kumar Vavilapalli added a comment -

        I just committed this. Thanks Ravi!

        Show
        Vinod Kumar Vavilapalli added a comment - I just committed this. Thanks Ravi!

          People

          • Assignee:
            Ravi Gummadi
            Reporter:
            Ravi Gummadi
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development