You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by jl...@apache.org on 2017/10/09 06:01:26 UTC
[28/50] [abbrv] 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)
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/branch-feature-AMBARI-14714
Commit: ed378b76498e17d752353153b2596bbb0eb810d9
Parents: 2512dc8
Author: Attila Magyar <am...@hortonworks.com>
Authored: Thu Oct 5 17:19:31 2017 +0200
Committer: Attila Magyar <am...@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);