Bug 426363

Summary: ccs_tool create - forgets to put cman element in most cases
Product: Red Hat Enterprise Linux 5 Reporter: Ervin Horvath <ervin.horvath>
Component: cmanAssignee: David Teigland <teigland>
Status: CLOSED NOTABUG QA Contact: GFS Bugs <gfs-bugs>
Severity: low Docs Contact:
Priority: low    
Version: 5.1CC: cluster-maint
Target Milestone: rc   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2008-06-24 17:23:49 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Ervin Horvath 2007-12-20 14:56:39 UTC
Description of problem:
When creating a basic cluster.conf with ccs_tool create commands,
according to the tool's manpage example (cluster, addfence, addnode),
it finally does not valide (xmllint --relaxng /usr/share/system-config-cluster/
misc/cluster.ng) in most cases because it lacks this tag:
<cman />

Unfortunately the Relax-NG validity errors do not mention what's wrong.

cman element is only put to the basic config file if ccs_tool create is called 
with the special "-2" argument (for 2-node cluster special setup), then it will 
become a valid configuration.

Version-Release number of selected component (if applicable):
cman-2.0.73-1.el5

How reproducible:
follow ccs_tool manpage example to create a config. then validate.

Steps to Reproduce:
ccs_tool create test_cluster -c /tmp/basic.conf
ccs_tool addfence manual_fence fence_manual -c /tmp/basic.conf
ccs_tool addnode node1 -n 1 -f manual_fence -c /tmp/basic.conf
ccs_tool addnode node2 -n 2 -f manual_fence -c /tmp/basic.conf
ccs_tool addnode node3 -n 3 -f manual_fence -c /tmp/basic.conf
xmllint --relaxng /usr/share/system-config-cluster/misc/cluster.ng /tmp/
basic.conf
  
Actual results:
/tmp/basic.conf:3: element clusternode: Relax-NG validity error : Invalid 
attribute nodeid for element clusternode
/tmp/basic.conf:3: element clusternode: Relax-NG validity error : Element 
clusternodes has extra content: clusternode
/tmp/basic.conf:2: element cluster: Relax-NG validity error : Invalid sequence 
in interleave
/tmp/basic.conf:2: element cluster: Relax-NG validity error : Element cluster 
failed to validate content
/tmp/basic.conf:3: element device: validity error : IDREF attribute name 
references an unknown ID "manual_fence"
/tmp/basic.conf:3: element device: validity error : IDREF attribute name 
references an unknown ID "manual_fence"
/tmp/basic.conf:3: element device: validity error : IDREF attribute name 
references an unknown ID "manual_fence"
/tmp/basic.conf fails to validate

Expected results:
/tmp/basic.conf validates

Additional info:
if no "-2" special two-nodes cluster creation option is given,
please include the <cman />  element at this phase:
ccs_tool create test_cluster

Comment 1 Christine Caulfield 2007-12-20 15:12:52 UTC
Strictly speaking it's the cluster.ng file that's wrong. a <cman /> section is
entirely optional, the cluster will function quite happily without it.