Hadoop Common
  1. Hadoop Common
  2. HADOOP-8882

uppercase namenode host name causes fsck to fail when useKsslAuth is on

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 1.0.3, 1.1.0, 1.2.0
    • Fix Version/s: 1.1.1
    • Component/s: None
    • Labels:
      None
    • Hadoop Flags:
      Reviewed

      Description

       public static void fetchServiceTicket(URL remoteHost) throws IOException {
          if(!UserGroupInformation.isSecurityEnabled())
            return;
          
          String serviceName = "host/" + remoteHost.getHost();
      

      the hostname should be converted to lower case. Saw this in branch 1, will look at trunk and update the bug accordingly.

      1. HADOOP-8882.branch-1.patch
        1 kB
        Arpit Gupta
      2. HADOOP-8882.branch-1.patch
        1 kB
        Arpit Gupta

        Issue Links

          Activity

          Hide
          Matt Foley added a comment -

          Closed upon release of 1.1.1.

          Show
          Matt Foley added a comment - Closed upon release of 1.1.1.
          Hide
          Matt Foley added a comment -

          included in branch-1.1

          Show
          Matt Foley added a comment - included in branch-1.1
          Hide
          Suresh Srinivas added a comment -

          I committed the patch to branch-1. Thank you Aprit.

          Show
          Suresh Srinivas added a comment - I committed the patch to branch-1. Thank you Aprit.
          Hide
          Suresh Srinivas added a comment -

          +1 for the branch-1 change.

          Show
          Suresh Srinivas added a comment - +1 for the branch-1 change.
          Hide
          Arpit Gupta added a comment -

          here is the test patch output

          [exec] 
               [exec] -1 overall.  
               [exec] 
               [exec]     +1 @author.  The patch does not contain any @author tags.
               [exec] 
               [exec]     -1 tests included.  The patch doesn't appear to include any new or modified tests.
               [exec]                         Please justify why no tests are needed for this patch.
               [exec] 
               [exec]     +1 javadoc.  The javadoc tool did not generate any warning messages.
               [exec] 
               [exec]     +1 javac.  The applied patch does not increase the total number of javac compiler warnings.
               [exec] 
               [exec]     -1 findbugs.  The patch appears to introduce 9 new Findbugs (version 1.3.9) warnings.
               [exec] 
               [exec] 
               [exec] 
               [exec] 
               [exec] ======================================================================
               [exec] ======================================================================
               [exec]     Finished build.
               [exec] ======================================================================
               [exec] ======================================================================
          

          Findbugs warnings are not related to this patch.

          No tests added as TestSecurityUtil as appropriate coverage.

          Show
          Arpit Gupta added a comment - here is the test patch output [exec] [exec] -1 overall. [exec] [exec] +1 @author. The patch does not contain any @author tags. [exec] [exec] -1 tests included. The patch doesn't appear to include any new or modified tests. [exec] Please justify why no tests are needed for this patch. [exec] [exec] +1 javadoc. The javadoc tool did not generate any warning messages. [exec] [exec] +1 javac. The applied patch does not increase the total number of javac compiler warnings. [exec] [exec] -1 findbugs. The patch appears to introduce 9 new Findbugs (version 1.3.9) warnings. [exec] [exec] [exec] [exec] [exec] ====================================================================== [exec] ====================================================================== [exec] Finished build. [exec] ====================================================================== [exec] ====================================================================== Findbugs warnings are not related to this patch. No tests added as TestSecurityUtil as appropriate coverage.
          Hide
          Arpit Gupta added a comment -

          updated the patch to use the method in kerberosUtil.getServicePrincipal.

          That method uses LOCALE.US in toLowerCase

          Show
          Arpit Gupta added a comment - updated the patch to use the method in kerberosUtil.getServicePrincipal. That method uses LOCALE.US in toLowerCase
          Hide
          Arpit Gupta added a comment -

          once HADOOP-8878 gets committed i will change this patch to use the method in KerberosUtil so we are going through the same code path.

          Show
          Arpit Gupta added a comment - once HADOOP-8878 gets committed i will change this patch to use the method in KerberosUtil so we are going through the same code path.
          Hide
          Arpit Gupta added a comment -

          i meant without locale info in the above comment.

          Show
          Arpit Gupta added a comment - i meant without locale info in the above comment.
          Hide
          Arpit Gupta added a comment -

          @Steve

          Thanks for the heads up. I followed the same approach that HADOOP-7988 followed to convert the service principal hostnames to lower case with locale.

          My be should open up a different jira to make them all handle locale. Let me know what you think.

          Show
          Arpit Gupta added a comment - @Steve Thanks for the heads up. I followed the same approach that HADOOP-7988 followed to convert the service principal hostnames to lower case with locale. My be should open up a different jira to make them all handle locale. Let me know what you think.
          Hide
          Steve Loughran added a comment -

          Arpit -you should really use toLowerCase(Locale.EN_US), otherwise the case conversion will fail in places where upper/lower case rules are different (example: turkey)

          Show
          Steve Loughran added a comment - Arpit -you should really use toLowerCase(Locale.EN_US) , otherwise the case conversion will fail in places where upper/lower case rules are different (example: turkey)
          Hide
          Arpit Gupta added a comment -

          in trunk fsck uses spengo and will be fixed by HADOOP-8878

          Show
          Arpit Gupta added a comment - in trunk fsck uses spengo and will be fixed by HADOOP-8878
          Hide
          Arpit Gupta added a comment -

          in branch-1.0 fsck uses fetchServiceTicket and there is no useKsslAuth option.

          Show
          Arpit Gupta added a comment - in branch-1.0 fsck uses fetchServiceTicket and there is no useKsslAuth option.
          Hide
          Arpit Gupta added a comment -

          branch-1 patch: removed unused import and converted hostname to lower case.

          Show
          Arpit Gupta added a comment - branch-1 patch: removed unused import and converted hostname to lower case.

            People

            • Assignee:
              Arpit Gupta
              Reporter:
              Arpit Gupta
            • Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development