You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ambari.apache.org by "saurabh (JIRA)" <ji...@apache.org> on 2015/06/27 01:37:04 UTC

[jira] [Commented] (AMBARI-7562) Provide ability to change hostname with Ambari

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

saurabh commented on AMBARI-7562:
---------------------------------

[~afernandez][~sposetti][~mahadev]
Hi, can you please help me validate my understanding of the issue and also validate the solution proposed here:

Understanding of the problem:
# Currently every time ambari agent starts up, it registers with ambari server, using the REST API call.
# Amabri server identifies the agent from the hostname that it receives the in request body
# If the hostname changes ambari server still accepts the registration request but its not able to associate that request with any existing host as its not able to match hostname. So it creates a new entry in ambari.hosts table for this registration.
# Ambari server marks old host with missing heartbeat alert.
# We need a way for ambari-server to be able to associate request from the existing host, even if the hostname has changed.

Proposed Solution:
# We add a “Change hostname” option to the ambari server, may be under ‘Host Action’ button. Here user can specify new hostname for the particular host.
# Ambari agent when starting up for the first time, generates a GUID and adds it to ambari-agent.ini, agent section.
# Ambari agent on every register call to server (every time the process starts), passes this GUID in the data/body.
# Ambari server on the register call, matches the hostname and the GUID in its table to uniquely identify the host 
# With this, now every time hostname changes:
## User/admin is supposed to modify the hostname through Ambari server so that it gets updated in the database
## When agent starts with this updated hostname, it still sends the same GUID with updated hostname in the registration call to the server.
## Ambari-server from the updated hostname in its database, and from the same old GUID received the in the request is able to uniquely identify the host.


> Provide ability to change hostname with Ambari
> ----------------------------------------------
>
>                 Key: AMBARI-7562
>                 URL: https://issues.apache.org/jira/browse/AMBARI-7562
>             Project: Ambari
>          Issue Type: Improvement
>          Components: ambari-server
>    Affects Versions: 1.6.1
>            Reporter: Alejandro Fernandez
>
> There are several issues associated with hosts.
> - Uniquely identify a host. MAC address, IP are not sufficient. Perhaps store a file so that even if the hostname changes on the same physical machine, the rename can be auto-detected.
> - Ability to rename: requires using FK from an primary ID that is not the hostname, will require DB schema changes. When a host is readded, need to consider what happens if the OS or environment changes.
> - Properly delete a host (determine if we do hard-deletes that cascade across all of the log records, or soft-deletes so that the hosts persist but not in the cluster)
> Expose ability (capability, steps and/or utility) to change hostnames in Ambari, to avoid users having to:
> a) remove hosts and re-add, or
> b) having to dump the database and adjust directly
> Note: any utility cannot expect a SQL client. It needs to assume there is no database client available to the user.



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