You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ambari.apache.org by "sam liu (JIRA)" <ji...@apache.org> on 2015/04/16 11:26:58 UTC

[jira] [Commented] (AMBARI-10515) Method stack_advisor.py#getHostsWithComponent returns wrong results

    [ https://issues.apache.org/jira/browse/AMBARI-10515?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14497823#comment-14497823 ] 

sam liu commented on AMBARI-10515:
----------------------------------

Steps to reproduce:
1. Launch Ambari server GUI and start a brand new cluster installation
2. In 'Assign Slaves and Clients' page, select two hosts(hostname0.com, hostname1.com) as the datanodes
3. After clicking Next button, I found in the ambari-server/resources/stacks/HDP/2.2/services/stack_advisor.py#HDP22StackAdvisor#recommendHDFSConfigurations, the value of datanodeHosts got by line 'datanodeHosts = self.getHostsWithComponent("HDFS", "DATANODE", services, hosts)' only includes 1 host info as below and its length is 1 not 2:
datanodeHosts= [{u'href': u'/api/v1/hosts/hostname1.com', u'Hosts': {u'last_heartbeat_time': 1429155431532, u'recovery_summary': u'DISABLED', u'host_health_report': u'', u'disk_info': [{u'available': u'83808976', u'used': u'7951800', u'percent': u'9%', u'device': u'/dev/mapper/vg_sdsvm923094-lv_root', u'mountpoint': u'/', u'type': u'ext4', u'size': u'96671468'}, {u'available': u'4031416', u'used': u'0', u'percent': u'0%', u'device': u'tmpfs', u'mountpoint': u'/dev/shm', u'type': u'tmpfs', u'size': u'4031416'}, {u'available': u'378216', u'used': u'92028', u'percent': u'20%', u'device': u'/dev/sda1', u'mountpoint': u'/boot', u'type': u'ext4', u'size': u'495844'}], u'desired_configs': None, u'cpu_count': 2, u'recovery_report': {u'component_reports': [], u'summary': u'DISABLED'}, u'host_state': u'HEALTHY', u'os_arch': u'x86_64', u'total_mem': 8062836, u'host_status': u'HEALTHY', u'last_registration_time': 1429153847302, u'os_family': u'redhat6', u'host_name': u'hostname1.com', u'ip': u'9.30.249.190', u'rack_info': u'/default-rack', u'os_type': u'redhat6', u'last_agent_env': {u'transparentHugePage': u'never', u'hostHealth': {u'agentTimeStampAtReporting': 1429155391291, u'activeJavaProcs': [], u'serverTimeStampAtReporting': 1429155391348, u'liveServices': [{u'status': u'Healthy', u'name': u'ntpd', u'desc': u''}]}, u'umask': 18, u'reverseLookup': True, u'alternatives': [], u'existingUsers': [], u'firewallName': u'iptables', u'stackFoldersAndFiles': [{u'type': u'directory', u'name': u'/etc/slider'}], u'existingRepos': [], u'installedPackages': [], u'firewallRunning': False}, u'public_host_name': u'hostname1.com', u'ph_cpu_count': 2}}]

The correct value of datanodeHosts should not only include 'hostname1.com' but also include 'hostname0.com', and the length of datanodeHosts should be 2, but not 1, because they were all selected as datanode host.

> Method stack_advisor.py#getHostsWithComponent returns wrong results
> -------------------------------------------------------------------
>
>                 Key: AMBARI-10515
>                 URL: https://issues.apache.org/jira/browse/AMBARI-10515
>             Project: Ambari
>          Issue Type: Bug
>          Components: ambari-server
>    Affects Versions: 2.0.0
>            Reporter: sam liu
>
> ambari-server/resources/stacks/HDP/2.0.6/services/stack_advisor.py#getHostsWithComponent only return the first one item back, but the correct way is to return all the items back 



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)