On Tue, Oct 28, 2008 at 12:23, Andrew Beekhof <[EMAIL PROTECTED]> wrote: > On Tue, Oct 28, 2008 at 12:11, Adrian Chapela > <[EMAIL PROTECTED]> wrote: >> Andrew Beekhof escribió: >>> >>> On Tue, Oct 28, 2008 at 11:33, Adrian Chapela >>> <[EMAIL PROTECTED]> wrote: >>> >>>> >>>> Hello Andrew, >>>> >>>> I am testing the constraints and resources with new Pacemaker 1.0. My >>>> problem is my config doesn't conform to the configured schema. I didn't >>>> know >>>> if I using the correct Heartbeat + Pacemaker combination. I compilled >>>> Heartbeat 2.99.1 few days ago and I recently compilled Pacemaker 1.0. >>>> What >>>> could be the problem of DTD validation ? >>>> >>>> I am trying to update config with this file: >>>> <resources> >>>> <clone id="pingd"> >>>> <meta_attributes id="meta-pingd"> >>>> <nvpair id="pingd-clone_node_max" name="clone_node_max" value="1"/> >>>> </meta_attributes> >>>> <primitive id="pingd-child" class="ocf" type="pingd"> >>>> <operations> >>>> <op id="pingd-child-monitor" name="monitor" interval="20s" timeout="40s" >>>> prereq="nothing"/> >>>> <op id="pingd-child-start" name="start" prereq="nothing"/> >>>> >>> >>> not sure about the second fragment, by here you need to replace >>> 'prereq' with 'requires' >>> btw. if you want to use pingd, you'll need the latest from stable-1.0 >>> as attrd was broken in 1.0.0 :-( >>> http://hg.clusterlabs.org/pacemaker/stable-1.0 >>> >> >> Ok, I already compilled it. I can't import the file again, I delete prereq >> (I only want to find my error, then I will config all OK). The clone is now: >> <resources> >> <clone id="pingd"> >> <meta_attributes id="meta-pingd"> >> <nvpair id="pingd-clone_node_max" name="clone_node_max" >> value="1"/> >> </meta_attributes> >> <primitive id="pingd-child" class="ocf" type="pingd"> > > you didnt specify a provider > >> <operations> >> <op id="pingd-child-monitor" name="monitor" interval="20s" >> timeout="40s"/> >> <op id="pingd-child-start" name="start"/> > > you didnt specify an interval (you need to explicitly say 0) > with those two changes it applies > > > how'd i figure that out? > > # vi chapela.xml > # crm_shadow --create-empty foo > # cibadmin -M --xml-file chapela.xml -V > > in this last case, the output [yes, i know its terrible - but its > really not my fault :( ] was: > > cibadmin[19447]: 2008/10/28_11:20:11 ERROR: Extra element operations > in interleave > cibadmin[19447]: 2008/10/28_11:20:11 ERROR: Element primitive failed > to validate content > cibadmin[19447]: 2008/10/28_11:20:11 ERROR: Invalid sequence in interleave > cibadmin[19447]: 2008/10/28_11:20:11 ERROR: Element clone failed to > validate content > cibadmin[19447]: 2008/10/28_11:20:11 ERROR: Element resources has > extra content: clone > cibadmin[19447]: 2008/10/28_11:20:11 ERROR: Element cib failed to > validate content > cibadmin[19447]: 2008/10/28_11:20:11 ERROR: cib_perform_op: Updated > CIB does not validate against pacemaker-1.0 schema/dtd > cibadmin[19447]: 2008/10/28_11:20:11 ERROR: main: Call failed: Update > does not conform to the configured schema/DTD > Call failed: Update does not conform to the configured schema/DTD > > Always process this stuff from top to bottom. > So start with the first error which tells us that there is something > wrong in the operations tag. > That made me look more closely at the two operations which I then > compared against the schema and found the problem.
Ok, I finally got off my butt and implemented a line number display for these errors. Note that its only available when using crm_shadow - but you should all be using that anyway right ;-) Output from the above example: shadow[foo] # cibadmin -M --xml-file ~/gm.xml 1 <cib epoch="1" num_updates="1" admin_epoch="0" validate-with="pacemaker-1.0" cib-last-written="Tue Oct 28 14:43:21 2008"> 2 <configuration> 3 <crm_config/> 4 <nodes/> 5 <resources> 6 <clone id="pingd"> 7 <meta_attributes id="meta-pingd"> 8 <nvpair id="pingd-clone_node_max" name="clone_node_max" value="1"/> 9 </meta_attributes> 10 <primitive id="pingd-child" class="ocf" type="pingd" provider="heartbeat"> 11 <operations> 12 <op id="pingd-child-monitor" name="monitor" interval="20s" timeout="40s"/> 13 <op id="pingd-child-start" name="start"/> 14 </operations> 15 <instance_attributes id="pingd_inst_attr"> 16 <nvpair id="pingd-dampen" name="dampen" value="5s"/> 17 <nvpair id="pingd-multiplier" name="multiplier" value="100"/> 18 </instance_attributes> 19 </primitive> 20 </clone> 21 </resources> 22 <constraints/> 23 </configuration> 24 <status/> 25 </cib> Relax-NG validity error : Extra element operations in interleave /opt/local/var/run/shadow.6sB6vF:11: element operations: Relax-NG validity error : Element primitive failed to validate content /opt/local/var/run/shadow.6sB6vF:6: element clone: Relax-NG validity error : Invalid sequence in interleave /opt/local/var/run/shadow.6sB6vF:6: element clone: Relax-NG validity error : Element clone failed to validate content /opt/local/var/run/shadow.6sB6vF:6: element clone: Relax-NG validity error : Element resources has extra content: clone /opt/local/var/run/shadow.6sB6vF:1: element cib: Relax-NG validity error : Element cib failed to validate content Call failed: Update does not conform to the configured schema/DTD shadow[foo] # _______________________________________________ Pacemaker mailing list [email protected] http://list.clusterlabs.org/mailman/listinfo/pacemaker
