[Pacemaker] /etc/hosts

Tim Serong tserong at novell.com
Tue Sep 28 11:37:25 UTC 2010


On 9/28/2010 at 07:29 PM, Andrew Beekhof <andrew at beekhof.net> wrote: 
> On Tue, Sep 28, 2010 at 6:05 AM, Mark Horton <mark at nostromo.net> wrote: 
> > Hello, 
> > I was wondering what side effects occur if you don't add all the 
> > cluster nodes to the /etc/hosts file on each node? 
> > 
> > I'd also be interested in hearing how others keep the hosts file in 
> > sync.  For example, lets say you have 3 nodes, and 1 node is currently 
> > down.  Then you add a 4th node, but you can't update the hosts file of 
> > the down node.  So you must remember to do it when it comes back up. 
> > I was trying to see if there was an automated way to keep them in sync 
> > in case we forget to update the hosts file on the down node. 
>  
> Pacemaker doesn't care, but your messaging layer (corosync or heartbeat)  
> might. 
> If the node that is down has no other way to find out the address of 
> the new node, and the cluster is configured to start automatically 
> when the machine boots, then you might have a problem. 

You might find csync2[1] useful.  You can use this to synchronize config
files across a cluster.  Assuming you've configured it to sync /etc/hosts,
any time you edit /etc/hosts on one node, run "csync2 -x" and it will
magically sync the changes out to the other nodes in your cluster.  It's
a smart manual push mechanism, not something that runs continuously in
the background, but it's a hell of a lot better than scp and having to
remember where to copy what to, and when :)

<shameless-plug>
There's a little section on csync2 in the SLE HAE Guide under
"Transferring the Configuration to All Nodes" at:
http://www.novell.com/documentation/sle_ha/book_sleha/?page=/documentation/sle_ha/book_sleha/data/sec_ha_installation_setup.html
</shameless-plug>

HTH

Tim

[1] http://oss.linbit.com/csync2/


-- 
Tim Serong <tserong at novell.com>
Senior Clustering Engineer, OPS Engineering, Novell Inc.







More information about the Pacemaker mailing list