You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by ad...@apache.org on 2017/02/24 09:24:59 UTC

[1/2] ambari git commit: AMBARI-20140. Adding spark2 to a kerberized cluster with spark1 fails with keytab file does not exist error (Attila Magyar via adoroszlai)

Repository: ambari
Updated Branches:
  refs/heads/branch-2.5 6d872ad31 -> e1a354b7d
  refs/heads/trunk 19da5823c -> daf876665


AMBARI-20140. Adding spark2 to a kerberized cluster with spark1 fails with keytab file does not exist error (Attila Magyar via adoroszlai)


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

Branch: refs/heads/branch-2.5
Commit: e1a354b7d912263593c0b8ff406eb230bae4d2f0
Parents: 6d872ad
Author: Attila Magyar <am...@hortonworks.com>
Authored: Fri Feb 24 10:23:27 2017 +0100
Committer: Attila Doroszlai <ad...@hortonworks.com>
Committed: Fri Feb 24 10:23:56 2017 +0100

----------------------------------------------------------------------
 .../serveraction/kerberos/CreateKeytabFilesServerAction.java     | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/e1a354b7/ambari-server/src/main/java/org/apache/ambari/server/serveraction/kerberos/CreateKeytabFilesServerAction.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/serveraction/kerberos/CreateKeytabFilesServerAction.java b/ambari-server/src/main/java/org/apache/ambari/server/serveraction/kerberos/CreateKeytabFilesServerAction.java
index 54de123..2d21752 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/serveraction/kerberos/CreateKeytabFilesServerAction.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/serveraction/kerberos/CreateKeytabFilesServerAction.java
@@ -217,8 +217,8 @@ public class CreateKeytabFilesServerAction extends KerberosServerAction {
               }
 
               if (password == null) {
-                if (hostName.equalsIgnoreCase(KerberosHelper.AMBARI_SERVER_HOST_NAME) || kerberosPrincipalHostDAO
-                  .exists(evaluatedPrincipal, hostEntity.getHostId())) {
+                if (hostName.equalsIgnoreCase(KerberosHelper.AMBARI_SERVER_HOST_NAME)
+                  || (kerberosPrincipalHostDAO.exists(evaluatedPrincipal, hostEntity.getHostId()) && destinationKeytabFile.exists())) { // same principal can have multiple keytabs, therefore checking if keytab file exists
                   // There is nothing to do for this since it must already exist and we don't want to
                   // regenerate the keytab
                   message = String.format("Skipping keytab file for %s, missing password indicates nothing to do", evaluatedPrincipal);


[2/2] ambari git commit: AMBARI-20140. Adding spark2 to a kerberized cluster with spark1 fails with keytab file does not exist error (Attila Magyar via adoroszlai)

Posted by ad...@apache.org.
AMBARI-20140. Adding spark2 to a kerberized cluster with spark1 fails with keytab file does not exist error (Attila Magyar via adoroszlai)


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

Branch: refs/heads/trunk
Commit: daf876665a57966d58c1ed6aa0f53b14a81265c6
Parents: 19da582
Author: Attila Magyar <am...@hortonworks.com>
Authored: Fri Feb 24 10:23:27 2017 +0100
Committer: Attila Doroszlai <ad...@hortonworks.com>
Committed: Fri Feb 24 10:24:08 2017 +0100

----------------------------------------------------------------------
 .../serveraction/kerberos/CreateKeytabFilesServerAction.java     | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/daf87666/ambari-server/src/main/java/org/apache/ambari/server/serveraction/kerberos/CreateKeytabFilesServerAction.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/serveraction/kerberos/CreateKeytabFilesServerAction.java b/ambari-server/src/main/java/org/apache/ambari/server/serveraction/kerberos/CreateKeytabFilesServerAction.java
index 5d6ccc0..b968383 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/serveraction/kerberos/CreateKeytabFilesServerAction.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/serveraction/kerberos/CreateKeytabFilesServerAction.java
@@ -218,8 +218,8 @@ public class CreateKeytabFilesServerAction extends KerberosServerAction {
               }
 
               if (password == null) {
-                if (hostName.equalsIgnoreCase(KerberosHelper.AMBARI_SERVER_HOST_NAME) || kerberosPrincipalHostDAO
-                  .exists(evaluatedPrincipal, hostEntity.getHostId())) {
+                if (hostName.equalsIgnoreCase(KerberosHelper.AMBARI_SERVER_HOST_NAME)
+                  || (kerberosPrincipalHostDAO.exists(evaluatedPrincipal, hostEntity.getHostId()) && destinationKeytabFile.exists())) { // same principal can have multiple keytabs, therefore checking if keytab file exists
                   // There is nothing to do for this since it must already exist and we don't want to
                   // regenerate the keytab
                   message = String.format("Skipping keytab file for %s, missing password indicates nothing to do", evaluatedPrincipal);