You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by ds...@apache.org on 2015/04/03 19:54:37 UTC
ambari git commit: AMBARI-10353 Error during customize services (dsen)
Repository: ambari
Updated Branches:
refs/heads/trunk 6b5ef474b -> ebe3c659a
AMBARI-10353 Error during customize services (dsen)
Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/ebe3c659
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/ebe3c659
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/ebe3c659
Branch: refs/heads/trunk
Commit: ebe3c659ad77afcecbb0ae349672a09ca7e7c8a6
Parents: 6b5ef47
Author: Dmytro Sen <ds...@apache.org>
Authored: Fri Apr 3 20:53:56 2015 +0300
Committer: Dmytro Sen <ds...@apache.org>
Committed: Fri Apr 3 20:54:16 2015 +0300
----------------------------------------------------------------------
.../main/resources/stacks/HDP/2.0.6/services/stack_advisor.py | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ambari/blob/ebe3c659/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/stack_advisor.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/stack_advisor.py b/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/stack_advisor.py
index b2610ad..6f7e9bb 100644
--- a/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/stack_advisor.py
+++ b/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/stack_advisor.py
@@ -210,9 +210,9 @@ class HDP206StackAdvisor(DefaultStackAdvisor):
def getHostWithComponent(self, serviceName, componentName, services, hosts):
- if services is not None and hosts is not None:
+ if services is not None and hosts is not None and serviceName in [service["StackServices"]["service_name"] for service in services["services"]]:
service = [serviceEntry for serviceEntry in services["services"] if serviceEntry["StackServices"]["service_name"] == serviceName][0]
- components = [componentEntry for componentEntry in service["components"] if componentEntry["StackServiceComponents"]["component_name"] == "NODEMANAGER"]
+ components = [componentEntry for componentEntry in service["components"] if componentEntry["StackServiceComponents"]["component_name"] == componentName]
if (len(components) > 0 and len(components[0]["StackServiceComponents"]["hostnames"]) > 0):
# NodeManager available - determine hosts and memory
componentHostname = components[0]["StackServiceComponents"]["hostnames"][0]