Repository: ambari
Updated Branches:
  refs/heads/branch-2.5 c4412d139 -> 3b384502a


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/3b384502
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/3b384502
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/3b384502

Branch: refs/heads/branch-2.5
Commit: 3b384502a889c267e7bc29096f01e9633b033b45
Parents: c4412d1
Author: Robert Levas <rle...@hortonworks.com>
Authored: Thu Sep 22 14:49:07 2016 -0400
Committer: Robert Levas <rle...@hortonworks.com>
Committed: Thu Sep 22 14:49:07 2016 -0400

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


http://git-wip-us.apache.org/repos/asf/ambari/blob/3b384502/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