Bugzilla will be upgraded to version 5.0 on a still to be determined date in the near future. The original upgrade date has been delayed.
Bug 615929 - luci generated cluster.conf with fence_scsi fails to validate
luci generated cluster.conf with fence_scsi fails to validate
Status: CLOSED CURRENTRELEASE
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: luci (Show other bugs)
6.0
All Linux
low Severity medium
: rc
: ---
Assigned To: Chris Feist
Cluster QE
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2010-07-19 05:44 EDT by Fabio Massimo Di Nitto
Modified: 2010-11-10 17:12 EST (History)
8 users (show)

See Also:
Fixed In Version: luci-0.22.2-9.el6
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2010-11-10 17:12:05 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Fabio Massimo Di Nitto 2010-07-19 05:44:52 EDT
<?xml version="1.0"?>
<cluster config_version="8" name="fabbione-rhel6">
        <clusternodes>
                <clusternode name="rhel6-node1" nodeid="1" votes="1">
                        <fence>
                                <method name="default">
                                        <device name="scsi_fence"/>
                                </method>
                        </fence>
                </clusternode>
                <clusternode name="rhel6-node2" nodeid="2" votes="1">
                        <fence>
                                <method name="default">
                                        <device name="scsi_fence2"/>
                                </method>
                        </fence>
                </clusternode>
        </clusternodes>
        <rm>
                <failoverdomains/>
                <resources/>
        </rm>
        <fencedevices>
                <fencedevice agent="fence_scsi" name="scsi_fence" node="rhel6-node1"/>
                <fencedevice agent="fence_scsi" name="scsi_fence2" node="rhel6-node2"/>
        </fencedevices>
        <fence_daemon clean_start="0" post_fail_delay="0" post_join_delay="3"/>
        <quorumd label="qdisk">
                <heuristic program="/bin/ping -c 1 vultus5.int.fabbione.net"/>
        </quorumd>
</cluster>


and error:

   Starting cman... Relax-NG validity error : Extra element fencedevices in interleave
tempfile:23: element fencedevices: Relax-NG validity error : Element cluster failed to validate content
tempfile:14: element device: validity error : IDREF attribute name references an unknown ID "scsi_fence2"
Configuration fails to validate
Comment 2 Lon Hohberger 2010-07-19 09:54:59 EDT
Jing says:

[lhh@localhost jing-20090818]$ java -jar bin/jing.jar ~/cluster.rng.in ./cluster.conf_fail
/sandbox/lhh/jing/jing-20090818/./cluster.conf_fail:25:21: error: attribute "node" not allowed here; expected attribute "action", "aptpl", "auth", "channel_address", "cipher", "cmd_prompt", "community", "cserver", "debug", "device", "devices", "domain", "drac_version", "exec", "hash", "help", "hmc_version", "identity_file", "inet4_only", "inet6_only", "io_fencing", "ip_family", "ipaddr", "ipport", "key", "key_file", "lanplus", "logfile", "login", "managed", "method", "module_name", "multicast_address", "nodename", "option", "partition", "passwd", "passwd_script", "port", "retrans", "ribcl", "rpowerpath", "secure", "separator", "serial_device", "serial_params", "servers", "snmp_auth_prot", "snmp_priv_passwd", "snmp_priv_passwd_script", "snmp_priv_prot", "snmp_sec_level", "snmp_version", "ssl", "switch", "timeout", "udpport", "use_uuid", "verbose", "version", "vmware_datacenter" or "vmware_type"
/sandbox/lhh/jing/jing-20090818/./cluster.conf_fail:27:21: error: attribute "node" not allowed here; expected attribute "action", "aptpl", "auth", "channel_address", "cipher", "cmd_prompt", "community", "cserver", "debug", "device", "devices", "domain", "drac_version", "exec", "hash", "help", "hmc_version", "identity_file", "inet4_only", "inet6_only", "io_fencing", "ip_family", "ipaddr", "ipport", "key", "key_file", "lanplus", "logfile", "login", "managed", "method", "module_name", "multicast_address", "nodename", "option", "partition", "passwd", "passwd_script", "port", "retrans", "ribcl", "rpowerpath", "secure", "separator", "serial_device", "serial_params", "servers", "snmp_auth_prot", "snmp_priv_passwd", "snmp_priv_passwd_script", "snmp_priv_prot", "snmp_sec_level", "snmp_version", "ssl", "switch", "timeout", "udpport", "use_uuid", "verbose", "version", "vmware_datacenter" or "vmware_type"

Looking at the fence_scsi script, the parameter "node" should be "nodename".  Since the <fencedevice> is failing because of this, this trickles up to the IDREF error when using xmllint.

Actually, "node" I don't think is ever used by a fencing agent; it's always "nodename".
Comment 4 Lon Hohberger 2010-07-19 10:17:26 EDT
Changing node -> nodename causes above cluster.conf to validate correctly.
Comment 5 Fabio Massimo Di Nitto 2010-07-20 05:59:10 EDT
the fix committed in luci.git 3177c4dd861060b6bec1b3510fcf041334c1fff7
does not solve the issue.

adding a fence_scsi device with Node name = foo returns an error:

No value for required attribute "node" was given for fence "scsi_fence"
Comment 6 Chris Feist 2010-07-22 18:04:28 EDT
It looks like the fix was not complete.

It should be fully completed in 6afbe5ac3ed48b589ba4375065a4d8aa35eb3927

Fabio,

can you verify that this works?

Thanks,
Chris
Comment 7 Fabio Massimo Di Nitto 2010-07-23 02:34:31 EDT
confirmed that the new fix works as expected
Comment 11 Chris Feist 2010-08-26 15:58:48 EDT
The config file listed above is a bad config file that was generated with a past version of luci with the bug.  If you create a new cluster in luci and created a fence scsi device it should be using the "nodename" tag inside <fencedevice>.

So if you create a cluster.conf and add a fence_scsi device and look at the cluster.conf and if the line looks something like this:

...
        <fencedevices>
                <fencedevice agent="fence_scsi" name="scsi_fence"
node="rhel6-node1"/>
                <fencedevice agent="fence_scsi" name="scsi_fence2"
node="rhel6-node2"/>
        </fencedevices>
...

Then luci is doing it wrong, it should look like this (notice node->nodename):

...
        <fencedevices>
                <fencedevice agent="fence_scsi" name="scsi_fence"
nodename="rhel6-node1"/>
                <fencedevice agent="fence_scsi" name="scsi_fence2"
nodename="rhel6-node2"/>
        </fencedevices>
...
Comment 12 Brian Brock 2010-08-27 17:00:33 EDT
verified

gotcha, parameter name is "nodename" in the cluster.conf currently generated by luci.
Comment 13 releng-rhel@redhat.com 2010-11-10 17:12:05 EST
Red Hat Enterprise Linux 6.0 is now available and should resolve
the problem described in this bug report. This report is therefore being closed
with a resolution of CURRENTRELEASE. You may reopen this bug report if the
solution does not work for you.

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