knox-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From lmc...@apache.org
Subject git commit: KNOX-362 - logging of startup failure due to missing master secret and inability to prompt for one
Date Fri, 02 May 2014 16:28:13 GMT
Repository: knox
Updated Branches:
  refs/heads/master e5cb26aef -> 1ffd116ae


KNOX-362 - logging of startup failure due to missing master secret and inability to prompt
for one

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

Branch: refs/heads/master
Commit: 1ffd116ae71db127feded8dc9cd3e57fc3652a88
Parents: e5cb26a
Author: Larry McCay <lmccay@hortonworks.com>
Authored: Fri May 2 12:27:59 2014 -0400
Committer: Larry McCay <lmccay@hortonworks.com>
Committed: Fri May 2 12:27:59 2014 -0400

----------------------------------------------------------------------
 .../org/apache/hadoop/gateway/i18n/GatewaySpiMessages.java     | 2 ++
 .../gateway/services/security/impl/CMFMasterService.java       | 6 ++++--
 2 files changed, 6 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/knox/blob/1ffd116a/gateway-spi/src/main/java/org/apache/hadoop/gateway/i18n/GatewaySpiMessages.java
----------------------------------------------------------------------
diff --git a/gateway-spi/src/main/java/org/apache/hadoop/gateway/i18n/GatewaySpiMessages.java
b/gateway-spi/src/main/java/org/apache/hadoop/gateway/i18n/GatewaySpiMessages.java
index 669afd7..ac6483a 100644
--- a/gateway-spi/src/main/java/org/apache/hadoop/gateway/i18n/GatewaySpiMessages.java
+++ b/gateway-spi/src/main/java/org/apache/hadoop/gateway/i18n/GatewaySpiMessages.java
@@ -73,4 +73,6 @@ public interface GatewaySpiMessages {
   @Message( level = MessageLevel.DEBUG, text = "MASTER SERVICE == NULL: {0}" )
   void printMasterServiceIsNull( boolean masterServiceIsNull );
 
+  @Message( level = MessageLevel.ERROR, text = "Gateway has failed to start. Unable to prompt
user for master secret setup. Please consider using knoxcli.sh create-master" )
+  void unableToPromptForMasterUseKnoxCLI();
 }

http://git-wip-us.apache.org/repos/asf/knox/blob/1ffd116a/gateway-spi/src/main/java/org/apache/hadoop/gateway/services/security/impl/CMFMasterService.java
----------------------------------------------------------------------
diff --git a/gateway-spi/src/main/java/org/apache/hadoop/gateway/services/security/impl/CMFMasterService.java
b/gateway-spi/src/main/java/org/apache/hadoop/gateway/services/security/impl/CMFMasterService.java
index 37e702b..97abb3c 100644
--- a/gateway-spi/src/main/java/org/apache/hadoop/gateway/services/security/impl/CMFMasterService.java
+++ b/gateway-spi/src/main/java/org/apache/hadoop/gateway/services/security/impl/CMFMasterService.java
@@ -78,8 +78,9 @@ public class CMFMasterService {
   protected void promptUser() {
     Console c = System.console();
     if (c == null) {
-        System.err.println("No console.");
-        System.exit(1);
+      LOG.unableToPromptForMasterUseKnoxCLI();
+      System.err.println("No console.");
+      System.exit(1);
     }
   
     boolean noMatch;
@@ -100,6 +101,7 @@ public class CMFMasterService {
   protected void displayWarning(boolean persisting) {
     Console c = System.console();
     if (c == null) {
+        LOG.unableToPromptForMasterUseKnoxCLI();
         System.err.println("No console.");
         System.exit(1);
     }


Mime
View raw message