Many clusters find it desirable to have a policy which allows failback only on weekends, and prohibits it during the week.
Below is an XML snippet for the crm_config section which does that.
Note that the CRM follows the convention of making Monday the first day of the week, similarly to the date %u string, and different from the %w string. Cron allows it to either be first (0) or last (7). For the CIB, it is the last day of the week (7) only.
<cluster_property_set id="weekend_override" score="100">
<rule id="my_ip:failover" boolean_op="and">
<date_expression id="my_ip:days" operation="date_spec">
<date_spec id="my_ip:days" weekdays="6-7"/>
</date_expression>
</rule>
<attributes>
<nvpair id="weekend-sticky"
name="default_resource_stickiness"
value="0"/>
</attributes>
</cluster_property_set>
<cluster_property_set id="default_cluster_properties" score="10">
<attributes>
<nvpair id="default-sticky"
name="default_resource_stickiness"
value="INFINITY"/>
</attributes>
</cluster_property_set>
Translating this into English: The first cluster property set is given a score of 100, and has a date restriction on it which is only true on weekends (days 6-7).
In other words, if the date expression is true, then the elements of this rule set apply to are given a weight of 100.
The second cluster_property set has a weight (score) of 10, and is always TRUE (in other words it always applies). However since its weight is only 10, and the conditional rule above it has a weight of 100, then when both rule sets apply, and there are conflicts, the elements provided by the weekend_override {{cluster_property_set}} will win out.
The net result of this is that for days 6 and 7, default_resource_stickiness has the value 0, but on other days, it has the value INFINITY.
