RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 786118 - RFE: cluster configuration to accept hostname aliases
Summary: RFE: cluster configuration to accept hostname aliases
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: cluster
Version: 6.2
Hardware: All
OS: Linux
low
low
Target Milestone: rc
: ---
Assignee: Fabio Massimo Di Nitto
QA Contact: Cluster QE
URL:
Whiteboard:
Depends On:
Blocks:
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-3.0.12.1-33.el6
Doc Type: Enhancement
Doc Text:
Clone Of:
Environment:
Last Closed: 2013-02-21 07:42:14 UTC
Target Upstream Version:
Embargoed:


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


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2013:0287 0 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:

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
#

Comment 2 Fabio Massimo Di Nitto 2012-06-26 13:13:27 UTC
[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.

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
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

Comment 4 Fabio Massimo Di Nitto 2012-06-29 09:56:48 UTC
http://git.fedorahosted.org/git/?p=cluster.git;a=commitdiff;h=8975bd6341b2d94c1f89279b1b00d4360da1f5ff

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.

http://rhn.redhat.com/errata/RHBA-2013-0287.html


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