Repository: ambari
Updated Branches:
  refs/heads/trunk c2f35d489 -> dd218d20b


AMBARI-11022. Kerberos: Keytab files are not distributed during add host if a 
retry is necessary during installation (Emil Anca via rlevas)


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

Branch: refs/heads/trunk
Commit: dd218d20b085edb1b4fc0d04164303e0b04c4bcd
Parents: c2f35d4
Author: Emil Anca <[email protected]>
Authored: Tue May 12 10:58:27 2015 -0400
Committer: Robert Levas <[email protected]>
Committed: Tue May 12 10:58:50 2015 -0400

----------------------------------------------------------------------
 .../server/controller/AmbariManagementControllerImpl.java     | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/dd218d20/ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariManagementControllerImpl.java
----------------------------------------------------------------------
diff --git 
a/ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariManagementControllerImpl.java
 
b/ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariManagementControllerImpl.java
index bb8f088..09adf51 100644
--- 
a/ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariManagementControllerImpl.java
+++ 
b/ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariManagementControllerImpl.java
@@ -2034,11 +2034,14 @@ public class AmbariManagementControllerImpl implements 
AmbariManagementControlle
 
                   // If the state is transitioning from INIT TO INSTALLED and 
the cluster has Kerberos
                   // enabled, mark this ServiceComponentHost to see if 
anything needs to be done to
-                  // make sure it is properly configured.  The 
Kerberos-related stages needs to be
+                  // make sure it is properly configured.
+                  // If the component is transitioning from an INSTALL_FAILED 
to an INSTALLED state indicates a failure attempt on install
+                  // followed by a new installation attempt and will also need 
Kerberos related configuration addressing
+                  // The Kerberos-related stages needs to be
                   // between the INSTALLED and STARTED states because some 
services need to set up
                   // the host (i,e, create user accounts, etc...) before 
Kerberos-related tasks an
                   // occur (like distribute keytabs)
-                  if((oldSchState == State.INIT) && 
kerberosHelper.isClusterKerberosEnabled(cluster)) {
+                  if((oldSchState == State.INIT || oldSchState == 
State.INSTALL_FAILED) && kerberosHelper.isClusterKerberosEnabled(cluster)) {
                     try {
                       kerberosHelper.configureService(cluster, scHost);
                     } catch (KerberosInvalidConfigurationException e) {

Reply via email to