[Pacemaker] Problems with <rule>

Matthew Turnbull matthew.turnbull at messagescan.net
Tue Feb 24 08:40:20 UTC 2009


> > 01: <resources>
> > 02:   <clone id="mips-node-clone">
> > 03:     <primitive class="ocf" id="mips-node" provider="heartbeat"
> type="pingd">
> > 04:       <instance_attributes
> id="mips-node-vh10-instance_attributes" score="10">
> > 05:         <rule id="mips-node-vh10">
> > 06:           <expression id="mips-node-vh10-expr"
> attribute="#uname" operation="eq" value="vh10"/>
> > 07:         </rule>
> > 08:         <nvpair id="mips-node-instance_attributes-multiplier"
> name="multiplier" value="3000"/>
> > 09:       </instance_attributes>
> > 10:       <instance_attributes id="mips-node-instance_attributes">
> > 11:         <nvpair id="mips-node-instance_attributes-name"
> name="name" value="mips_remain"/>
> > 12:         <nvpair id="mips-node-instance_attributes-multiplier"
> name="multiplier" value="1000"/>
> > 13:         <nvpair id="mips-node-instance_attributes-host_list"
> name="host_list" value="127.0.0.1"/>
> > 14:       </instance_attributes>
> > 15:     </primitive>
> > 16:   </clone>
> > 17: </resources>
> >
<snip>
> > If I remove lines 5, 6 and 7 from my XML file (the rule) - but still
> leave in place the separate instance_attributes with a score value -
> it loads and validates fine.
> >
> > I've looked at the offending lines and tried so many different
> things, but so long as any form of <rule> is there, this fails to
> load.  I've read through the DTD
> 
> Look in rule.rng
> After "id" it has:
>       <choice>
> 	<externalRef href="score.rng"/>
> 	<attribute name="score-attribute"><text/></attribute>
>       </choice>
> 
> basically its looking for a value for either score or
> score-attribute.
> 

Thanks for that Andrew - it did fix the problem.

However the <rule> element definition in /usr/share/pacemaker/crm.dtd starting at line 542 shows both score and score_attribute as IMPLIED and not REQUIRED.

Also the "Pacemaker 1.0 Configuration Explained" document says on page 29 that score and score_attribute are "Limited to use in rules that are part of location constraints" - which this one is not.

Anyhow, glad to get it sorted - thanks for the help.

Matt.




More information about the Pacemaker mailing list