Bug 866894
Summary: | ccs is creating invalid cluster.conf | ||||||
---|---|---|---|---|---|---|---|
Product: | Red Hat Enterprise Linux 6 | Reporter: | michal novacek <mnovacek> | ||||
Component: | ricci | Assignee: | Chris Feist <cfeist> | ||||
Status: | CLOSED ERRATA | QA Contact: | Cluster QE <mspqa-list> | ||||
Severity: | medium | Docs Contact: | |||||
Priority: | medium | ||||||
Version: | 6.3 | CC: | ccaulfie, cluster-maint, lhh, rpeterso, rsteiger, teigland | ||||
Target Milestone: | rc | ||||||
Target Release: | --- | ||||||
Hardware: | Unspecified | ||||||
OS: | Unspecified | ||||||
Whiteboard: | |||||||
Fixed In Version: | ccs-0.16.2-57.el6 | Doc Type: | Bug Fix | ||||
Doc Text: | Story Points: | --- | |||||
Clone Of: | Environment: | ||||||
Last Closed: | 2013-02-21 10:47:51 UTC | Type: | Bug | ||||
Regression: | --- | Mount Type: | --- | ||||
Documentation: | --- | CRM: | |||||
Verified Versions: | Category: | --- | |||||
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |||||
Cloudforms Team: | --- | Target Upstream Version: | |||||
Embargoed: | |||||||
Bug Depends On: | |||||||
Bug Blocks: | 881827 | ||||||
Attachments: |
|
Description
michal novacek
2012-10-16 09:30:16 UTC
Here's the result from doing the above: <cluster config_version="9" name="STSRHTS24386"> <cman/> <totem token="3000"/> <fence_daemon clean_start="0" post_join_delay="20"/> <clusternodes> <clusternode name="rhel6-node01" nodeid="1" votes="1"> <fence> <method name="virt"> <device domain="rhel6-node01" name="xvm"/> </method> </fence> </clusternode> <clusternode name="rhel6-node02" nodeid="2" votes="1"> <fence> <method name="virt"> <device domain="rhel6-node02" name="xvm"/> </method> </fence> </clusternode> <clusternode name="rhel6-node03" nodeid="3" votes="1"> <fence> <method name="virt"> <device domain="rhel6-node03" name="xvm"/> </method> </fence> </clusternode> </clusternodes> <fencedevices> <fencedevice agent="fence_xvm" auth="sha256" hash="sha256" key_file="/etc/cluster/fence_xvm.key" name="xvm" timeout="5"/> </fencedevices> <resources> <!-- this should be in a rm block, but isn't --> <lvm/> </resources> </cluster> Reproduced on ccs-0.16.2-56.el6.x86_64 (Note that adding an lvm resource with no parameters will also generate an invalid cluster.conf, as there is at least one required attribute) Created attachment 643822 [details]
Patch to fix issue
Looks like there are two issues, first the correct syntax for using --addresource with lvm should be the following: ccs -f cluster.conf --addresource lvm name=lvm_resource_name vg_name=my_vg_name 2nd, there's a bug in ccs which doesn't properly create the rm & resources section of the xml if the resources section doesn't exist. I've fixed this bug and attached it to the bz. This issue is easy to replicate. Start with the cluster.conf from Comment #1 and run 'ccs -f cluster.conf --addresource lvm name=lvm_resource_name vg_name=my_vg_name' Before the patch you'll get an error, after the patch you won't. I'm not sure how critical this is for 6.4 since there is a workaround. Workaround: Add '<rm><resources></resources></rm>' at the end of the cluster.conf before '</cluster>' Before Fix: [root@ask-02 ~]# cat testclusterfile <cluster config_version="1" name="clus"> <fence_daemon/> <clusternodes/> <cman/> <fencedevices/> </cluster> [root@ask-02 ~]# ccs -f testclusterfile --addresource lvm name=lvm_resource_name vg_name=my_vg_name Validation Failure, unable to modify configuration file (use -i to ignore this error). After Fix: [root@ask-02 ~]# rpm -q ccs ccs-0.16.2-57.el6.x86_64 [root@ask-02 ~]# ccs -f testclusterfile --addresource lvm name=lvm_resource_name vg_name=my_vg_name [root@ask-02 ~]# cat testclusterfile <cluster config_version="2" name="clus"> <fence_daemon/> <clusternodes/> <cman/> <fencedevices/> <rm> <resources> <lvm name="lvm_resource_name" vg_name="my_vg_name"/> </resources> </rm> </cluster> 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-0453.html |