Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 06A132007D0 for ; Tue, 10 May 2016 20:14:47 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 0460B160A12; Tue, 10 May 2016 18:14:47 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 4E0E216098A for ; Tue, 10 May 2016 20:14:46 +0200 (CEST) Received: (qmail 52699 invoked by uid 500); 10 May 2016 18:13:21 -0000 Mailing-List: contact issues-help@ambari.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@ambari.apache.org Delivered-To: mailing list issues@ambari.apache.org Received: (qmail 52683 invoked by uid 99); 10 May 2016 18:13:21 -0000 Received: from arcas.apache.org (HELO arcas) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 10 May 2016 18:13:21 +0000 Received: from arcas.apache.org (localhost [127.0.0.1]) by arcas (Postfix) with ESMTP id DA6442C1F60 for ; Tue, 10 May 2016 18:13:12 +0000 (UTC) Date: Tue, 10 May 2016 18:13:12 +0000 (UTC) From: "Lav Jain (JIRA)" To: issues@ambari.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (AMBARI-16378) stackadvisor uses getHostsForSlaveComponent with wrong parameter name MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Tue, 10 May 2016 18:14:47 -0000 [ 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)