hbase-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Andrew Purtell (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HBASE-10338) Region server fails to start with AccessController coprocessor if installed into RegionServerCoprocessorHost
Date Tue, 14 Jan 2014 22:47:20 GMT

    [ https://issues.apache.org/jira/browse/HBASE-10338?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13871311#comment-13871311
] 

Andrew Purtell commented on HBASE-10338:
----------------------------------------

I'm thinking just this to address how this slipped through. TestAccessController should insure
that the AC is added to all system coprocessor lists, which are set up elsewhere.

{noformat}
diff --git hbase-server/src/test/java/org/apache/hadoop/hbase/security/access/Te
index 9b8dd6e..ef56384 100644
--- hbase-server/src/test/java/org/apache/hadoop/hbase/security/access/TestAcces
+++ hbase-server/src/test/java/org/apache/hadoop/hbase/security/access/TestAcces
@@ -59,6 +59,7 @@ import org.apache.hadoop.hbase.client.Put;
 import org.apache.hadoop.hbase.client.Result;
 import org.apache.hadoop.hbase.client.ResultScanner;
 import org.apache.hadoop.hbase.client.Scan;
+import org.apache.hadoop.hbase.coprocessor.CoprocessorHost;
 import org.apache.hadoop.hbase.coprocessor.CoprocessorService;
 import org.apache.hadoop.hbase.coprocessor.MasterCoprocessorEnvironment;
 import org.apache.hadoop.hbase.coprocessor.ObserverContext;
@@ -157,6 +158,17 @@ public class TestAccessController extends SecureTestUtil {
   private static RegionServerCoprocessorEnvironment RSCP_ENV;
   private RegionCoprocessorEnvironment RCP_ENV;
 
+  static void verifyConfiguration(Configuration conf) {
+    if (!conf.get(CoprocessorHost.MASTER_COPROCESSOR_CONF_KEY)
+            .contains(AccessController.class.getName())
+        && conf.get(CoprocessorHost.REGION_COPROCESSOR_CONF_KEY)
+            .contains(AccessController.class.getName())
+        && conf.get(CoprocessorHost.REGIONSERVER_COPROCESSOR_CONF_KEY)
+            .contains(AccessController.class.getName())) {
+      throw new RuntimeException("AccessController is missing from a system cop
+    }
+  }
+
   @BeforeClass
   public static void setupBeforeClass() throws Exception {
     // setup configuration
@@ -168,6 +180,9 @@ public class TestAccessController extends SecureTestUtil {
       "org.apache.hadoop.hbase.master.snapshot.SnapshotLogCleaner");
     // Enable security
     SecureTestUtil.enableSecurity(conf);
+    // Verify enableSecurity sets up what we require
+    verifyConfiguration(conf);
+
     // Enable EXEC permission checking
     conf.setBoolean(AccessController.EXEC_PERMISSION_CHECKS_KEY, true);
{noformat}


> Region server fails to start with AccessController coprocessor if installed into RegionServerCoprocessorHost
> ------------------------------------------------------------------------------------------------------------
>
>                 Key: HBASE-10338
>                 URL: https://issues.apache.org/jira/browse/HBASE-10338
>             Project: HBase
>          Issue Type: Bug
>          Components: Coprocessors, regionserver
>    Affects Versions: 0.98.0
>            Reporter: Vandana Ayyalasomayajula
>            Assignee: Vandana Ayyalasomayajula
>            Priority: Minor
>             Fix For: 0.98.0, 0.99.0
>
>         Attachments: HBASE-10338.0.patch
>
>
> Runtime exception is being thrown when AccessController CP is used with region server.
This is happening as region server co processor host is created before zookeeper is initialized
in region server.



--
This message was sent by Atlassian JIRA
(v6.1.5#6160)

Mime
View raw message