[Pacemaker] Resource stickiness during working hours

Johan Verrept Johan.Verrept at able.be
Thu Oct 8 10:03:49 UTC 2009


Hi Andrew,

  thank you for answering. cibadmin does not want to accept the snippet
though:

Call cib_modify failed (-47): Update does not conform to the configured
schema/DTD

I have corrected the end tag </instance_attributes> which should be
</meta_attributes> ? (same mistake in the manual)

I used this:

<configuration>
  <rsc_defaults>
    <meta_attributes id="core-hours" score="2">
      <rule id="core-hour-rule">         
        <date_expression id="nine-to-five-Mon-to-Fri"
operation="date_spec">
        <date_spec id="nine-to-five-Mon-to-Fri-spec" hours="9-17"
days="1-5" />
        </date_expression>
      </rule>                   
      <nvpair id="core-stickiness" name="resource-stickiness"
value="2" />
     </meta_attributes>
     <meta_attributes id="after-hours" score="1" >
       <nvpair id="after-stickiness" name="resource-stickiness"
value="0" />
     </meta_attributes>
   </rsc_defaults>
</configuration

As a side issue, I changed the stickiness to 2 (from INFINITY). I am
assuming this stickiness value is added to the location preference
calculated for the resource? Normally, my resource has a preference for
a particular node in the cluster with value 1, this should override that
during office hours. Did I use/understand this correctly? 

Thank you,

  Johan


On Wed, 2009-10-07 at 13:58 +0200, Andrew Beekhof wrote:
> On Fri, Sep 25, 2009 at 11:21 AM, Johan Verrept <Johan.Verrept at able.be> wrote:
> >
> > Hi,
> >
> >  I have seen this mentioned in the "Configuration Explained" manual and
> > it listed the rules to use, but it didn't specify how to actually apply
> > that rule to the stickiness attribute. I have looked with google and
> > through the crm help but that didn't do me much good either.
> 
> >  Can I create this with the crm command and how?
> 
> I'm not sure.  Dejan would know.
> 
> > If not, how do I go about it?
> 
> Copy the following xml to blah.xml.
> 
> <configuration>
> <rsc_defaults>
>   <meta_attributes id=”core-hours” score=”2”>
>      <rule id="core-hour-rule">
>          <date_expression id="nine-to-five-Mon-to-Fri" operation="date_spec">
>             <date_spec id=”nine-to-five-Mon-to-Fri-spec” hours="9-17"
> days="1-5"/>
>          </date_expression>
>      </rule>
>      <nvpair id="core-stickiness" name="resource-stickiness" value="INFINITY"/>
>   </meta_attributes>
>   <meta_attributes id=”after-hours” score=”1” >
>     <nvpair id="after-stickiness" name="resource-stickiness" value="0"/>
>   </instance_attributes>
> </rsc_defaults>
> </configuration>
> 
> Then run: cibadmin -M --xml-file blah.xml
> 
> _______________________________________________
> Pacemaker mailing list
> Pacemaker at oss.clusterlabs.org
> http://oss.clusterlabs.org/mailman/listinfo/pacemaker
> 





More information about the Pacemaker mailing list