Hello,
I have a question about resource_stickiness.
This value can be set as default, or primitive, instance_attributes, etc...
How priority is established?
I thought the order might be, primitive > instance_attributes > default,
but it seems that the value for primitive does something strange.
I set resource_stickiness = 0 as default like this; (a detail is attached)
------------------------------------------------------------------------
<cib>
<configuration>
<crm_config>
<cluster_property_set id="cluster">
<attributes>
<nvpair id="default" name="default-resource-stickiness" value="0"/>
...
</attributes>
</cluster_property_set>
</crm_config>
<nodes/>
<resources>
<group id="grpDummy">
<primitive id="prmDummy" class="ocf" type="Dummy" provider="heartbeat">
...
</primitive>
</group>
...
------------------------------------------------------------------------
I moved a resource, first;
(1)# crm_resource -r prmDummy -p resource_stickiness -v -INFINITY
It worked. The resource moved to the other node.
I brought resource_stickiness back to "0", and changed its value for
primitive tag, next.
(2)# crm_resource -r prmDummy -p resource_stickiness -v 0
(3)# cibadmin -U -X '<primitive id="prmDummy" class="ocf" type="Dummy"
provider="heartbeat" resource_stickiness="0"/>'
After that, I tried to move the resource again;
(4)# crm_resource -r prmDummy -p resource_stickiness -v -INFINITY
the resource kept running on the same node...
Is it expected?
Should meta_attributes be also considered?
I expected that the operation (3) was not change anything, so the resource
would be moved.
The version I have is v2.0.8.
Thanks,
Junko
<cib admin_epoch="0" epoch="1" have_quorum="false" cib_feature_revision="1.3" num_updates="0">
<configuration>
<crm_config>
<cluster_property_set id="idCluseterPropertySet">
<attributes>
<nvpair id="symmetric-cluster" name="symmetric-cluster" value="true"/>
<nvpair id="no-quorum-policy" name="no-quorum-policy" value="ignore"/>
<nvpair id="stonith-enabled" name="stonith-enabled" value="false"/>
<nvpair id="short-resource-names" name="short_resource_names" value="true"/>
<nvpair id="is-managed-default" name="is-managed-default" value="true"/>
<nvpair id="transition-idle-timeout" name="transition-idle-timeout" value="120s"/>
<nvpair id="default-resource-stickiness" name="default-resource-stickiness" value="0"/>
<nvpair id="stop-orphan-resources" name="stop-orphan-resources" value="true"/>
<nvpair id="stop-orphan-actions" name="stop-orphan-actions" value="true"/>
<nvpair id="remove-after-stop" name="remove-after-stop" value="false"/>
<nvpair id="default-resource-failure-stickiness" name="default-resource-failure-stickiness" value="-INFINITY"/>
<nvpair id="stonith-action" name="stonith-action" value="reboot"/>
<nvpair id="default-action-timeout" name="default-action-timeout" value="120s"/>
<nvpair id="dc_deadtime" name="dc_deadtime" value="10s"/>
<nvpair id="cluster_recheck_interval" name="cluster_recheck_interval" value="0"/>
<nvpair id="election_timeout" name="election_timeout" value="2min"/>
<nvpair id="shutdown_escalation" name="shutdown_escalation" value="20min"/>
<nvpair id="crmd-integration-timeout" name="crmd-integration-timeout" value="3min"/>
<nvpair id="crmd-finalization-timeout" name="crmd-finalization-timeout" value="10min"/>
<nvpair id="cluster-delay" name="cluster-delay" value="60s"/>
<nvpair id="pe-error-series-max" name="pe-error-series-max" value="-1"/>
<nvpair id="pe-warn-series-max" name="pe-warn-series-max" value="-1"/>
<nvpair id="pe-input-series-max" name="pe-input-series-max" value="-1"/>
<nvpair id="startup-fencing" name="startup-fencing" value="true"/>
</attributes>
</cluster_property_set>
</crm_config>
<nodes/>
<resources>
<group id="grpDummy1">
<primitive id="prmDummy1" class="ocf" type="Dummy" provider="heartbeat" resource_stickiness="0">
<operations>
<op id="opDummy1Start" name="start" timeout="60s" on_fail="fence"/>
<op id="opDummy1Monitor" name="monitor" interval="10s" timeout="10s" on_fail="fence"/>
<op id="opDummy1Stop" name="stop" timeout="60s" on_fail="fence"/>
</operations>
<instance_attributes id="atrDummy1">
<attributes>
<nvpair id="atrDummy11" name="delay" value="1"/>
<nvpair id="atrDummy12" name="state" value="/var/run/heartbeat/rsctmp/Dummy1.state"/>
</attributes>
</instance_attributes>
</primitive>
</group>
<group id="grpDummy2">
<primitive id="prmDummy2" class="ocf" type="Dummy" provider="heartbeat">
<operations>
<op id="opDummy2Start" name="start" timeout="60s" on_fail="fence"/>
<op id="opDummy2Monitor" name="monitor" interval="10s" timeout="10s" on_fail="fence"/>
<op id="opDummy2Stop" name="stop" timeout="60s" on_fail="fence"/>
</operations>
<instance_attributes id="atrDummy2">
<attributes>
<nvpair id="atrDummy21" name="delay" value="1"/>
<nvpair id="atrDummy22" name="state" value="/var/run/heartbeat/rsctmp/Dummy2.state"/>
</attributes>
</instance_attributes>
</primitive>
</group>
</resources>
<constraints>
<rsc_location id="rlcDummy1" rsc="grpDummy1">
<rule score="300" id="rulNode11">
<expression value="guest1" attribute="#uname" operation="eq" id="expNode11"/>
</rule>
<rule score="200" id="rulNode12">
<expression value="guest2" attribute="#uname" operation="eq" id="expNode12"/>
</rule>
</rsc_location>
<rsc_location id="rlcDummy2" rsc="grpDummy2">
<rule score="300" id="rulNode21">
<expression value="guest1" attribute="#uname" operation="eq" id="expNode21"/>
</rule>
<rule score="200" id="rulNode22">
<expression value="guest2" attribute="#uname" operation="eq" id="expNode22"/>
</rule>
</rsc_location>
<rsc_location id="ping1:disconn" rsc="grpDummy1">
<rule id="ping1:disconn:rule" score="-INFINITY" boolean_op="and">
<expression id="ping1:disconn:expr:defined" attribute="default_ping_set" operation="defined"/>
<expression id="ping1:disconn:expr:positive" attribute="default_ping_set" operation="lt" value="100"/>
</rule>
</rsc_location>
<rsc_location id="ping2:disconn" rsc="grpDummy2">
<rule id="ping2:disconn:rule" score="-INFINITY" boolean_op="and">
<expression id="ping2:disconn:expr:defined" attribute="default_ping_set" operation="defined"/>
<expression id="ping2:disconn:expr:positive" attribute="default_ping_set" operation="lt" value="100"/>
</rule>
</rsc_location>
</constraints>
</configuration>
<status/>
</cib>
_______________________________________________
Linux-HA mailing list
[email protected]
http://lists.linux-ha.org/mailman/listinfo/linux-ha
See also: http://linux-ha.org/ReportingProblems