Hide Forgot
Description of problem: ccs --checkconf works fine when -h hostname is set, however it should be able to validate the node synchronisation if only -f filename is given (as noted in man pages). The result of a -f check however is always false regardless the real cluster sync status. I believe this is due to the method comparing config file xml to the live config from ricci, where the file xml has the intendation set as is in the file itself, but the live xml from ricci has no intendation at all, therefore bare comparation of such string will always fail. Here's how it looks when i changed the ccs python code to dump the xml: <cluster config_version="56" name="mycluster"> <fence_daemon/> <clusternodes> <clusternode name="z2" nodeid="1"/> <clusternode name="z4" nodeid="2"/> </clusternodes> <cman/> <fencedevices/> <rm> <failoverdomains/> <resources/> </rm> </cluster> <cluster config_version="56" name="mycluster"> <fence_daemon/> <clusternodes> <clusternode name="z2" nodeid="1"/> <clusternode name="z4" nodeid="2"/> </clusternodes> <cman/> <fencedevices/> <rm> <failoverdomains/> <resources/> </rm> </cluster> The first one is a xml variable and the second one is the xml2 variable from check_cluster_conf() function. [root@z2 cluster]# ccs -h z2 --checkconf All nodes in sync. [root@z2 cluster]# ccs -f /etc/cluster/cluster.conf --checkconf Node: z2 does not match Node: z4 does not match Version-Release number of selected component (if applicable): ccs-0.16.2-41.el6 How reproducible: Always Steps to Reproduce: 1. create a multi-node cluster (two nodes is enough) 2. sync the configuration (ccs -h z2 --sync --activate) 3. run a checkconf against config file on any of the nodes (ccs -f /etc/cluster/cluster.conf --checkconf) Actual results: [root@z2 cluster]# ccs -h z2 --checkconf All nodes in sync. [root@z2 cluster]# ccs -f /etc/cluster/cluster.conf --checkconf Node: z2 does not match Node: z4 does not match Expected results: [root@z2 cluster]# ccs -h z2 --checkconf All nodes in sync. [root@z2 cluster]# ccs -f /etc/cluster/cluster.conf --checkconf All nodes in sync. Additional info: [root@z2 sbin]# cat /etc/cluster/cluster.conf <?xml version="1.0"?> <cluster config_version="51" name="mycluster"> <fence_daemon/> <clusternodes> <clusternode name="z2" nodeid="1"/> <clusternode name="z4" nodeid="2"/> </clusternodes> <cman/> <fencedevices/> <rm> <failoverdomains/> <resources/> </rm> </cluster>
There are actually two ways how to solve this issue: 1) do not compare the node configurations to the given config file, but compare all of the nodes to the first node found in this config file instead 2) fix the intendation (which would possibly be the better way)
Before Fix: [root@amoco-02 ~]# ccs -h localhost --checkconf All nodes in sync. [root@amoco-02 ~]# ccs -f /etc/cluster/cluster.conf --checkconf Node: amoco-01.lab.msp.redhat.com does not match Node: amoco-02.lab.msp.redhat.com does not match [root@amoco-02 ~]# [root@amoco-02 ~]# ccs -f /etc/cluster/cluster.conf --checkconf All nodes in sync. Commit: https://github.com/feist/ccs/commit/c56501b776b367ebc3cbae2452b0c33b75ca15a0
With ricci-0.16.2-48.el6 [root@ask-04 tmp]# ccs -h localhost --checkconf All nodes in sync. [root@ask-04 tmp]# ccs -f /etc/cluster/cluster.conf --checkconf All nodes in sync.
Technical note added. If any revisions are required, please edit the "Technical Notes" field accordingly. All revisions will be proofread by the Engineering Content Services team. New Contents: Cause: Using ccs --checkconf with the '-f' option for a local file Consequence: ccs doesn't go out on each of the nodes specified in the local cluster.conf file to verify it's the same file. Fix: ccs has been updated to check remote nodes when using local cluster.conf file Result: When checking local cluster.conf file with --checkconf ccs now checks remote nodes.
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-2012-0898.html