Uploaded image for project: 'HBase'
  1. HBase
  2. HBASE-16207

can't restore snapshot without "Admin" permission

Details

    Description

      MasterRpcServices.restoreSnapshot() tries to verify if the NS exists before starting the restore, but instead of calling ensureNamespaceExists() it calls master.getNamespace() which requires ADMIN permission to get the NS descriptor.

      public RestoreSnapshotResponse restoreSnapshot(RpcController controller,
      ...
        // Ensure namespace exists. Will throw exception if non-known NS.
        master.getNamespace(dstTable.getNamespaceAsString());
      

      unfortunately i'm not aware of any unit-test that cover this kind of situations. we cover single ACLs from the TestAccessController but we don't exercise rpc calls and verify if there is more than one check on the ACLs like in this case

      Attachments

        1. HBASE-16207-v0_branch-1.patch
          2 kB
          Matteo Bertozzi
        2. HBASE-16207-v0.patch
          0.9 kB
          Matteo Bertozzi

        Activity

          hadoopqa Hadoop QA added a comment -
          -1 overall



          Vote Subsystem Runtime Comment
          +1 hbaseanti 0m 0s Patch does not have any anti-patterns.
          +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 3m 43s master passed
          +1 compile 0m 48s master passed with JDK v1.8.0
          +1 compile 0m 36s master passed with JDK v1.7.0_80
          +1 checkstyle 0m 53s master passed
          +1 mvneclipse 0m 16s master passed
          +1 findbugs 2m 11s master passed
          +1 javadoc 0m 35s master passed with JDK v1.8.0
          +1 javadoc 0m 40s master passed with JDK v1.7.0_80
          +1 mvninstall 0m 51s the patch passed
          +1 compile 0m 50s the patch passed with JDK v1.8.0
          +1 javac 0m 50s the patch passed
          +1 compile 0m 39s the patch passed with JDK v1.7.0_80
          +1 javac 0m 39s the patch passed
          +1 checkstyle 0m 57s the patch passed
          +1 mvneclipse 0m 18s the patch passed
          +1 whitespace 0m 0s Patch has no whitespace issues.
          +1 hadoopcheck 29m 45s Patch does not cause any errors with Hadoop 2.4.0 2.4.1 2.5.0 2.5.1 2.5.2 2.6.1 2.6.2 2.6.3 2.7.1.
          +1 findbugs 2m 11s the patch passed
          +1 javadoc 0m 26s the patch passed with JDK v1.8.0
          +1 javadoc 0m 35s the patch passed with JDK v1.7.0_80
          -1 unit 93m 51s hbase-server in the patch failed.
          +1 asflicense 0m 19s Patch does not generate ASF License warnings.
          140m 49s



          Subsystem Report/Notes
          JIRA Patch URL https://issues.apache.org/jira/secure/attachment/12817202/HBASE-16207-v0.patch
          JIRA Issue HBASE-16207
          Optional Tests asflicense javac javadoc unit findbugs hadoopcheck hbaseanti checkstyle compile
          uname Linux asf901.gq1.ygridcore.net 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 /home/jenkins/jenkins-slave/workspace/PreCommit-HBASE-Build/component/dev-support/hbase-personality.sh
          git revision master / 356c130
          Default Java 1.7.0_80
          Multi-JDK versions /home/jenkins/tools/java/jdk1.8.0:1.8.0 /home/jenkins/jenkins-slave/tools/hudson.model.JDK/JDK_1.7_latest_:1.7.0_80
          findbugs v3.0.0
          unit https://builds.apache.org/job/PreCommit-HBASE-Build/2586/artifact/patchprocess/patch-unit-hbase-server.txt
          Test Results https://builds.apache.org/job/PreCommit-HBASE-Build/2586/testReport/
          modules C: hbase-server U: hbase-server
          Console output https://builds.apache.org/job/PreCommit-HBASE-Build/2586/console
          Powered by Apache Yetus 0.2.1 http://yetus.apache.org

          This message was automatically generated.

          hadoopqa Hadoop QA added a comment - -1 overall Vote Subsystem Runtime Comment +1 hbaseanti 0m 0s Patch does not have any anti-patterns. +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 3m 43s master passed +1 compile 0m 48s master passed with JDK v1.8.0 +1 compile 0m 36s master passed with JDK v1.7.0_80 +1 checkstyle 0m 53s master passed +1 mvneclipse 0m 16s master passed +1 findbugs 2m 11s master passed +1 javadoc 0m 35s master passed with JDK v1.8.0 +1 javadoc 0m 40s master passed with JDK v1.7.0_80 +1 mvninstall 0m 51s the patch passed +1 compile 0m 50s the patch passed with JDK v1.8.0 +1 javac 0m 50s the patch passed +1 compile 0m 39s the patch passed with JDK v1.7.0_80 +1 javac 0m 39s the patch passed +1 checkstyle 0m 57s the patch passed +1 mvneclipse 0m 18s the patch passed +1 whitespace 0m 0s Patch has no whitespace issues. +1 hadoopcheck 29m 45s Patch does not cause any errors with Hadoop 2.4.0 2.4.1 2.5.0 2.5.1 2.5.2 2.6.1 2.6.2 2.6.3 2.7.1. +1 findbugs 2m 11s the patch passed +1 javadoc 0m 26s the patch passed with JDK v1.8.0 +1 javadoc 0m 35s the patch passed with JDK v1.7.0_80 -1 unit 93m 51s hbase-server in the patch failed. +1 asflicense 0m 19s Patch does not generate ASF License warnings. 140m 49s Subsystem Report/Notes JIRA Patch URL https://issues.apache.org/jira/secure/attachment/12817202/HBASE-16207-v0.patch JIRA Issue HBASE-16207 Optional Tests asflicense javac javadoc unit findbugs hadoopcheck hbaseanti checkstyle compile uname Linux asf901.gq1.ygridcore.net 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 /home/jenkins/jenkins-slave/workspace/PreCommit-HBASE-Build/component/dev-support/hbase-personality.sh git revision master / 356c130 Default Java 1.7.0_80 Multi-JDK versions /home/jenkins/tools/java/jdk1.8.0:1.8.0 /home/jenkins/jenkins-slave/tools/hudson.model.JDK/JDK_1.7_latest_:1.7.0_80 findbugs v3.0.0 unit https://builds.apache.org/job/PreCommit-HBASE-Build/2586/artifact/patchprocess/patch-unit-hbase-server.txt Test Results https://builds.apache.org/job/PreCommit-HBASE-Build/2586/testReport/ modules C: hbase-server U: hbase-server Console output https://builds.apache.org/job/PreCommit-HBASE-Build/2586/console Powered by Apache Yetus 0.2.1 http://yetus.apache.org This message was automatically generated.
          jinghe Jerry He added a comment -

          +1

          jinghe Jerry He added a comment - +1
          hudson Hudson added a comment -

          SUCCESS: Integrated in HBase-1.3-IT #751 (See https://builds.apache.org/job/HBase-1.3-IT/751/)
          HBASE-16207 can't restore snapshot without "Admin" permission (matteo.bertozzi: rev 51eee9a22f1398168bedcb19ab6e2b6a5eb7c4bf)

          • hbase-server/src/main/java/org/apache/hadoop/hbase/master/MasterRpcServices.java
          • hbase-server/src/main/java/org/apache/hadoop/hbase/master/HMaster.java
          hudson Hudson added a comment - SUCCESS: Integrated in HBase-1.3-IT #751 (See https://builds.apache.org/job/HBase-1.3-IT/751/ ) HBASE-16207 can't restore snapshot without "Admin" permission (matteo.bertozzi: rev 51eee9a22f1398168bedcb19ab6e2b6a5eb7c4bf) hbase-server/src/main/java/org/apache/hadoop/hbase/master/MasterRpcServices.java hbase-server/src/main/java/org/apache/hadoop/hbase/master/HMaster.java
          hudson Hudson added a comment -

          SUCCESS: Integrated in HBase-1.1-JDK8 #1832 (See https://builds.apache.org/job/HBase-1.1-JDK8/1832/)
          HBASE-16207 can't restore snapshot without "Admin" permission (matteo.bertozzi: rev 67d057451d10ec9725445b1230fbfd932a3745a6)

          • hbase-server/src/main/java/org/apache/hadoop/hbase/master/MasterRpcServices.java
          • hbase-server/src/main/java/org/apache/hadoop/hbase/master/HMaster.java
          hudson Hudson added a comment - SUCCESS: Integrated in HBase-1.1-JDK8 #1832 (See https://builds.apache.org/job/HBase-1.1-JDK8/1832/ ) HBASE-16207 can't restore snapshot without "Admin" permission (matteo.bertozzi: rev 67d057451d10ec9725445b1230fbfd932a3745a6) hbase-server/src/main/java/org/apache/hadoop/hbase/master/MasterRpcServices.java hbase-server/src/main/java/org/apache/hadoop/hbase/master/HMaster.java
          hudson Hudson added a comment -

          SUCCESS: Integrated in HBase-1.2-IT #550 (See https://builds.apache.org/job/HBase-1.2-IT/550/)
          HBASE-16207 can't restore snapshot without "Admin" permission (matteo.bertozzi: rev 9b5f19eaebfb6099de9edd1204be7da9fc4c6a34)

          • hbase-server/src/main/java/org/apache/hadoop/hbase/master/MasterRpcServices.java
          • hbase-server/src/main/java/org/apache/hadoop/hbase/master/HMaster.java
          hudson Hudson added a comment - SUCCESS: Integrated in HBase-1.2-IT #550 (See https://builds.apache.org/job/HBase-1.2-IT/550/ ) HBASE-16207 can't restore snapshot without "Admin" permission (matteo.bertozzi: rev 9b5f19eaebfb6099de9edd1204be7da9fc4c6a34) hbase-server/src/main/java/org/apache/hadoop/hbase/master/MasterRpcServices.java hbase-server/src/main/java/org/apache/hadoop/hbase/master/HMaster.java
          hudson Hudson added a comment -

          SUCCESS: Integrated in HBase-1.1-JDK7 #1746 (See https://builds.apache.org/job/HBase-1.1-JDK7/1746/)
          HBASE-16207 can't restore snapshot without "Admin" permission (matteo.bertozzi: rev 67d057451d10ec9725445b1230fbfd932a3745a6)

          • hbase-server/src/main/java/org/apache/hadoop/hbase/master/HMaster.java
          • hbase-server/src/main/java/org/apache/hadoop/hbase/master/MasterRpcServices.java
          hudson Hudson added a comment - SUCCESS: Integrated in HBase-1.1-JDK7 #1746 (See https://builds.apache.org/job/HBase-1.1-JDK7/1746/ ) HBASE-16207 can't restore snapshot without "Admin" permission (matteo.bertozzi: rev 67d057451d10ec9725445b1230fbfd932a3745a6) hbase-server/src/main/java/org/apache/hadoop/hbase/master/HMaster.java hbase-server/src/main/java/org/apache/hadoop/hbase/master/MasterRpcServices.java
          hudson Hudson added a comment -

          SUCCESS: Integrated in HBase-1.4 #282 (See https://builds.apache.org/job/HBase-1.4/282/)
          HBASE-16207 can't restore snapshot without "Admin" permission (matteo.bertozzi: rev 36a48a3cf9b6989350a9c1d0ad179c3043f95b43)

          • hbase-server/src/main/java/org/apache/hadoop/hbase/master/MasterRpcServices.java
          • hbase-server/src/main/java/org/apache/hadoop/hbase/master/HMaster.java
          hudson Hudson added a comment - SUCCESS: Integrated in HBase-1.4 #282 (See https://builds.apache.org/job/HBase-1.4/282/ ) HBASE-16207 can't restore snapshot without "Admin" permission (matteo.bertozzi: rev 36a48a3cf9b6989350a9c1d0ad179c3043f95b43) hbase-server/src/main/java/org/apache/hadoop/hbase/master/MasterRpcServices.java hbase-server/src/main/java/org/apache/hadoop/hbase/master/HMaster.java
          hudson Hudson added a comment -

          FAILURE: Integrated in HBase-1.3 #780 (See https://builds.apache.org/job/HBase-1.3/780/)
          HBASE-16207 can't restore snapshot without "Admin" permission (matteo.bertozzi: rev 51eee9a22f1398168bedcb19ab6e2b6a5eb7c4bf)

          • hbase-server/src/main/java/org/apache/hadoop/hbase/master/MasterRpcServices.java
          • hbase-server/src/main/java/org/apache/hadoop/hbase/master/HMaster.java
          hudson Hudson added a comment - FAILURE: Integrated in HBase-1.3 #780 (See https://builds.apache.org/job/HBase-1.3/780/ ) HBASE-16207 can't restore snapshot without "Admin" permission (matteo.bertozzi: rev 51eee9a22f1398168bedcb19ab6e2b6a5eb7c4bf) hbase-server/src/main/java/org/apache/hadoop/hbase/master/MasterRpcServices.java hbase-server/src/main/java/org/apache/hadoop/hbase/master/HMaster.java
          hudson Hudson added a comment -

          FAILURE: Integrated in HBase-Trunk_matrix #1216 (See https://builds.apache.org/job/HBase-Trunk_matrix/1216/)
          HBASE-16207 can't restore snapshot without "Admin" permission (matteo.bertozzi: rev 2650711e944244b3b87e6d6805b7716b216e8786)

          • hbase-server/src/main/java/org/apache/hadoop/hbase/master/MasterRpcServices.java
          hudson Hudson added a comment - FAILURE: Integrated in HBase-Trunk_matrix #1216 (See https://builds.apache.org/job/HBase-Trunk_matrix/1216/ ) HBASE-16207 can't restore snapshot without "Admin" permission (matteo.bertozzi: rev 2650711e944244b3b87e6d6805b7716b216e8786) hbase-server/src/main/java/org/apache/hadoop/hbase/master/MasterRpcServices.java
          hudson Hudson added a comment -

          SUCCESS: Integrated in HBase-1.2 #669 (See https://builds.apache.org/job/HBase-1.2/669/)
          HBASE-16207 can't restore snapshot without "Admin" permission (matteo.bertozzi: rev 9b5f19eaebfb6099de9edd1204be7da9fc4c6a34)

          • hbase-server/src/main/java/org/apache/hadoop/hbase/master/MasterRpcServices.java
          • hbase-server/src/main/java/org/apache/hadoop/hbase/master/HMaster.java
          hudson Hudson added a comment - SUCCESS: Integrated in HBase-1.2 #669 (See https://builds.apache.org/job/HBase-1.2/669/ ) HBASE-16207 can't restore snapshot without "Admin" permission (matteo.bertozzi: rev 9b5f19eaebfb6099de9edd1204be7da9fc4c6a34) hbase-server/src/main/java/org/apache/hadoop/hbase/master/MasterRpcServices.java hbase-server/src/main/java/org/apache/hadoop/hbase/master/HMaster.java
          hudson Hudson added a comment -

          FAILURE: Integrated in HBase-0.98-on-Hadoop-1.1 #1241 (See https://builds.apache.org/job/HBase-0.98-on-Hadoop-1.1/1241/)
          HBASE-16207 can't restore snapshot without "Admin" permission (matteo.bertozzi: rev a16fb9ee0d6a6762604dc8f95334bc7b6b01ece0)

          • hbase-server/src/main/java/org/apache/hadoop/hbase/master/HMaster.java
          hudson Hudson added a comment - FAILURE: Integrated in HBase-0.98-on-Hadoop-1.1 #1241 (See https://builds.apache.org/job/HBase-0.98-on-Hadoop-1.1/1241/ ) HBASE-16207 can't restore snapshot without "Admin" permission (matteo.bertozzi: rev a16fb9ee0d6a6762604dc8f95334bc7b6b01ece0) hbase-server/src/main/java/org/apache/hadoop/hbase/master/HMaster.java

          People

            mbertozzi Matteo Bertozzi
            mbertozzi Matteo Bertozzi
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: