Hadoop HDFS
  1. Hadoop HDFS
  2. HDFS-2840

TestHostnameFilter should work with localhost or localhost.localdomain

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 0.23.0
    • Fix Version/s: 0.23.1
    • Component/s: test
    • Labels:
      None
    • Hadoop Flags:
      Reviewed

      Description

      TestHostnameFilter may currently fail with the following:

      Error Message
      
      null expected:<localhost[.localdomain]> but was:<localhost[]>
      Stacktrace
      
      junit.framework.ComparisonFailure: null expected:<localhost[.localdomain]> but was:<localhost[]>
      	at junit.framework.Assert.assertEquals(Assert.java:81)
      	at junit.framework.Assert.assertEquals(Assert.java:87)
      	at org.apache.hadoop.lib.servlet.TestHostnameFilter$1.doFilter(TestHostnameFilter.java:50)
      	at org.apache.hadoop.lib.servlet.HostnameFilter.doFilter(HostnameFilter.java:68)
      	at org.apache.hadoop.lib.servlet.TestHostnameFilter.hostname(TestHostnameFilter.java:58)
      
      1. HDFS-2840.patch
        0.9 kB
        Alejandro Abdelnur

        Activity

        Hide
        Hudson added a comment -

        Integrated in Hadoop-Mapreduce-trunk #972 (See https://builds.apache.org/job/Hadoop-Mapreduce-trunk/972/)
        HDFS-2840. TestHostnameFilter should work with localhost or localhost.localdomain (tucu)

        tucu : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1236940
        Files :

        • /hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs-httpfs/src/test/java/org/apache/hadoop/lib/servlet/TestHostnameFilter.java
        • /hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt
        Show
        Hudson added a comment - Integrated in Hadoop-Mapreduce-trunk #972 (See https://builds.apache.org/job/Hadoop-Mapreduce-trunk/972/ ) HDFS-2840 . TestHostnameFilter should work with localhost or localhost.localdomain (tucu) tucu : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1236940 Files : /hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs-httpfs/src/test/java/org/apache/hadoop/lib/servlet/TestHostnameFilter.java /hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt
        Hide
        Hudson added a comment -

        Integrated in Hadoop-Hdfs-0.23-Build #152 (See https://builds.apache.org/job/Hadoop-Hdfs-0.23-Build/152/)
        Merge -r 1236939:1236940 from trunk to branch. FIXES: HDFS-2840

        tucu : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1236942
        Files :

        • /hadoop/common/branches/branch-0.23/hadoop-hdfs-project/hadoop-hdfs-httpfs/src/test/java/org/apache/hadoop/lib/servlet/TestHostnameFilter.java
        • /hadoop/common/branches/branch-0.23/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt
        Show
        Hudson added a comment - Integrated in Hadoop-Hdfs-0.23-Build #152 (See https://builds.apache.org/job/Hadoop-Hdfs-0.23-Build/152/ ) Merge -r 1236939:1236940 from trunk to branch. FIXES: HDFS-2840 tucu : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1236942 Files : /hadoop/common/branches/branch-0.23/hadoop-hdfs-project/hadoop-hdfs-httpfs/src/test/java/org/apache/hadoop/lib/servlet/TestHostnameFilter.java /hadoop/common/branches/branch-0.23/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt
        Hide
        Hudson added a comment -

        Integrated in Hadoop-Mapreduce-0.23-Build #174 (See https://builds.apache.org/job/Hadoop-Mapreduce-0.23-Build/174/)
        Merge -r 1236939:1236940 from trunk to branch. FIXES: HDFS-2840

        tucu : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1236942
        Files :

        • /hadoop/common/branches/branch-0.23/hadoop-hdfs-project/hadoop-hdfs-httpfs/src/test/java/org/apache/hadoop/lib/servlet/TestHostnameFilter.java
        • /hadoop/common/branches/branch-0.23/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt
        Show
        Hudson added a comment - Integrated in Hadoop-Mapreduce-0.23-Build #174 (See https://builds.apache.org/job/Hadoop-Mapreduce-0.23-Build/174/ ) Merge -r 1236939:1236940 from trunk to branch. FIXES: HDFS-2840 tucu : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1236942 Files : /hadoop/common/branches/branch-0.23/hadoop-hdfs-project/hadoop-hdfs-httpfs/src/test/java/org/apache/hadoop/lib/servlet/TestHostnameFilter.java /hadoop/common/branches/branch-0.23/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt
        Hide
        Hudson added a comment -

        Integrated in Hadoop-Hdfs-trunk #939 (See https://builds.apache.org/job/Hadoop-Hdfs-trunk/939/)
        HDFS-2840. TestHostnameFilter should work with localhost or localhost.localdomain (tucu)

        tucu : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1236940
        Files :

        • /hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs-httpfs/src/test/java/org/apache/hadoop/lib/servlet/TestHostnameFilter.java
        • /hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt
        Show
        Hudson added a comment - Integrated in Hadoop-Hdfs-trunk #939 (See https://builds.apache.org/job/Hadoop-Hdfs-trunk/939/ ) HDFS-2840 . TestHostnameFilter should work with localhost or localhost.localdomain (tucu) tucu : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1236940 Files : /hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs-httpfs/src/test/java/org/apache/hadoop/lib/servlet/TestHostnameFilter.java /hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt
        Hide
        Hudson added a comment -

        Integrated in Hadoop-Mapreduce-0.23-Commit #454 (See https://builds.apache.org/job/Hadoop-Mapreduce-0.23-Commit/454/)
        Merge -r 1236939:1236940 from trunk to branch. FIXES: HDFS-2840

        tucu : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1236942
        Files :

        • /hadoop/common/branches/branch-0.23/hadoop-hdfs-project/hadoop-hdfs-httpfs/src/test/java/org/apache/hadoop/lib/servlet/TestHostnameFilter.java
        • /hadoop/common/branches/branch-0.23/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt
        Show
        Hudson added a comment - Integrated in Hadoop-Mapreduce-0.23-Commit #454 (See https://builds.apache.org/job/Hadoop-Mapreduce-0.23-Commit/454/ ) Merge -r 1236939:1236940 from trunk to branch. FIXES: HDFS-2840 tucu : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1236942 Files : /hadoop/common/branches/branch-0.23/hadoop-hdfs-project/hadoop-hdfs-httpfs/src/test/java/org/apache/hadoop/lib/servlet/TestHostnameFilter.java /hadoop/common/branches/branch-0.23/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt
        Hide
        Hudson added a comment -

        Integrated in Hadoop-Mapreduce-trunk-Commit #1624 (See https://builds.apache.org/job/Hadoop-Mapreduce-trunk-Commit/1624/)
        HDFS-2840. TestHostnameFilter should work with localhost or localhost.localdomain (tucu)

        tucu : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1236940
        Files :

        • /hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs-httpfs/src/test/java/org/apache/hadoop/lib/servlet/TestHostnameFilter.java
        • /hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt
        Show
        Hudson added a comment - Integrated in Hadoop-Mapreduce-trunk-Commit #1624 (See https://builds.apache.org/job/Hadoop-Mapreduce-trunk-Commit/1624/ ) HDFS-2840 . TestHostnameFilter should work with localhost or localhost.localdomain (tucu) tucu : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1236940 Files : /hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs-httpfs/src/test/java/org/apache/hadoop/lib/servlet/TestHostnameFilter.java /hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt
        Hide
        Hudson added a comment -

        Integrated in Hadoop-Hdfs-0.23-Commit #429 (See https://builds.apache.org/job/Hadoop-Hdfs-0.23-Commit/429/)
        Merge -r 1236939:1236940 from trunk to branch. FIXES: HDFS-2840

        tucu : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1236942
        Files :

        • /hadoop/common/branches/branch-0.23/hadoop-hdfs-project/hadoop-hdfs-httpfs/src/test/java/org/apache/hadoop/lib/servlet/TestHostnameFilter.java
        • /hadoop/common/branches/branch-0.23/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt
        Show
        Hudson added a comment - Integrated in Hadoop-Hdfs-0.23-Commit #429 (See https://builds.apache.org/job/Hadoop-Hdfs-0.23-Commit/429/ ) Merge -r 1236939:1236940 from trunk to branch. FIXES: HDFS-2840 tucu : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1236942 Files : /hadoop/common/branches/branch-0.23/hadoop-hdfs-project/hadoop-hdfs-httpfs/src/test/java/org/apache/hadoop/lib/servlet/TestHostnameFilter.java /hadoop/common/branches/branch-0.23/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt
        Hide
        Hudson added a comment -

        Integrated in Hadoop-Common-trunk-Commit #1608 (See https://builds.apache.org/job/Hadoop-Common-trunk-Commit/1608/)
        HDFS-2840. TestHostnameFilter should work with localhost or localhost.localdomain (tucu)

        tucu : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1236940
        Files :

        • /hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs-httpfs/src/test/java/org/apache/hadoop/lib/servlet/TestHostnameFilter.java
        • /hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt
        Show
        Hudson added a comment - Integrated in Hadoop-Common-trunk-Commit #1608 (See https://builds.apache.org/job/Hadoop-Common-trunk-Commit/1608/ ) HDFS-2840 . TestHostnameFilter should work with localhost or localhost.localdomain (tucu) tucu : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1236940 Files : /hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs-httpfs/src/test/java/org/apache/hadoop/lib/servlet/TestHostnameFilter.java /hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt
        Hide
        Hudson added a comment -

        Integrated in Hadoop-Hdfs-trunk-Commit #1680 (See https://builds.apache.org/job/Hadoop-Hdfs-trunk-Commit/1680/)
        HDFS-2840. TestHostnameFilter should work with localhost or localhost.localdomain (tucu)

        tucu : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1236940
        Files :

        • /hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs-httpfs/src/test/java/org/apache/hadoop/lib/servlet/TestHostnameFilter.java
        • /hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt
        Show
        Hudson added a comment - Integrated in Hadoop-Hdfs-trunk-Commit #1680 (See https://builds.apache.org/job/Hadoop-Hdfs-trunk-Commit/1680/ ) HDFS-2840 . TestHostnameFilter should work with localhost or localhost.localdomain (tucu) tucu : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1236940 Files : /hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs-httpfs/src/test/java/org/apache/hadoop/lib/servlet/TestHostnameFilter.java /hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt
        Hide
        Hudson added a comment -

        Integrated in Hadoop-Common-0.23-Commit #438 (See https://builds.apache.org/job/Hadoop-Common-0.23-Commit/438/)
        Merge -r 1236939:1236940 from trunk to branch. FIXES: HDFS-2840

        tucu : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1236942
        Files :

        • /hadoop/common/branches/branch-0.23/hadoop-hdfs-project/hadoop-hdfs-httpfs/src/test/java/org/apache/hadoop/lib/servlet/TestHostnameFilter.java
        • /hadoop/common/branches/branch-0.23/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt
        Show
        Hudson added a comment - Integrated in Hadoop-Common-0.23-Commit #438 (See https://builds.apache.org/job/Hadoop-Common-0.23-Commit/438/ ) Merge -r 1236939:1236940 from trunk to branch. FIXES: HDFS-2840 tucu : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1236942 Files : /hadoop/common/branches/branch-0.23/hadoop-hdfs-project/hadoop-hdfs-httpfs/src/test/java/org/apache/hadoop/lib/servlet/TestHostnameFilter.java /hadoop/common/branches/branch-0.23/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt
        Hide
        Alejandro Abdelnur added a comment -

        Committed to trunk and branch-0.23

        Show
        Alejandro Abdelnur added a comment - Committed to trunk and branch-0.23
        Hide
        Eli Collins added a comment -

        +1 lgtm

        Show
        Eli Collins added a comment - +1 lgtm
        Hide
        Alejandro Abdelnur added a comment -

        -1s seem unrelated.

        Show
        Alejandro Abdelnur added a comment - -1s seem unrelated.
        Hide
        Hadoop QA added a comment -

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

        +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 appears to have generated 21 warning messages.

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

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

        -1 findbugs. The patch appears to introduce 1 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:
        org.apache.hadoop.hdfs.server.namenode.TestListCorruptFileBlocks
        org.apache.hadoop.hdfs.server.common.TestDistributedUpgrade

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

        Test results: https://builds.apache.org/job/PreCommit-HDFS-Build/1810//testReport/
        Findbugs warnings: https://builds.apache.org/job/PreCommit-HDFS-Build/1810//artifact/trunk/hadoop-hdfs-project/patchprocess/newPatchFindbugsWarningshadoop-hdfs.html
        Console output: https://builds.apache.org/job/PreCommit-HDFS-Build/1810//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/12511848/HDFS-2840.patch against trunk revision . +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 appears to have generated 21 warning messages. +1 javac. The applied patch does not increase the total number of javac compiler warnings. +1 eclipse:eclipse. The patch built with eclipse:eclipse. -1 findbugs. The patch appears to introduce 1 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: org.apache.hadoop.hdfs.server.namenode.TestListCorruptFileBlocks org.apache.hadoop.hdfs.server.common.TestDistributedUpgrade +1 contrib tests. The patch passed contrib unit tests. Test results: https://builds.apache.org/job/PreCommit-HDFS-Build/1810//testReport/ Findbugs warnings: https://builds.apache.org/job/PreCommit-HDFS-Build/1810//artifact/trunk/hadoop-hdfs-project/patchprocess/newPatchFindbugsWarningshadoop-hdfs.html Console output: https://builds.apache.org/job/PreCommit-HDFS-Build/1810//console This message is automatically generated.
        Hide
        Alejandro Abdelnur added a comment -

        same patch this time with correct JIRA in the name.

        Show
        Alejandro Abdelnur added a comment - same patch this time with correct JIRA in the name.
        Hide
        Alejandro Abdelnur added a comment -

        wrong attachement name

        Show
        Alejandro Abdelnur added a comment - wrong attachement name
        Hide
        Alejandro Abdelnur added a comment -

        changing assertion to check for containing 'localhost' instead of equals

        Show
        Alejandro Abdelnur added a comment - changing assertion to check for containing 'localhost' instead of equals
        Hide
        Alejandro Abdelnur added a comment -

        it seems there is no standard for what goes first, we'll have to change the test to test for both.

        Show
        Alejandro Abdelnur added a comment - it seems there is no standard for what goes first, we'll have to change the test to test for both.
        Hide
        Alejandro Abdelnur added a comment -

        This is an issue in systems where /etc/hosts is not properly configured for the loopback

        The loopback definition should be:

        127.0.0.1 localhost.localdomain localhost

        It seem the system had:

        127.0.0.1 localhost localhost.localdomain

        Show
        Alejandro Abdelnur added a comment - This is an issue in systems where /etc/hosts is not properly configured for the loopback The loopback definition should be: 127.0.0.1 localhost.localdomain localhost It seem the system had: 127.0.0.1 localhost localhost.localdomain
        Hide
        Peter Linnell added a comment -

        localhost.localdomain is RedHat centric and will certainly fail on other rpm distros

        Show
        Peter Linnell added a comment - localhost.localdomain is RedHat centric and will certainly fail on other rpm distros

          People

          • Assignee:
            Alejandro Abdelnur
            Reporter:
            Eli Collins
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development