accumulo-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From els...@apache.org
Subject [1/6] accumulo git commit: ACCUMULO-3750 Exit the Master if NoAuthException
Date Mon, 27 Apr 2015 21:58:58 GMT
Repository: accumulo
Updated Branches:
  refs/heads/1.6 0bcbab7d6 -> bc87145ad
  refs/heads/1.7 4fa8a8fb2 -> 66075c3ea
  refs/heads/master 0f0a519f5 -> cf0bcb3fb


ACCUMULO-3750 Exit the Master if NoAuthException

If the Master gets a NoAuthException trying to get its
lock, there's a configuration issue. Bail out immediately.


Project: http://git-wip-us.apache.org/repos/asf/accumulo/repo
Commit: http://git-wip-us.apache.org/repos/asf/accumulo/commit/bc87145a
Tree: http://git-wip-us.apache.org/repos/asf/accumulo/tree/bc87145a
Diff: http://git-wip-us.apache.org/repos/asf/accumulo/diff/bc87145a

Branch: refs/heads/1.6
Commit: bc87145ad54ac9912ce8bb878e231ef8dd7bad6a
Parents: 0bcbab7
Author: Josh Elser <elserj@apache.org>
Authored: Mon Apr 27 17:52:06 2015 -0400
Committer: Josh Elser <elserj@apache.org>
Committed: Mon Apr 27 17:53:24 2015 -0400

----------------------------------------------------------------------
 .../src/main/java/org/apache/accumulo/master/Master.java      | 7 +++++++
 1 file changed, 7 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/accumulo/blob/bc87145a/server/master/src/main/java/org/apache/accumulo/master/Master.java
----------------------------------------------------------------------
diff --git a/server/master/src/main/java/org/apache/accumulo/master/Master.java b/server/master/src/main/java/org/apache/accumulo/master/Master.java
index 5a96abc..b3d2ac5 100644
--- a/server/master/src/main/java/org/apache/accumulo/master/Master.java
+++ b/server/master/src/main/java/org/apache/accumulo/master/Master.java
@@ -129,6 +129,7 @@ import org.apache.thrift.TException;
 import org.apache.thrift.server.TServer;
 import org.apache.thrift.transport.TTransportException;
 import org.apache.zookeeper.KeeperException;
+import org.apache.zookeeper.KeeperException.NoAuthException;
 import org.apache.zookeeper.WatchedEvent;
 import org.apache.zookeeper.Watcher;
 import org.apache.zookeeper.data.Stat;
@@ -1104,6 +1105,12 @@ public class Master implements LiveTServerSet.Listener, TableObserver,
CurrentSt
     public synchronized void failedToAcquireLock(Exception e) {
       log.warn("Failed to get master lock " + e);
 
+      if (e instanceof NoAuthException) {
+        String msg = "Failed to acquire master lock due to incorrect ZooKeeper authentication.";
+        log.error(msg + " Ensure instance.secret is consistent across Accumulo configuration",
e);
+        Halt.halt(msg, -1);
+      }
+
       if (acquiredLock) {
         Halt.halt("Zoolock in unexpected state FAL " + acquiredLock + " " + failedToAcquireLock,
-1);
       }


Mime
View raw message