Revert "AMBARI-20140. Adding spark2 to a kerberized cluster with spark1 fails with keytab file does not exist error (Attila Magyar via adoroszlai)"
This reverts commit e1a354b7d912263593c0b8ff406eb230bae4d2f0. Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/3a2411a9 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/3a2411a9 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/3a2411a9 Branch: refs/heads/branch-2.5 Commit: 3a2411a9daf2769f57ecd3dedf1e2080a1571b93 Parents: df22ebc Author: Attila Doroszlai <[email protected]> Authored: Tue Feb 28 11:25:14 2017 +0100 Committer: Attila Doroszlai <[email protected]> Committed: Tue Feb 28 11:25:14 2017 +0100 ---------------------------------------------------------------------- .../serveraction/kerberos/CreateKeytabFilesServerAction.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/ambari/blob/3a2411a9/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 2d21752..54de123 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()) && destinationKeytabFile.exists())) { // same principal can have multiple keytabs, therefore checking if keytab file exists + if (hostName.equalsIgnoreCase(KerberosHelper.AMBARI_SERVER_HOST_NAME) || kerberosPrincipalHostDAO + .exists(evaluatedPrincipal, hostEntity.getHostId())) { // 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);
