You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ambari.apache.org by "Lav Jain (JIRA)" <ji...@apache.org> on 2016/05/10 18:13:12 UTC
[jira] [Commented] (AMBARI-16378) stackadvisor uses
getHostsForSlaveComponent with wrong parameter name
[ https://issues.apache.org/jira/browse/AMBARI-16378?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15278607#comment-15278607 ]
Lav Jain commented on AMBARI-16378:
-----------------------------------
Excellent [~sumitmohanty]. Thanks for the commit!
> stackadvisor uses getHostsForSlaveComponent with wrong parameter name
> ---------------------------------------------------------------------
>
> Key: AMBARI-16378
> URL: https://issues.apache.org/jira/browse/AMBARI-16378
> Project: Ambari
> Issue Type: Bug
> Components: ambari-server
> Affects Versions: trunk
> Reporter: Lav Jain
> Assignee: Lav Jain
> Fix For: trunk
>
> Attachments: AMBARI-16378.patch
>
>
> {code}
> def getHostsForSlaveComponent(self, services, hosts, component, hostsList, hostsComponentsMap, freeHosts):
> componentName = component["StackServiceComponents"]["component_name"]
> if component["StackServiceComponents"]["cardinality"] == "ALL":
> return hostsList
> componentIsPopulated = self.isComponentHostsPopulated(component)
> if componentIsPopulated:
> return component["StackServiceComponents"]["hostnames"]
> hostsForComponent = []
> if self.isSlaveComponent(component):
> cardinality = str(component["StackServiceComponents"]["cardinality"])
> if self.isComponentUsingCardinalityForLayout(component) and cardinality:
> # cardinality types: 1+, 1-2, 1
> {code}
> The correct parameter name is comonentName (instead of component)
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)