HBase
  1. HBase
  2. HBASE-4680

FSUtils.isInSafeMode() checks should operate on HBase root dir, where we have permissions

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Later
    • Affects Version/s: 0.92.0, 0.94.0
    • Fix Version/s: None
    • Component/s: util
    • Labels:
      None
    • Hadoop Flags:
      Reviewed

      Description

      The HDFS safe mode check workaround introduced by HBASE-4510 performs a FileSystem.setPermission() operation on the root directory ("/") when attempting to trigger a SafeModeException. As a result, it requires superuser privileges when running with DFS permission checking enabled. Changing the operations to act on the HBase root directory should be safe, since the master process must have write access to it.

      1. HBASE-4680.patch
        2 kB
        Gary Helmling

        Activity

        Hide
        Harsh J added a comment -

        Not a problem right now.

        Show
        Harsh J added a comment - Not a problem right now.
        Hide
        Hudson added a comment -

        Integrated in HBase-0.92 #90 (See https://builds.apache.org/job/HBase-0.92/90/)
        HBASE-4680 FSUtils.isInSafeMode() checks should operate on HBase root dir, where we have permissions; REVERT
        HBASE-4680 FSUtils.isInSafeMode() checks should operate on HBase root dir, where we have permissions

        stack :
        Files :

        • /hbase/branches/0.92/CHANGES.txt
        • /hbase/branches/0.92/src/main/java/org/apache/hadoop/hbase/util/FSUtils.java

        garyh :
        Files :

        • /hbase/branches/0.92/CHANGES.txt
        • /hbase/branches/0.92/src/main/java/org/apache/hadoop/hbase/util/FSUtils.java
        Show
        Hudson added a comment - Integrated in HBase-0.92 #90 (See https://builds.apache.org/job/HBase-0.92/90/ ) HBASE-4680 FSUtils.isInSafeMode() checks should operate on HBase root dir, where we have permissions; REVERT HBASE-4680 FSUtils.isInSafeMode() checks should operate on HBase root dir, where we have permissions stack : Files : /hbase/branches/0.92/CHANGES.txt /hbase/branches/0.92/src/main/java/org/apache/hadoop/hbase/util/FSUtils.java garyh : Files : /hbase/branches/0.92/CHANGES.txt /hbase/branches/0.92/src/main/java/org/apache/hadoop/hbase/util/FSUtils.java
        Hide
        Hudson added a comment -

        Integrated in HBase-TRUNK #2392 (See https://builds.apache.org/job/HBase-TRUNK/2392/)
        HBASE-4680 FSUtils.isInSafeMode() checks should operate on HBase root dir, where we have permissions; REVERT

        stack :
        Files :

        • /hbase/trunk/CHANGES.txt
        • /hbase/trunk/src/main/java/org/apache/hadoop/hbase/util/FSUtils.java
        Show
        Hudson added a comment - Integrated in HBase-TRUNK #2392 (See https://builds.apache.org/job/HBase-TRUNK/2392/ ) HBASE-4680 FSUtils.isInSafeMode() checks should operate on HBase root dir, where we have permissions; REVERT stack : Files : /hbase/trunk/CHANGES.txt /hbase/trunk/src/main/java/org/apache/hadoop/hbase/util/FSUtils.java
        Hide
        stack added a comment -

        I reverted this change.

        Show
        stack added a comment - I reverted this change.
        Hide
        stack added a comment -

        Reopening

        Show
        stack added a comment - Reopening
        Show
        stack added a comment - Reverting because of this discussion: http://search-hadoop.com/m/7WOjpVyG5F/Hmaster+can%2527t+start+for+the+latest+trunk+version&subj=Hmaster+can+t+start+for+the+latest+trunk+version
        Hide
        Harsh J added a comment -

        I apologize for missing the whole activity on this (didn't see a comment on HBASE-4510, oops).

        I think a better fix would have been to just catch other exceptions (which is something I missed despite commenting).

        This change is fine too, but has lead to HBASE-4705 scenarios. Could we revert this and instead add a:

        catch (Safemode) {
         return true;
        } catch (Others) {
         ignore;
        }
        

        Kinda block, while still operating on the only dir guaranteed to exist (/ - root)?

        Show
        Harsh J added a comment - I apologize for missing the whole activity on this (didn't see a comment on HBASE-4510 , oops). I think a better fix would have been to just catch other exceptions (which is something I missed despite commenting). This change is fine too, but has lead to HBASE-4705 scenarios. Could we revert this and instead add a: catch (Safemode) { return true ; } catch (Others) { ignore; } Kinda block, while still operating on the only dir guaranteed to exist (/ - root)?
        Hide
        Hudson added a comment -

        Integrated in HBase-TRUNK #2379 (See https://builds.apache.org/job/HBase-TRUNK/2379/)
        HBASE-4680 FSUtils.isInSafeMode() checks should operate on HBase root dir, where we have permissions

        garyh :
        Files :

        • /hbase/trunk/CHANGES.txt
        • /hbase/trunk/src/main/java/org/apache/hadoop/hbase/util/FSUtils.java
        Show
        Hudson added a comment - Integrated in HBase-TRUNK #2379 (See https://builds.apache.org/job/HBase-TRUNK/2379/ ) HBASE-4680 FSUtils.isInSafeMode() checks should operate on HBase root dir, where we have permissions garyh : Files : /hbase/trunk/CHANGES.txt /hbase/trunk/src/main/java/org/apache/hadoop/hbase/util/FSUtils.java
        Hide
        Gary Helmling added a comment -

        Patch committed to 0.92 branch and trunk.

        Show
        Gary Helmling added a comment - Patch committed to 0.92 branch and trunk.
        Hide
        stack added a comment -

        Failed because patch is git.

        Show
        stack added a comment - Failed because patch is git.
        Hide
        Hadoop QA added a comment -

        -1 overall. Here are the results of testing the latest attachment
        http://issues.apache.org/jira/secure/attachment/12500825/HBASE-4680.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 patch. The patch command could not apply the patch.

        Console output: https://builds.apache.org/job/PreCommit-HBASE-Build/83//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/12500825/HBASE-4680.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 patch. The patch command could not apply the patch. Console output: https://builds.apache.org/job/PreCommit-HBASE-Build/83//console This message is automatically generated.
        Hide
        Gary Helmling added a comment -

        Clarified title for actual change.

        Show
        Gary Helmling added a comment - Clarified title for actual change.
        Hide
        stack added a comment -

        +1

        Show
        stack added a comment - +1
        Hide
        Andrew Purtell added a comment -

        +1

        Show
        Andrew Purtell added a comment - +1
        Hide
        Gary Helmling added a comment -

        Patch against trunk fixing FSUtils.isInSafeMode() to operate on HBase root instead of filesystem root.

        Show
        Gary Helmling added a comment - Patch against trunk fixing FSUtils.isInSafeMode() to operate on HBase root instead of filesystem root.

          People

          • Assignee:
            Gary Helmling
            Reporter:
            Gary Helmling
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development