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
_______________________________________________
Users mailing list: Users@clusterlabs.org
https://lists.clusterlabs.org/mailman/listinfo/users
Project Home: http://www.clusterlabs.org
Getting started: http://www.clusterlabs.org/doc/Cluster_from_Scratch.pdf
Bugs: http://bugs.clusterlabs.org