Hadoop HDFS
  1. Hadoop HDFS
  2. HDFS-3444

hdfs groups command doesn't work with security enabled

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 2.0.0-alpha
    • Fix Version/s: 2.0.2-alpha
    • Component/s: hdfs-client
    • Labels:
      None
    • Hadoop Flags:
      Reviewed
    • Target Version/s:

      Description

      When one tries to run `hdfs groups' with security enabled, you'll get an error like the following:

      java.io.IOException: Failed to specify server's Kerberos principal name;
      
      1. HDFS-3444.patch
        3 kB
        Aaron T. Myers

        Activity

        Hide
        Aaron T. Myers added a comment -

        Here's a patch which addresses the issue. The problem was: a) there was no KerberosInfo annotation on the GetGroupsProtocolPB interface and b) the hdfs get groups commands was not subbing in the NN server principal for the generic GetGroups interface.

        No tests are included since security is required to exercise this bug. I tested it manually on a cluster with security enabled and confirmed that it works as expected.

        Show
        Aaron T. Myers added a comment - Here's a patch which addresses the issue. The problem was: a) there was no KerberosInfo annotation on the GetGroupsProtocolPB interface and b) the hdfs get groups commands was not subbing in the NN server principal for the generic GetGroups interface. No tests are included since security is required to exercise this bug. I tested it manually on a cluster with security enabled and confirmed that it works as expected.
        Hide
        Hadoop QA added a comment -

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

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

        -1 tests included. The patch doesn't appear to include any new or modified tests.
        Please justify why no new tests are needed for this patch.
        Also please list what manual steps were performed to verify this patch.

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

        -1 javadoc. The javadoc tool appears to have generated 2 warning messages.

        +1 eclipse:eclipse. The patch built with eclipse:eclipse.

        +1 findbugs. The patch does not introduce any new Findbugs (version 1.3.9) warnings.

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

        -1 core tests. The patch failed these unit tests in hadoop-hdfs-project/hadoop-hdfs:

        org.apache.hadoop.hdfs.TestFileAppend3

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

        Test results: https://builds.apache.org/job/PreCommit-HDFS-Build/2479//testReport/
        Console output: https://builds.apache.org/job/PreCommit-HDFS-Build/2479//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/12528120/HDFS-3444.patch against trunk revision . +1 @author. The patch does not contain any @author tags. -1 tests included. The patch doesn't appear to include any new or modified tests. Please justify why no new tests are needed for this patch. Also please list what manual steps were performed to verify this patch. +1 javac. The applied patch does not increase the total number of javac compiler warnings. -1 javadoc. The javadoc tool appears to have generated 2 warning messages. +1 eclipse:eclipse. The patch built with eclipse:eclipse. +1 findbugs. The patch does not introduce any new Findbugs (version 1.3.9) warnings. +1 release audit. The applied patch does not increase the total number of release audit warnings. -1 core tests. The patch failed these unit tests in hadoop-hdfs-project/hadoop-hdfs: org.apache.hadoop.hdfs.TestFileAppend3 +1 contrib tests. The patch passed contrib unit tests. Test results: https://builds.apache.org/job/PreCommit-HDFS-Build/2479//testReport/ Console output: https://builds.apache.org/job/PreCommit-HDFS-Build/2479//console This message is automatically generated.
        Hide
        Aaron T. Myers added a comment -

        No tests are included since this patch requires krb infrastructure to test per the previous comment.

        I'm pretty confident that the test failure is unrelated. It's in a completely separate part of the code, and I just looped it 10 times on my laptop with no failures.

        Show
        Aaron T. Myers added a comment - No tests are included since this patch requires krb infrastructure to test per the previous comment. I'm pretty confident that the test failure is unrelated. It's in a completely separate part of the code, and I just looped it 10 times on my laptop with no failures.
        Hide
        Eli Collins added a comment -

        +1 looks great

        Show
        Eli Collins added a comment - +1 looks great
        Hide
        Aaron T. Myers added a comment -

        Thanks a lot, Eli. I should've also mentioned - the javadoc warnings are unrelated.

        I'm going to commit this momentarily.

        Show
        Aaron T. Myers added a comment - Thanks a lot, Eli. I should've also mentioned - the javadoc warnings are unrelated. I'm going to commit this momentarily.
        Hide
        Aaron T. Myers added a comment -

        I've just committed this to trunk and branch-2.

        Thanks again for the review, Eli.

        Show
        Aaron T. Myers added a comment - I've just committed this to trunk and branch-2. Thanks again for the review, Eli.
        Hide
        Hudson added a comment -

        Integrated in Hadoop-Hdfs-trunk-Commit #2342 (See https://builds.apache.org/job/Hadoop-Hdfs-trunk-Commit/2342/)
        HDFS-3444. hdfs groups command doesn't work with security enabled. Contributed by Aaron T. Myers. (Revision 1340260)

        Result = SUCCESS
        atm : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1340260
        Files :

        • /hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt
        • /hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/protocolPB/GetUserMappingsProtocolPB.java
        • /hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/tools/GetGroups.java
        Show
        Hudson added a comment - Integrated in Hadoop-Hdfs-trunk-Commit #2342 (See https://builds.apache.org/job/Hadoop-Hdfs-trunk-Commit/2342/ ) HDFS-3444 . hdfs groups command doesn't work with security enabled. Contributed by Aaron T. Myers. (Revision 1340260) Result = SUCCESS atm : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1340260 Files : /hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt /hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/protocolPB/GetUserMappingsProtocolPB.java /hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/tools/GetGroups.java
        Hide
        Hudson added a comment -

        Integrated in Hadoop-Common-trunk-Commit #2269 (See https://builds.apache.org/job/Hadoop-Common-trunk-Commit/2269/)
        HDFS-3444. hdfs groups command doesn't work with security enabled. Contributed by Aaron T. Myers. (Revision 1340260)

        Result = SUCCESS
        atm : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1340260
        Files :

        • /hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt
        • /hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/protocolPB/GetUserMappingsProtocolPB.java
        • /hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/tools/GetGroups.java
        Show
        Hudson added a comment - Integrated in Hadoop-Common-trunk-Commit #2269 (See https://builds.apache.org/job/Hadoop-Common-trunk-Commit/2269/ ) HDFS-3444 . hdfs groups command doesn't work with security enabled. Contributed by Aaron T. Myers. (Revision 1340260) Result = SUCCESS atm : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1340260 Files : /hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt /hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/protocolPB/GetUserMappingsProtocolPB.java /hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/tools/GetGroups.java
        Hide
        Hudson added a comment -

        Integrated in Hadoop-Mapreduce-trunk-Commit #2287 (See https://builds.apache.org/job/Hadoop-Mapreduce-trunk-Commit/2287/)
        HDFS-3444. hdfs groups command doesn't work with security enabled. Contributed by Aaron T. Myers. (Revision 1340260)

        Result = FAILURE
        atm : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1340260
        Files :

        • /hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt
        • /hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/protocolPB/GetUserMappingsProtocolPB.java
        • /hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/tools/GetGroups.java
        Show
        Hudson added a comment - Integrated in Hadoop-Mapreduce-trunk-Commit #2287 (See https://builds.apache.org/job/Hadoop-Mapreduce-trunk-Commit/2287/ ) HDFS-3444 . hdfs groups command doesn't work with security enabled. Contributed by Aaron T. Myers. (Revision 1340260) Result = FAILURE atm : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1340260 Files : /hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt /hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/protocolPB/GetUserMappingsProtocolPB.java /hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/tools/GetGroups.java
        Hide
        Hudson added a comment -

        Integrated in Hadoop-Hdfs-trunk #1050 (See https://builds.apache.org/job/Hadoop-Hdfs-trunk/1050/)
        HDFS-3444. hdfs groups command doesn't work with security enabled. Contributed by Aaron T. Myers. (Revision 1340260)

        Result = SUCCESS
        atm : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1340260
        Files :

        • /hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt
        • /hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/protocolPB/GetUserMappingsProtocolPB.java
        • /hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/tools/GetGroups.java
        Show
        Hudson added a comment - Integrated in Hadoop-Hdfs-trunk #1050 (See https://builds.apache.org/job/Hadoop-Hdfs-trunk/1050/ ) HDFS-3444 . hdfs groups command doesn't work with security enabled. Contributed by Aaron T. Myers. (Revision 1340260) Result = SUCCESS atm : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1340260 Files : /hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt /hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/protocolPB/GetUserMappingsProtocolPB.java /hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/tools/GetGroups.java
        Hide
        Hudson added a comment -

        Integrated in Hadoop-Mapreduce-trunk #1084 (See https://builds.apache.org/job/Hadoop-Mapreduce-trunk/1084/)
        HDFS-3444. hdfs groups command doesn't work with security enabled. Contributed by Aaron T. Myers. (Revision 1340260)

        Result = FAILURE
        atm : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1340260
        Files :

        • /hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt
        • /hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/protocolPB/GetUserMappingsProtocolPB.java
        • /hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/tools/GetGroups.java
        Show
        Hudson added a comment - Integrated in Hadoop-Mapreduce-trunk #1084 (See https://builds.apache.org/job/Hadoop-Mapreduce-trunk/1084/ ) HDFS-3444 . hdfs groups command doesn't work with security enabled. Contributed by Aaron T. Myers. (Revision 1340260) Result = FAILURE atm : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1340260 Files : /hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt /hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/protocolPB/GetUserMappingsProtocolPB.java /hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/tools/GetGroups.java

          People

          • Assignee:
            Aaron T. Myers
            Reporter:
            Aaron T. Myers
          • Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development