OK, looks like the first option will work for now.

Thanks.
Brian

> On Dec 18, 2015, at 9:44 AM, Sumit Mohanty <[email protected]> wrote:
> 
> Brian,
> 
> one way is to follow the steps here to make agents use the original hostname 
> - 
> http://docs.hortonworks.com/HDPDocuments/Ambari-2.1.2.0/bk_ambari_reference_guide/content/_how_to_customize_the_name_of_a_host.html
>  
> <http://docs.hortonworks.com/HDPDocuments/Ambari-2.1.2.0/bk_ambari_reference_guide/content/_how_to_customize_the_name_of_a_host.html>
> 
> https://issues.apache.org/jira/browse/AMBARI-13507 
> <https://issues.apache.org/jira/browse/AMBARI-13507>​ introduced a script to 
> change the host name but its developed against the latest version to be 
> released. It will give you an idea as to how to modify the DB to make Ambari 
> use the new hostnames.
> 
> -Sumit
> From: Brian Jeltema <[email protected]>
> Sent: Friday, December 18, 2015 6:10 AM
> To: [email protected]
> Cc: Tommy McNeese; Ben Gunter
> Subject: Re: duplicate host cleanup
>  
> Going back to the original name is undesirable. What other options do I have?
> 
> Brian
> 
>> On Dec 18, 2015, at 8:56 AM, Sumit Mohanty <[email protected] 
>> <mailto:[email protected]>> wrote:
>> 
>> Hi Brian,
>> 
>> When the cluster was deployed (i.e. host components got added) the hostname 
>> used should be the same that the agents always need to register with.
>> 
>> Say "old.host.com <http://old.host.com/>" is what the host registered 
>> earlier and later it switches to "new.host.com <http://new.host.com/>" then 
>> Ambari interprets it as:
>> * old.host.com <http://old.host.com/> is unavailable
>> * new.host.com <http://new.host.com/> is a new host that has joined
>> 
>> What you need to do is to make the hosts register with the original name. 
>> Afterwards you can DELETE the host entries with the new name. (curl -u 
>> admin:admin -H "X-Requested-By: ambari" -i -X DELETE 
>> http://AMBARI_SERVER_HOST:8080/api/v1/clusters/c1/hosts/n 
>> <http://ambari_server_host:8080/api/v1/clusters/c1/hosts/HOSTNAME>ew.host.name)
>> 
>> If the above is not doable for some reason, reply back on the thread and 
>> there are a few more options that we can consider.
>> 
>> -Sumit
>> From: Brian Jeltema <[email protected] <mailto:[email protected]>>
>> Sent: Friday, December 18, 2015 5:15 AM
>> To: [email protected] <mailto:[email protected]>
>> Cc: Tommy McNeese; Ben Gunter
>> Subject: duplicate host cleanup
>>  
>> I just upgraded to Ambari 2.0 on a cluster and ran into a problem with 
>> duplicate host definitions.
>> Somehow, some of the cluster nodes were registered twice with different 
>> FQDNs:
>> 
>>     node1.mycompany.com <http://node1.mycompany.com/>
>>     node1.foo.mycompany.com <http://node1.foo.mycompany.com/>
>> 
>> The correct name is the first one, but if I look at that host in the Ambari 
>> Host page,
>> the summary section is showing the second one. It appears this is causing 
>> the Ambari server
>> to fail to detected the heartbeat. 
>> 
>> How can I clean this up?
>> 
>> Brian
> 
> 

Reply via email to