[Pacemaker] operation negations

Dejan Muhamedagic dejanmm at fastmail.fm
Fri Jun 19 13:34:51 UTC 2009


Hi,

On Thu, Jun 18, 2009 at 06:02:19PM -0700, ??????? ???? wrote:
> Hi again!
> I might have figured this out - if I guess the documentation correctly:
> "eq" - "is equal to"
> "ne" - "is not equal to"
> "gt" - "is greater than"
> "gte" - "is greater than or equal"
> "lte" - "is less than or equal"
> 
> Then my attempt to construct a rule that would forbid running a service of mines on any node but the two I want would look like:
> 
> <rsc_location id="dont-run-pprus-unless-ppst1pru01" rsc="pprus">
>   <rule id="dont-run-pprus-rule" score="-INFINITY" boolean-op="or">
>     <expression id="dont-run-pprus-expr-0" attribute="#uname" operation="ne" value="ppst1pru01"/>
>     <expression id="dont-run-pprus-expr-1" attribute="#uname" operation="ne" value="ppst1pru001"/>
>   </rule>
> </rsc_location>
> 
> Is that correct?

No. Use boolean-op and.

Thanks,

Dejan

> ./Dimitar Boyn
> 
> -----Original Message-----
> From: ??????? ???? 
> Sent: Thursday, June 18, 2009 5:07 PM
> To: linux-ha at lists.linux-ha.org; pacemaker at clusterlabs.org
> Subject: [Pacemaker] operation negations
> 
> Hi, All!
> 
> Please help me with the correct negation syntax!
> 
> In the documentation there is an example how to build a rule that would forbid running a resource on certain node:
> 
> <rsc_location id="dont-run-apache-on-c001n03" rsc="myApacheRsc">
> <rule id="dont-run-apache-rule" score="-INFINITY">
> <expression id=dont-run-apache-expr attribute="#uname" operation="eq" value="c00n03"/>
> </rule>
> </rsc_location>
> 
> My question is - how could we modify the rule so it says "do not run on any node if its uname attribute "IS NOT EQUAL" to ="c00n03"?
> 
> Also is there a comprehensive list of permited/implemented operations we can use in rules?
> 
> Many Thanks!
> 
> 
> Boyn, Dimitar G.
> Technical Marketing Engineer
> dboyn at postpath.com
> 3979 Freedom Circle,
> Santa Clara, CA 95054
> ICQ# 57-539-824
> IM: Y! niobd 
> ?
> 
> 
> 
> 
> 
> _______________________________________________
> Pacemaker mailing list
> Pacemaker at oss.clusterlabs.org
> http://oss.clusterlabs.org/mailman/listinfo/pacemaker
> 
> _______________________________________________
> Pacemaker mailing list
> Pacemaker at oss.clusterlabs.org
> http://oss.clusterlabs.org/mailman/listinfo/pacemaker




More information about the Pacemaker mailing list