[ClusterLabs] How to configure lifetime in constraints?

xin XLiang at suse.com
Wed Mar 21 05:00:43 EDT 2018


Hi:

   I noticed that in latest constraints schema file(constraints-3.0.rng),
   "element-lifetime" is an option in location/colocation/order, and it 
linked to rule-2.9.rng.

   I can not find the keyword "lifetime" in upstream document "Pacemaker 
1.1 Configuration Explained",
   then I guess "date_expression" in rules means lifetime.

   So I write this xml section in file cons1.xml:
   #######################
   <rsc_location id="loc1" rsc="r1" score="100" node="node1">
     <rule id="rule1">
       <date_expression id="date_expr1" operation="date_spec">
         <date_spec weekdays="5" monthdays="13" moon="4"/>
       </date_expression>
     </rule>
   </rsc_location>
   #######################

   Then run:
   #######################
   cibadmin -C --scope constraints -x cons1.xml
   #######################
   That didn't work, cibadmin said:
     Call cib_create failed (-203): Update does not conform to the 
configured schema


   I try to use expression in rule this time in file cons2.xml:
   #######################
   <rsc_location id="loc2" rsc="r1">
     <rule id="rule2" score="-INFINITY">
       <expression id="rule2_exp2" attribute="#uname" operation="eq" 
value="node1"/>
     </rule>
   </rsc_location>
   #######################

   Then run:
   #######################
   cibadmin -C --scope constraints -x cons2.xml
   #######################
   And that work well

   So, how to configure lifetime in constraints?
   Thanks!

   Best regards,
   xin
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.clusterlabs.org/pipermail/users/attachments/20180321/271dbab0/attachment.html>


More information about the Users mailing list