[Linux-HA] /etc/hosts VS node directive in ha.cf

Pavlos Parissis pavlos.parissis at gmail.com
Fri Oct 1 00:45:58 MDT 2010


It was mentioned in this thread [1] that Heartbeat does care about the
content of /etc/hosts file.
That statement triggered me because in my setup the /etc/hosts doesn't
resolve the nodename configured in ha.cf to an IP address which is part of
the 2 cluster LANs.
My system have 3 different NICs, 1 is used for the traffic network and the
other 2 are used by Heartbeat. The systems have assigned IPs to all NICs.

The /etc/hosts file looks like this and it is common on all nodes, expect
the first 2 lines.               node-01.local.localdomain node-01
localhost.localdomain localhost
::1             localhost6.localdomain6 localhost6              node-01-cluster1.local.localdomain node-01-cluster1            node-01-cluster2.local.localdomain node-01-cluster2           node-01.local.localdomain node-01              node-02-cluster1.local.localdomain node-02-cluster1            node-02-cluster2.local.localdomain node-02-cluster2           node-02.local.localdomain node-02              node-03-cluster1.local.localdomain node-03-cluster1            node-03-cluster2.local.localdomain node-03-cluster2           node-03.local.localdomain node-03             admin-cluster1.local.localdomain admin-cluster1           admin-cluster2.local.localdomain admin-cluster2           admin.local.localdomain admin

and the ha.cf has

autojoin none
use_logd on
debug 0
mcast eth0 694 1 0
bcast eth1
warntime 5
deadtime 15
initdead 60
keepalive 2
node node-01
node node-02
node node-03
crm respawn

and the IP configuration


As you can see the node-01, node-02 and node-03 resolve to IPs in client
Could that cause a problem?
BTW, is it a requirement from Heartbeat to assign IP on the interface that
are being in the communication link?



More information about the Linux-HA mailing list