ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From amag...@apache.org
Subject ambari git commit: AMBARI-22145. Secure cluster deploy failing with "While building the CHECK_KEYTABS custom command for KERBEROS/KERBEROS_CLIENT, there were no healthy eligible hosts" (amagyar)
Date Thu, 05 Oct 2017 15:20:31 GMT
Repository: ambari
Updated Branches:
  refs/heads/trunk 2512dc83c -> ed378b764


AMBARI-22145. Secure cluster deploy failing with "While building the CHECK_KEYTABS custom
command for KERBEROS/KERBEROS_CLIENT, there were no healthy eligible hosts" (amagyar)


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

Branch: refs/heads/trunk
Commit: ed378b76498e17d752353153b2596bbb0eb810d9
Parents: 2512dc8
Author: Attila Magyar <amagyar@hortonworks.com>
Authored: Thu Oct 5 17:19:31 2017 +0200
Committer: Attila Magyar <amagyar@hortonworks.com>
Committed: Thu Oct 5 17:19:31 2017 +0200

----------------------------------------------------------------------
 .../server/controller/KerberosHelperImpl.java       | 16 +++++++++-------
 1 file changed, 9 insertions(+), 7 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/ed378b76/ambari-server/src/main/java/org/apache/ambari/server/controller/KerberosHelperImpl.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/controller/KerberosHelperImpl.java
b/ambari-server/src/main/java/org/apache/ambari/server/controller/KerberosHelperImpl.java
index 67b08fd..b691968 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/controller/KerberosHelperImpl.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/controller/KerberosHelperImpl.java
@@ -3433,18 +3433,20 @@ public class KerberosHelperImpl implements KerberosHelper {
       Collection<ServiceComponentHost> filteredComponents = filterServiceComponentHostsForHosts(
           new ArrayList<>(serviceComponentHosts), getHostsWithValidKerberosClient(cluster));
 
-      List<String> hostsToUpdate = createUniqueHostList(filteredComponents, Collections.singleton(HostState.HEALTHY));
-      Map<String, String> requestParams = new HashMap<>();
-      List<RequestResourceFilter> requestResourceFilters = new ArrayList<>();
-      RequestResourceFilter reqResFilter = new RequestResourceFilter(Service.Type.KERBEROS.name(),
Role.KERBEROS_CLIENT.name(), hostsToUpdate);
-      requestResourceFilters.add(reqResFilter);
+      if (!filteredComponents.isEmpty()) {
+        List<String> hostsToUpdate = createUniqueHostList(filteredComponents, Collections.singleton(HostState.HEALTHY));
+        Map<String, String> requestParams = new HashMap<>();
+        List<RequestResourceFilter> requestResourceFilters = new ArrayList<>();
+        RequestResourceFilter reqResFilter = new RequestResourceFilter(Service.Type.KERBEROS.name(),
Role.KERBEROS_CLIENT.name(), hostsToUpdate);
+        requestResourceFilters.add(reqResFilter);
 
-      ActionExecutionContext actionExecContext = new ActionExecutionContext(
+        ActionExecutionContext actionExecContext = new ActionExecutionContext(
           cluster.getClusterName(),
           CHECK_KEYTABS,
           requestResourceFilters,
           requestParams);
-      customCommandExecutionHelper.addExecutionCommandsToStage(actionExecContext, stage,
requestParams, null);
+        customCommandExecutionHelper.addExecutionCommandsToStage(actionExecContext, stage,
requestParams, null);
+      }
       RoleGraph roleGraph = roleGraphFactory.createNew(roleCommandOrder);
       roleGraph.build(stage);
 


Mime
View raw message