Uploaded image for project: 'Hadoop HDFS'
  1. Hadoop HDFS
  2. HDFS-10306

SafeModeMonitor should not leave safe mode if name system is starting active service

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 2.9.0, 3.0.0-alpha1
    • Component/s: namenode
    • Labels:
      None
    • Target Version/s:
    • Hadoop Flags:
      Reviewed

      Description

      This is a follow-up of HDFS-10192.

      The BlockManagerSafeMode$SafeModeMonitor#canLeave() is not checking the namesystem#inTransitionToActive(), while it should. According to the fix of HDFS-10192, we should add this check to prevent the smmthread from calling leaveSafeMode() too early.

        Issue Links

          Activity

          Hide
          liuml07 Mingliang Liu added a comment -

          Thank you Brahma Reddy Battula for your review (and previous work). Thanks Jing Zhao for your review and commit.

          Show
          liuml07 Mingliang Liu added a comment - Thank you Brahma Reddy Battula for your review (and previous work). Thanks Jing Zhao for your review and commit.
          Hide
          hudson Hudson added a comment -

          FAILURE: Integrated in Hadoop-trunk-Commit #9629 (See https://builds.apache.org/job/Hadoop-trunk-Commit/9629/)
          HDFS-10306. SafeModeMonitor should not leave safe mode if name system is (jing9: rev be0bce1b7171c49e2dca22f56d4e750e606862fc)

          • hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/blockmanagement/BlockManagerSafeMode.java
          Show
          hudson Hudson added a comment - FAILURE: Integrated in Hadoop-trunk-Commit #9629 (See https://builds.apache.org/job/Hadoop-trunk-Commit/9629/ ) HDFS-10306 . SafeModeMonitor should not leave safe mode if name system is (jing9: rev be0bce1b7171c49e2dca22f56d4e750e606862fc) hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/blockmanagement/BlockManagerSafeMode.java
          Hide
          jingzhao Jing Zhao added a comment -

          I've committed this into trunk and branch-2. Thanks for the fix, Mingliang Liu.

          Show
          jingzhao Jing Zhao added a comment - I've committed this into trunk and branch-2. Thanks for the fix, Mingliang Liu .
          Hide
          brahmareddy Brahma Reddy Battula added a comment -

          LGTM, Mingliang Liu thanks for taking care for this..

          Show
          brahmareddy Brahma Reddy Battula added a comment - LGTM, Mingliang Liu thanks for taking care for this..
          Hide
          jingzhao Jing Zhao added a comment -

          +1. I will commit the patch shortly.

          Show
          jingzhao Jing Zhao added a comment - +1. I will commit the patch shortly.
          Hide
          liuml07 Mingliang Liu added a comment -

          Test failures are not related. We don't add new test because this is a follow-up of HDFS-10192, which added two unit test, and HDFS-10284 refined them.

          Show
          liuml07 Mingliang Liu added a comment - Test failures are not related. We don't add new test because this is a follow-up of HDFS-10192 , which added two unit test, and HDFS-10284 refined them.
          Hide
          hadoopqa Hadoop QA added a comment -
          -1 overall



          Vote Subsystem Runtime Comment
          0 reexec 0m 11s Docker mode activated.
          +1 @author 0m 0s The patch does not contain any @author tags.
          -1 test4tests 0m 0s 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 mvninstall 6m 46s trunk passed
          +1 compile 0m 39s trunk passed with JDK v1.8.0_77
          +1 compile 0m 41s trunk passed with JDK v1.7.0_95
          +1 checkstyle 0m 20s trunk passed
          +1 mvnsite 0m 51s trunk passed
          +1 mvneclipse 0m 13s trunk passed
          +1 findbugs 1m 57s trunk passed
          +1 javadoc 1m 4s trunk passed with JDK v1.8.0_77
          +1 javadoc 1m 49s trunk passed with JDK v1.7.0_95
          +1 mvninstall 0m 48s the patch passed
          +1 compile 0m 38s the patch passed with JDK v1.8.0_77
          +1 javac 0m 38s the patch passed
          +1 compile 0m 40s the patch passed with JDK v1.7.0_95
          +1 javac 0m 40s the patch passed
          +1 checkstyle 0m 18s the patch passed
          +1 mvnsite 0m 48s the patch passed
          +1 mvneclipse 0m 11s the patch passed
          +1 whitespace 0m 0s Patch has no whitespace issues.
          +1 findbugs 2m 8s the patch passed
          +1 javadoc 1m 3s the patch passed with JDK v1.8.0_77
          +1 javadoc 1m 45s the patch passed with JDK v1.7.0_95
          -1 unit 55m 58s hadoop-hdfs in the patch failed with JDK v1.8.0_77.
          -1 unit 53m 44s hadoop-hdfs in the patch failed with JDK v1.7.0_95.
          +1 asflicense 0m 23s Patch does not generate ASF License warnings.
          134m 59s



          Reason Tests
          JDK v1.8.0_77 Failed junit tests hadoop.hdfs.server.namenode.TestEditLog
            hadoop.hdfs.shortcircuit.TestShortCircuitLocalRead
          JDK v1.7.0_95 Failed junit tests hadoop.hdfs.server.namenode.TestDecommissioningStatus
            hadoop.hdfs.shortcircuit.TestShortCircuitLocalRead
            hadoop.hdfs.TestHFlush



          Subsystem Report/Notes
          Docker Image:yetus/hadoop:fbe3e86
          JIRA Patch URL https://issues.apache.org/jira/secure/attachment/12799326/HDFS-10306.000.patch
          JIRA Issue HDFS-10306
          Optional Tests asflicense compile javac javadoc mvninstall mvnsite unit findbugs checkstyle
          uname Linux 32b9d09d0f20 3.13.0-36-lowlatency #63-Ubuntu SMP PREEMPT Wed Sep 3 21:56:12 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux
          Build tool maven
          Personality /testptch/hadoop/patchprocess/precommit/personality/provided.sh
          git revision trunk / 4770037
          Default Java 1.7.0_95
          Multi-JDK versions /usr/lib/jvm/java-8-oracle:1.8.0_77 /usr/lib/jvm/java-7-openjdk-amd64:1.7.0_95
          findbugs v3.0.0
          unit https://builds.apache.org/job/PreCommit-HDFS-Build/15188/artifact/patchprocess/patch-unit-hadoop-hdfs-project_hadoop-hdfs-jdk1.8.0_77.txt
          unit https://builds.apache.org/job/PreCommit-HDFS-Build/15188/artifact/patchprocess/patch-unit-hadoop-hdfs-project_hadoop-hdfs-jdk1.7.0_95.txt
          unit test logs https://builds.apache.org/job/PreCommit-HDFS-Build/15188/artifact/patchprocess/patch-unit-hadoop-hdfs-project_hadoop-hdfs-jdk1.8.0_77.txt https://builds.apache.org/job/PreCommit-HDFS-Build/15188/artifact/patchprocess/patch-unit-hadoop-hdfs-project_hadoop-hdfs-jdk1.7.0_95.txt
          JDK v1.7.0_95 Test Results https://builds.apache.org/job/PreCommit-HDFS-Build/15188/testReport/
          modules C: hadoop-hdfs-project/hadoop-hdfs U: hadoop-hdfs-project/hadoop-hdfs
          Console output https://builds.apache.org/job/PreCommit-HDFS-Build/15188/console
          Powered by Apache Yetus 0.2.0 http://yetus.apache.org

          This message was automatically generated.

          Show
          hadoopqa Hadoop QA added a comment - -1 overall Vote Subsystem Runtime Comment 0 reexec 0m 11s Docker mode activated. +1 @author 0m 0s The patch does not contain any @author tags. -1 test4tests 0m 0s 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 mvninstall 6m 46s trunk passed +1 compile 0m 39s trunk passed with JDK v1.8.0_77 +1 compile 0m 41s trunk passed with JDK v1.7.0_95 +1 checkstyle 0m 20s trunk passed +1 mvnsite 0m 51s trunk passed +1 mvneclipse 0m 13s trunk passed +1 findbugs 1m 57s trunk passed +1 javadoc 1m 4s trunk passed with JDK v1.8.0_77 +1 javadoc 1m 49s trunk passed with JDK v1.7.0_95 +1 mvninstall 0m 48s the patch passed +1 compile 0m 38s the patch passed with JDK v1.8.0_77 +1 javac 0m 38s the patch passed +1 compile 0m 40s the patch passed with JDK v1.7.0_95 +1 javac 0m 40s the patch passed +1 checkstyle 0m 18s the patch passed +1 mvnsite 0m 48s the patch passed +1 mvneclipse 0m 11s the patch passed +1 whitespace 0m 0s Patch has no whitespace issues. +1 findbugs 2m 8s the patch passed +1 javadoc 1m 3s the patch passed with JDK v1.8.0_77 +1 javadoc 1m 45s the patch passed with JDK v1.7.0_95 -1 unit 55m 58s hadoop-hdfs in the patch failed with JDK v1.8.0_77. -1 unit 53m 44s hadoop-hdfs in the patch failed with JDK v1.7.0_95. +1 asflicense 0m 23s Patch does not generate ASF License warnings. 134m 59s Reason Tests JDK v1.8.0_77 Failed junit tests hadoop.hdfs.server.namenode.TestEditLog   hadoop.hdfs.shortcircuit.TestShortCircuitLocalRead JDK v1.7.0_95 Failed junit tests hadoop.hdfs.server.namenode.TestDecommissioningStatus   hadoop.hdfs.shortcircuit.TestShortCircuitLocalRead   hadoop.hdfs.TestHFlush Subsystem Report/Notes Docker Image:yetus/hadoop:fbe3e86 JIRA Patch URL https://issues.apache.org/jira/secure/attachment/12799326/HDFS-10306.000.patch JIRA Issue HDFS-10306 Optional Tests asflicense compile javac javadoc mvninstall mvnsite unit findbugs checkstyle uname Linux 32b9d09d0f20 3.13.0-36-lowlatency #63-Ubuntu SMP PREEMPT Wed Sep 3 21:56:12 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux Build tool maven Personality /testptch/hadoop/patchprocess/precommit/personality/provided.sh git revision trunk / 4770037 Default Java 1.7.0_95 Multi-JDK versions /usr/lib/jvm/java-8-oracle:1.8.0_77 /usr/lib/jvm/java-7-openjdk-amd64:1.7.0_95 findbugs v3.0.0 unit https://builds.apache.org/job/PreCommit-HDFS-Build/15188/artifact/patchprocess/patch-unit-hadoop-hdfs-project_hadoop-hdfs-jdk1.8.0_77.txt unit https://builds.apache.org/job/PreCommit-HDFS-Build/15188/artifact/patchprocess/patch-unit-hadoop-hdfs-project_hadoop-hdfs-jdk1.7.0_95.txt unit test logs https://builds.apache.org/job/PreCommit-HDFS-Build/15188/artifact/patchprocess/patch-unit-hadoop-hdfs-project_hadoop-hdfs-jdk1.8.0_77.txt https://builds.apache.org/job/PreCommit-HDFS-Build/15188/artifact/patchprocess/patch-unit-hadoop-hdfs-project_hadoop-hdfs-jdk1.7.0_95.txt JDK v1.7.0_95 Test Results https://builds.apache.org/job/PreCommit-HDFS-Build/15188/testReport/ modules C: hadoop-hdfs-project/hadoop-hdfs U: hadoop-hdfs-project/hadoop-hdfs Console output https://builds.apache.org/job/PreCommit-HDFS-Build/15188/console Powered by Apache Yetus 0.2.0 http://yetus.apache.org This message was automatically generated.
          Hide
          liuml07 Mingliang Liu added a comment -

          Thanks Walter Su for suggesting separating this code out of HDFS-10284, which was to address o.a.h.hdfs.server.blockmanagement.TestBlockManagerSafeMode.testCheckSafeMode unit test intermittent failure.

          The v0 patch was from the v1 patch of HDFS-10284. Please review.

          Show
          liuml07 Mingliang Liu added a comment - Thanks Walter Su for suggesting separating this code out of HDFS-10284 , which was to address o.a.h.hdfs.server.blockmanagement.TestBlockManagerSafeMode.testCheckSafeMode unit test intermittent failure. The v0 patch was from the v1 patch of HDFS-10284 . Please review.

            People

            • Assignee:
              liuml07 Mingliang Liu
              Reporter:
              liuml07 Mingliang Liu
            • Votes:
              0 Vote for this issue
              Watchers:
              8 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development