Bug 531489

Summary: Relax-NG validity error on fencedevices
Product: [Fedora] Fedora Reporter: Gianluca Cecchi <gianluca.cecchi>
Component: cmanAssignee: Lon Hohberger <lhh>
Status: CLOSED NOTABUG QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: low    
Version: 11CC: agk, ccaulfie, cfeist, fdinitto, mbroz, swhiteho
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2009-10-28 17:17:39 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:
Attachments:
Description Flags
cluster.conf
none
cluster.rng none

Description Gianluca Cecchi 2009-10-28 15:21:44 UTC
Description of problem:
After updating from 3.0.3-1.fc11 to 3.0.4-1 via download and "rpm -Uvh" I now get error about Relax-NG when starting cman


Version-Release number of selected component (if applicable):
3.0.4-1

How reproducible:
always

Steps to Reproduce:
1. power on server
2. cman init script starts
3. 
  
Actual results:
Relax-NG validity error : Extra element fencedevices in interleave
tempfile:2: element cluster: Relax-NG validity erorr : Element cluster failed to validate content
tempfile:16: element device: validity error : IDREF attribute name references an unknown ID "ilokvm2"
Configuration fails to validate

Expected results:
[OK]
without errors

Additional info:
cluster and services actually start

note: node2 is powered of at this moment

 [root virtfed ~]# clustat
Cluster Status for kvm @ Wed Oct 28 12:41:43 2009
Member Status: Quorate

 Member Name                                                   ID   Status
 ------ ----                                                   ---- ------
 kvm1                                                              1 Online, Local, rgmanager
 kvm2                                                              2 Offline

 Service Name                                         Owner (Last)                                         State        
 ------- ----                                         ----- ------                                         -----        
 service:DRBDNODE1                                    kvm1                                                 started      
 service:DRBDNODE2                                    (none)                                               stopped

Comment 1 Gianluca Cecchi 2009-10-28 15:25:05 UTC
Created attachment 366454 [details]
cluster.conf

Comment 2 Gianluca Cecchi 2009-10-28 15:25:27 UTC
Created attachment 366455 [details]
cluster.rng

Comment 3 Lon Hohberger 2009-10-28 17:08:30 UTC
That's quite odd - it's almost like relaxng isn't honoring the ID tag for both <fencedevice> tags, only the first one.

Comment 4 Lon Hohberger 2009-10-28 17:17:39 UTC
fence_ilo doesn't take 'hostname'; it takes 'ipaddr'.

Change:

<fencedevice name="ilokvm1" agent="fence_ilo" hostname="10.4.192.227" login="fenceuser" passwd="mypwd1"/>
<fencedevice name="ilokvm2" agent="fence_ilo" hostname="10.4.192.229" login="fenceuser" passwd="mypwd2"/>

To:

<fencedevice name="ilokvm1" agent="fence_ilo" ipaddr="10.4.192.227" login="fenceuser" passwd="mypwd1"/>
<fencedevice name="ilokvm2" agent="fence_ilo" ipaddr="10.4.192.229" login="fenceuser" passwd="mypwd2"/>


The Relax-NG validator in xmllint is quite cryptic.

Comment 5 Lon Hohberger 2009-10-28 17:29:58 UTC
Maybe we should include 'jing' with the cluster instead of relying on xmllint someday:

http://code.google.com/p/jing-trang/

[lhh@localhost bin]$ java -jar jing.jar ./cluster.rng ~/sandbox/cluster.conf
/home/boston/lhh/sandbox/cluster.conf:22:108: error: attribute "hostname" not allowed here; expected attribute "action", "auth", "cserver", "debug", "device", "domain", "exec", "hash", "identity_file", "ip_family", "ipaddr", "key_file", "lanplus", "login", "managed", "multicast_address", "multicast_ttl", "name", "nodename", "option", "partition", "passwd", "passwd_script", "port", "retrans", "rpowerpath", "secure", "self", "servers", "ssl", "switch", "timeout", "use_uuid", "verbose", "vmware_datacenter" or "vmware_type"
/home/boston/lhh/sandbox/cluster.conf:22:108: error: element "fencedevice" missing required attribute "ipaddr"
/home/boston/lhh/sandbox/cluster.conf:23:108: error: attribute "hostname" not allowed here; expected attribute "action", "auth", "cserver", "debug", "device", "domain", "exec", "hash", "identity_file", "ip_family", "ipaddr", "key_file", "lanplus", "login", "managed", "multicast_address", "multicast_ttl", "name", "nodename", "option", "partition", "passwd", "passwd_script", "port", "retrans", "rpowerpath", "secure", "self", "servers", "ssl", "switch", "timeout", "use_uuid", "verbose", "vmware_datacenter" or "vmware_type"
/home/boston/lhh/sandbox/cluster.conf:23:108: error: element "fencedevice" missing required attribute "ipaddr"