[ 
https://issues.apache.org/jira/browse/AMBARI-13507?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Jeff Sposetti updated AMBARI-13507:
-----------------------------------
    Description: 
1) If security enabled. Please, disable it, using UI/Admin/Kerberos/Disable 
Kerberos button.
2) Stop all pending commands/jobs.
3) Stop all services.
4) Backup ambari db.
5) Stop ambari-server and ambari-agents.
6) Create *.json file with host names changes. Example: host_names_changes.json
{code}
{
  "cluster1" : {
      "c6400.ambari.apache.org" : "c6410.ambari.apache.org",
      "c6401.ambari.apache.org" : "c6411.ambari.apache.org"
  }
  ...................
  ...................
}
{code}
where:
- *cluster1* is cluster name.
- *"c6400.ambari.apache.org" : "c6410.ambari.apache.org"* are host names pair 
means ( "current_host_name" : "new_host_name" ).
Also you can add to file more then one cluster.
7) Execute this command on server host:
{code}
ambari-server update-host-names /host_names_changes.json
{code}
8) After successful end of this action, please update host names for all nodes, 
according to changes that you added to *.json file.
9) If host name was changed for node with ambari-server, then you should update 
it for every ambari-agent in /etc/ambari-agent/conf/ambari-agent.ini, field 
"hostname" for server.
10) Start ambari-server and ambari-agents.
11) Start services.   

  was:
At a high-level we may follow this approach:
Ensure cluster is not kerberized
Assume all services to be stopped (add a check to ensure that services are 
stopped)
We may also need to check and confirm that there are no commands pending 
execution - or just mark them as aborted
Update all host names in the database based on the mapping provided (e.g. host1 
--> master01.dev.com)
As SQLClient cannot be assumed consider using jdbc - similar to the Upgrade code
Modify all configs to replace the hostnames as needed (not sure if plain search 
and replace will suffice)
Agents need to be re-configured if ambari-server hostname changes


> Create a script to change host names for a stopped cluster
> ----------------------------------------------------------
>
>                 Key: AMBARI-13507
>                 URL: https://issues.apache.org/jira/browse/AMBARI-13507
>             Project: Ambari
>          Issue Type: Task
>          Components: ambari-server
>    Affects Versions: 2.1.3
>            Reporter: Vitaly Brodetskyi
>            Assignee: Vitaly Brodetskyi
>            Priority: Critical
>             Fix For: 2.1.3
>
>         Attachments: AMBARI-13507.patch
>
>
> 1) If security enabled. Please, disable it, using UI/Admin/Kerberos/Disable 
> Kerberos button.
> 2) Stop all pending commands/jobs.
> 3) Stop all services.
> 4) Backup ambari db.
> 5) Stop ambari-server and ambari-agents.
> 6) Create *.json file with host names changes. Example: 
> host_names_changes.json
> {code}
> {
>   "cluster1" : {
>       "c6400.ambari.apache.org" : "c6410.ambari.apache.org",
>       "c6401.ambari.apache.org" : "c6411.ambari.apache.org"
>   }
>   ...................
>   ...................
> }
> {code}
> where:
> - *cluster1* is cluster name.
> - *"c6400.ambari.apache.org" : "c6410.ambari.apache.org"* are host names pair 
> means ( "current_host_name" : "new_host_name" ).
> Also you can add to file more then one cluster.
> 7) Execute this command on server host:
> {code}
> ambari-server update-host-names /host_names_changes.json
> {code}
> 8) After successful end of this action, please update host names for all 
> nodes, according to changes that you added to *.json file.
> 9) If host name was changed for node with ambari-server, then you should 
> update it for every ambari-agent in /etc/ambari-agent/conf/ambari-agent.ini, 
> field "hostname" for server.
> 10) Start ambari-server and ambari-agents.
> 11) Start services.   



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

Reply via email to