Hide Forgot
When an IP address in /etc/hosts has multiple hostname entries, the clusternode key in cluster.conf must currently match the first listed /etc/hosts entry. If not, ccs_config_validate complains that the node name is not found and the cluster does not start. The RFE is to improve this situation across all relevant cluster suite apps such that any aliases (i.e. subsequent entries) in /etc/hosts are also accepted as well as the canonical name (first entry). Example /etc/hosts snippet: 10.0.0.1 node1 node1.example.org Example working cluster.conf snippet: <clusternode name="node1" nodeid="1"> Example failing cluster.conf snippet: <clusternode name="node1.example.org" nodeid="1"> In the "failing cluster.conf snippet" example above, running ccs_config_validate returns the following, and the cluster does not start. # ccs_config_validate Cannot find node name in cluster.conf Unable to get the configuration #
[root@fedora16-node2 cman]# cat /etc/hosts 192.168.2.225 foo1 bar1 192.168.2.226 foo2 bar2 Node Sts Inc Joined Name 1 M 8 2012-06-26 15:09:39 bar1 2 M 8 2012-06-26 15:09:39 bar2 I have a preliminary patch to make this work. I need to do a bit more testing just to make sure that's working as expected in all corner cases.
Created attachment 594738 [details] proposed fix unit test: [root@fedora16-node2 ~]# uname -a Linux fedora16-node2.int.fabbione.net 3.4.2-1.fc16.x86_64 #1 SMP Thu Jun 14 20:17:26 UTC 2012 x86_64 x86_64 x86_64 GNU/Linux [root@fedora16-node2 ~]# cat /etc/hosts 127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4 ::1 localhost localhost.localdomain localhost6 localhost6.localdomain6 192.168.2.225 foo1 bar1 192.168.2.226 foo2 bar2 <clusternodes> <clusternode name="bar1" votes="1" nodeid="1"> <fence> <method name="single"> <device name="xvm" domain="fedora16-node1"/> </method> </fence> </clusternode> <clusternode name="bar2" votes="1" nodeid="2"> <fence> <method name="single"> <device name="xvm" domain="fedora16-node2"/> </method> </fence> </clusternode> </clusternodes> [root@fedora16-node2 ~]# ccs_config_validate Configuration validates (note bar* and foo* do NOT resolve via DNS) [root@fedora16-node2 ~]# /etc/init.d/cman start Starting cman (via systemctl): [ OK ] [root@fedora16-node2 ~]# cman_tool nodes Node Sts Inc Joined Name 0 M 0 2012-06-27 11:51:54 /dev/block/252:17 1 M 8 2012-06-27 11:51:47 bar1 2 M 4 2012-06-27 11:51:47 bar2 [root@fedora16-node2 ~]# clustat Cluster Status for fabbione @ Wed Jun 27 11:52:46 2012 Member Status: Quorate Member Name ID Status ------ ---- ---- ------ bar1 1 Online, RG-Master bar2 2 Online, Local, RG-Worker /dev/block/252:17 0 Online, Quorum Disk Service Name Owner (Last) State ------- ---- ----- ------ ----- service:vip1 bar2 starting
http://git.fedorahosted.org/git/?p=cluster.git;a=commitdiff;h=8975bd6341b2d94c1f89279b1b00d4360da1f5ff upstream commit, Review-by Chrissie.
Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. http://rhn.redhat.com/errata/RHBA-2013-0287.html