Bug 786118 - RFE: cluster configuration to accept hostname aliases
Summary: RFE: cluster configuration to accept hostname aliases
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: cluster
Version: 6.2
Hardware: All
OS: Linux
Target Milestone: rc
: ---
Assignee: Fabio Massimo Di Nitto
QA Contact: Cluster QE
Depends On:
TreeView+ depends on / blocked
Reported: 2012-01-31 14:12 UTC by Jim Minter
Modified: 2013-02-21 07:42 UTC (History)
6 users (show)

Fixed In Version: cluster-
Doc Type: Enhancement
Doc Text:
Clone Of:
Last Closed: 2013-02-21 07:42:14 UTC
Target Upstream Version:

Attachments (Terms of Use)
proposed fix (4.40 KB, patch)
2012-06-27 09:53 UTC, Fabio Massimo Di Nitto
fdinitto: review? (ccaulfield)
Details | Diff

System ID Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2013:0287 normal SHIPPED_LIVE cluster and gfs2-utils bug fix and enhancement update 2013-02-20 20:36:42 UTC

Description Jim Minter 2012-01-31 14:12:51 UTC
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:  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

Comment 2 Fabio Massimo Di Nitto 2012-06-26 13:13:27 UTC
[root@fedora16-node2 cman]# cat /etc/hosts foo1 bar1 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.

Comment 3 Fabio Massimo Di Nitto 2012-06-27 09:53:10 UTC
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   localhost localhost.localdomain localhost4 localhost4.localdomain4
::1         localhost localhost.localdomain localhost6 localhost6.localdomain6 foo1 bar1 foo2 bar2

    <clusternode name="bar1" votes="1" nodeid="1">
        <method name="single">
          <device name="xvm" domain="fedora16-node1"/>
    <clusternode name="bar2" votes="1" nodeid="2">
        <method name="single">
          <device name="xvm" domain="fedora16-node2"/>

[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

Comment 4 Fabio Massimo Di Nitto 2012-06-29 09:56:48 UTC

upstream commit, Review-by Chrissie.

Comment 10 errata-xmlrpc 2013-02-21 07:42:14 UTC
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.


Note You need to log in before you can comment on or make changes to this bug.