Repository: ambari
Updated Branches:
  refs/heads/trunk ac0c66e98 -> 33a573cdb


AMBARI-18448. NPE when installing secure cluster via Blueprints due to null 
logger (rlevas)


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

Branch: refs/heads/trunk
Commit: 33a573cdb54229cee37e1f49837be783de3cba7b
Parents: ac0c66e
Author: Robert Levas <rle...@hortonworks.com>
Authored: Thu Sep 22 14:48:29 2016 -0400
Committer: Robert Levas <rle...@hortonworks.com>
Committed: Thu Sep 22 14:48:29 2016 -0400

----------------------------------------------------------------------
 .../kerberos/ConfigureAmbariIdentitiesServerAction.java      | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/33a573cd/ambari-server/src/main/java/org/apache/ambari/server/serveraction/kerberos/ConfigureAmbariIdentitiesServerAction.java
----------------------------------------------------------------------
diff --git 
a/ambari-server/src/main/java/org/apache/ambari/server/serveraction/kerberos/ConfigureAmbariIdentitiesServerAction.java
 
b/ambari-server/src/main/java/org/apache/ambari/server/serveraction/kerberos/ConfigureAmbariIdentitiesServerAction.java
index 9c2c622..10647e8 100644
--- 
a/ambari-server/src/main/java/org/apache/ambari/server/serveraction/kerberos/ConfigureAmbariIdentitiesServerAction.java
+++ 
b/ambari-server/src/main/java/org/apache/ambari/server/serveraction/kerberos/ConfigureAmbariIdentitiesServerAction.java
@@ -184,12 +184,16 @@ public class ConfigureAmbariIdentitiesServerAction 
extends KerberosServerAction
                   "  This is not an error if an Ambari agent is not installed 
on the Ambari server host.",
               principal, ambariServerHostName);
           LOG.warn(message);
-          actionLog.writeStdErr(message);
+          if(actionLog != null) {
+            actionLog.writeStdErr(message);
+          }
         } else if (!kerberosPrincipalHostDAO.exists(principal, 
ambariServerHostID)) {
           kerberosPrincipalHostDAO.create(principal, ambariServerHostID);
         }
 
-        actionLog.writeStdOut(String.format("Created Ambari server keytab file 
for %s at %s", principal, destKeytabFile));
+        if(actionLog != null) {
+          actionLog.writeStdOut(String.format("Created Ambari server keytab 
file for %s at %s", principal, destKeytabFile));
+        }
       }
     } catch (InterruptedException | IOException e) {
       throw new AmbariException(e.getLocalizedMessage(), e);

Reply via email to