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:
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.
Created attachment 477907 [details] Man page update
[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 ~]#
Patch posted to cluster-devel
https://www.redhat.com/archives/cluster-devel/2011-February/msg00040.html https://www.redhat.com/archives/cluster-devel/2011-February/msg00041.html
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