[Pacemaker] /etc/hosts

Mark Horton mark at nostromo.net
Wed Sep 29 23:12:48 EDT 2010


Thanks for the help.   We have a limited range of IP addresses.  What
I've decided to do is just add our range of IPs in the hosts file on
each machine.  And then name each host based on its IP.   Then as we
dynamically add nodes they will already be in the hosts file.

Mark

On Tue, Sep 28, 2010 at 8:37 AM, Tim Serong <tserong at novell.com> wrote:
> 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.
>
>
>
>
> _______________________________________________
> Pacemaker mailing list: Pacemaker at oss.clusterlabs.org
> http://oss.clusterlabs.org/mailman/listinfo/pacemaker
>
> Project Home: http://www.clusterlabs.org
> Getting started: http://www.clusterlabs.org/doc/Cluster_from_Scratch.pdf
> Bugs: http://developerbugs.linux-foundation.org/enter_bug.cgi?product=Pacemaker
>




More information about the Pacemaker mailing list