Bug 656427 - ccs_tool will fail if different ports are used
Summary: ccs_tool will fail if different ports are used
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: cman
Version: 5.5
Hardware: Unspecified
OS: Unspecified
urgent
urgent
Target Milestone: rc
: ---
Assignee: Lon Hohberger
QA Contact: Cluster QE
URL:
Whiteboard:
Depends On:
Blocks: 677814
TreeView+ depends on / blocked
 
Reported: 2010-11-23 17:41 UTC by Shane Bradley
Modified: 2018-11-14 18:52 UTC (History)
7 users (show)

Fixed In Version: cman-2.0.115-70.el5
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2011-07-21 07:16:45 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
Fix (3.03 KB, patch)
2011-02-09 19:56 UTC, Lon Hohberger
no flags Details | Diff
Man page update (1.02 KB, patch)
2011-02-09 21:05 UTC, Lon Hohberger
no flags Details | Diff


Links
System ID Private Priority Status Summary Last Updated
Red Hat Knowledge Base (Legacy) 40016 0 None None None Never
Red Hat Product Errata RHBA-2011:1001 0 normal SHIPPED_LIVE cman bug-fix and enhancement update 2011-07-20 15:44:50 UTC

Description Shane Bradley 2010-11-23 17:41:33 UTC
Description of problem:

If the ports for cman are changed from the defaults then ccs_tool will fail to work since the ports for ccs_tool are hardcoded.

For example setting the port values for cman components in /etc/sysconfig/cman:
$ cat /etc/sysconfig/cman
CCSD_OPTS="-P f:40006 -P b:40008 -P c:40009"

Using non-default ports will make ccs_tool fail.

Version-Release number of selected component (if applicable):
cman-2.0.115-34.el5.x86_64

How reproducible:
Everytime

Steps to Reproduce:
1) Tried changing the port on my single node cluster.
$ cat /etc/sysconfig/cman
CCSD_OPTS="-P f:40006 -P b:40008 -P c:40009"

2) Start the service
$ service cman start

See the only node in cluster
$ cman_tool nodes
Node  Sts   Inc   Joined               Name
   1   M     24   2010-09-29 14:39:19  rh5node0.examplerh.com

Get process network port list
$ netstat -tulpn | grep ccsd
tcp        0      0 0.0.0.0:40009 0.0.0.0:*   LISTEN      9427/ccsd
tcp        0      0 ::1:40006     :::*        LISTEN      9427/ccsd
udp        0      0 :::40008      :::*                    9427/ccsd

3) Tested updating cluster.conf version which would contact the ccsd
process. 
$ emacs /etc/cluster/cluster.conf : Inc version by 1.
$ ccs_tool update /etc/cluster/cluster.conf
Unable to open connection to rh5node0.examplerh.com: Bad file descriptor
  
Actual results:
ccs_tool will fail to work since ports are hardcoded.

Expected results:
ccs_tool should either have options for ports or read in /etc/sysconfig/cman options.

Additional info:

Comment 6 Lon Hohberger 2011-02-09 19:56:09 UTC
Created attachment 477895 [details]
Fix

Notes:

1) This patch does not update ccs_tool's "editconf" capabilities, since these are deprecated anyway.

2) You must specify things on the command line; parsing a sysconfig file is not appropriate - /etc/sysconfig files are for init scripts.  The only port you need to change is the 'c' port.  I used ccsd's argument parsing for consistency.

   ccs_tool update -P c:40009 /etc/cluster/cluster.conf

3) This patch is not needed in RHEL6 or STABLE31.

Comment 7 Lon Hohberger 2011-02-09 21:05:41 UTC
Created attachment 477907 [details]
Man page update

Comment 8 Lon Hohberger 2011-02-09 21:15:40 UTC
[root@rhel5-1 ~]# cat /etc/sysconfig/cman
CCSD_OPTS="-P f:40006 -P b:40008 -P c:40009"

[root@rhel5-1 ~]# netstat -a | grep [45]000
tcp        0      0 localhost.localdomain:40006 *:*                         LISTEN      
tcp        0      0 *:40009                     *:*                         LISTEN      
udp        0      0 *:40008                     *:*                                     
[root@rhel5-1 ~]# ccs_tool update /etc/cluster/cluster.conf
Unable to open connection to rhel5-1.lhh.pvt: Bad file descriptor

Failed to update config file.
[root@rhel5-1 ~]# ccs_tool update -P c:40009 /etc/cluster/cluster.conf
Set cluster base port to 40009
Config file updated from version 17 to 18

Update complete.
[root@rhel5-1 ~]#

Comment 11 Lon Hohberger 2011-02-14 18:59:25 UTC
Patch posted to cluster-devel

Comment 20 errata-xmlrpc 2011-07-21 07:16:45 UTC
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on therefore solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.

http://rhn.redhat.com/errata/RHBA-2011-1001.html


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