makeclusterhost utilty

The makeclusterhost utility in the downloads section generates a host file from DNS.  This is useful on cluster nodes so issues with DNS does not cause issues on the cluster.

The output is sent to stdout and can be redirected to a file.

Options:
-d, –dnsdomain Set the DNS domain to use
-b, –basename Set the base of the server (hostname without the node number at the end)
-s, –static Add static address line, format: ipaddr hostname.domain hostname
-h, –help Print this useful help screen

Examples:
makeclusterhost.py > /etc/hosts –dnsdomain foo.com –basename server –static “192.168.10.3 virtualcenter.foo.com virtualcenter” –static “192.168.10.4 statichost”

The /etc/host file contains the following:
# This file generated by makeclusterhost.py
# Do not edit, changes will be overwritten
127.0.0.1 localhost.foo.com localhost

#Static IP addresses (from command line)
192.168.10.3 virtualcenter.foo.com virtualcenter
192.168.10.4 statichost

# Cluster IP addresses found in DNS
192.168.10.11 server01.foo.com server01
192.168.0.12 server02.foo.com server02

It can be downloaded here