Renaming a Node from the Command-Line

Provides distribution-specific instructions for renaming a node.

Procedure

ATTENTION Ensure that the host name you set is resolvable. Add the host name to the /etc/hosts file. For example: 10.10.19.22 host.qa.net. MapR installation and commands fail if the host name is not resolvable.
To rename a node:
  1. Stop Warden on the node. Example:
    service mapr-warden stop
  2. If the node is a ZooKeeper node, stop ZooKeeper on the node. Example:
    service mapr-zookeeper stop
  3. Rename the host:
    • Red Hat 6.x and CentOS 6.x: To preserve the new host name after reboot, edit the HOSTNAME parameter in the /etc/sysconfig/network file and restart the xinetd service or reboot the node. To change the host name temporarily without a reboot, run:
      hostname desired-host-name
    • Red Hat 7.x and CentOS 7.x: Run the command:
      hostnamectl set-hostname desired-host-name --static
      Alternatively, enter the host name in the /etc/hostname file, and run:
      hostname -F /etc/hostname
      Both these methods preserve the host name across reboots.
    • On Ubuntu, first install dbus if it is not installed.
      apt-get install dbus
      Next, run the command:
      hostnamectl set-hostname desired-host-name --static
      Alternatively, edit the host name in the /etc/hostname file, and run:
      hostname -F /etc/hostname
      Both these methods preserve the host name across reboots.
  4. If the node is a ZooKeeper node or a CLDB node, run configure.sh with a list of CLDB and ZooKeeper nodes.
  5. If the node is a ZooKeeper node, start ZooKeeper on the node. Run:
    service mapr-zookeeper start
  6. Start Warden on the node. Run:
    service mapr-warden start

What to do next

After you rename a:
  • CLDB or ZooKeeper node, run configure.sh on all the nodes with the new host name, to update the mapr-clusters.conf file with the new host name. Ensure that there are no duplicate entries in the file. Also, verify that the new host is accessible from all the nodes.
  • Node, some local volumes (such as for audit, and metrics) may exist with both the old and new host names. If you want, you can remove the local volumes with the old host name, use the existing local volume path, or remount to the new path.