[Pacemaker] Understanding of autofailback and resource locations
Marc Mertes
mertes at uni-bonn.de
Thu Jun 24 11:32:23 UTC 2010
Hi everybody!
I have a pacemaker 1.0 with heartbeat 3.0.1 (active-passive system, 2
nodes) with drbd 8.3.7 on debian lenny.
Autofailback in ha.cf is set to on, and symetric cluster=true is set.
It is configured as HA-NFS-System and working good so far, after hours
of reading and trying.
There is just one thing left I did not understand yet, maybe someone has
the right hint for me.
If the 1st node goes down, then failover works well, but when the 1st
node is back again, the services won't move
back to the 1st node from alone.
Resource locations for the 1st node are defined with a score of 2000,
but the cluster don't care about that and keep all services on the 2nd node.
Only if I put my 2nd node into standby, all services switch back to the
1st node, or if I mirgrate them manually.
How do I have to configure the constraints that all service switch back
to the 1st node as fast as possible and automatically?
Below my config section for a detailed view
Best regards, Marc
<cib validate-with="pacemaker-1.0" crm_feature_set="3.0.1"
have-quorum="1" dc-uuid="0db4c09f-5856-41ce-9b05-51dba0addbe4"
admin_epoch="0" epoch="879" num_updates="8">
<configuration>
<crm_config>
<cluster_property_set id="cib-bootstrap-options">
<nvpair id="cib-bootstrap-options-dc-version" name="dc-version"
value="1.0.8-2c98138c2f070fcb6ddeab1084154cffbf44ba75"/>
<nvpair id="cib-bootstrap-options-cluster-infrastructure"
name="cluster-infrastructure" value="Heartbeat"/>
<nvpair id="cib-bootstrap-options-no-quorum-policy"
name="no-quorum-policy" value="ignore"/>
<nvpair name="last-lrm-refresh"
id="cib-bootstrap-options-last-lrm-refresh" value="1277369387"/>
<nvpair id="cib-bootstrap-options-default-resource-stickiness"
name="default-resource-stickiness" value="1000000"/>
<nvpair name="cluster-delay" id="cib-bootstrap-options-cluster-delay"
value="30s"/>
<nvpair id="cib-bootstrap-options-dc-deadtime" name="dc-deadtime"
value="20s"/>
<nvpair name="cluster-recheck-interval"
id="cib-bootstrap-options-cluster-recheck-interval" value="5min"/>
<nvpair id="cib-bootstrap-options-stonith-timeout"
name="stonith-timeout" value="30s"/>
<nvpair id="cib-bootstrap-options-start-failure-is-fatal"
name="start-failure-is-fatal" value="false"/>
</cluster_property_set>
</crm_config>
<nodes>
<node type="normal" uname="r003d-1"
id="1b0a8d37-9697-4c94-8bf5-6b43abec060a">
<instance_attributes id="nodes-1b0a8d37-9697-4c94-8bf5-6b43abec060a">
<nvpair name="standby"
id="nodes-1b0a8d37-9697-4c94-8bf5-6b43abec060a-standby" value="off"/>
</instance_attributes>
</node>
<node type="normal" uname="r003d-2"
id="0db4c09f-5856-41ce-9b05-51dba0addbe4">
<instance_attributes id="nodes-0db4c09f-5856-41ce-9b05-51dba0addbe4">
<nvpair name="standby"
id="nodes-0db4c09f-5856-41ce-9b05-51dba0addbe4-standby" value="off"/>
</instance_attributes>
</node>
</nodes>
<resources>
<primitive class="stonith" type="external/ipmi" id="IPMI-r003d-1">
<meta_attributes id="IPMI-r003d-1-meta_attributes">
<nvpair name="target-role" id="IPMI-r003d-1-meta_attributes-target-role"
value="stopped"/>
</meta_attributes>
<operations id="IPMI-r003d-1-operations">
<op id="IPMI-r003d-1-op-monitor-15" interval="15" name="monitor"
start-delay="15" timeout="15"/>
</operations>
<instance_attributes id="IPMI-r003d-1-instance_attributes">
<nvpair id="IPMI-r003d-1-instance_attributes-hostname" name="hostname"
value="r003d-2"/>
<nvpair id="IPMI-r003d-1-instance_attributes-ipaddr" name="ipaddr"
value="192.168.10.101"/>
<nvpair id="IPMI-r003d-1-instance_attributes-userid" name="userid"
value="ADMIN"/>
<nvpair id="IPMI-r003d-1-instance_attributes-passwd" name="passwd"
value="ADMIN"/>
<nvpair id="IPMI-r003d-1-instance_attributes-interface" name="interface"
value="lanplus"/>
</instance_attributes>
</primitive>
<primitive class="stonith" type="external/ipmi" id="IPMI-r003d-2">
<meta_attributes id="IPMI-r003d-2-meta_attributes">
<nvpair name="target-role" id="IPMI-r003d-2-meta_attributes-target-role"
value="stopped"/>
</meta_attributes>
<operations id="IPMI-r003d-2-operations">
<op id="IPMI-r003d-2-op-monitor-15" interval="15" name="monitor"
start-delay="15" timeout="15"/>
</operations>
<instance_attributes id="IPMI-r003d-2-instance_attributes">
<nvpair id="IPMI-r003d-2-instance_attributes-hostname" name="hostname"
value="r003d-1"/>
<nvpair id="IPMI-r003d-2-instance_attributes-ipaddr" name="ipaddr"
value="192.168.10.100"/>
<nvpair id="IPMI-r003d-2-instance_attributes-userid" name="userid"
value="ADMIN"/>
<nvpair id="IPMI-r003d-2-instance_attributes-passwd" name="passwd"
value="ADMIN"/>
<nvpair id="IPMI-r003d-2-instance_attributes-interface" name="interface"
value="lanplus"/>
</instance_attributes>
</primitive>
<master id="ms_DRBD">
<meta_attributes id="ms_DRBD-meta_attributes">
<nvpair id="ms_DRBD-meta_attributes-clone-max" name="clone-max" value="2"/>
<nvpair id="ms_DRBD-meta_attributes-notify" name="notify" value="true"/>
<nvpair name="target-role" id="ms_DRBD-meta_attributes-target-role"
value="Started"/>
<nvpair id="ms_DRBD-meta_attributes-master-max" name="master-max"
value="1"/>
<nvpair id="ms_DRBD-meta_attributes-master-node-max"
name="master-node-max" value="1"/>
<nvpair id="ms_DRBD-meta_attributes-clone-node-max"
name="clone-node-max" value="1"/>
<nvpair id="ms_DRBD-meta_attributes-globally-unique"
name="globally-unique" value="false"/>
</meta_attributes>
<primitive class="ocf" id="res_DRBD" provider="linbit" type="drbd">
<operations id="res_DRBD-operations">
<op id="res_DRBD-op-monitor-Slave-20" interval="20" name="monitor"
role="Slave" start-delay="1m" timeout="20"/>
<op id="res_DRBD-op-monitor-Master-10" interval="10" name="monitor"
role="Master" start-delay="1m" timeout="20"/>
</operations>
<instance_attributes id="res_DRBD-instance_attributes">
<nvpair id="res_DRBD-instance_attributes-drbd_resource"
name="drbd_resource" value="r0"/>
</instance_attributes>
</primitive>
</master>
<primitive class="ocf" provider="heartbeat" type="Filesystem"
id="res_Filesys">
<meta_attributes id="res_Filesys-meta_attributes">
<nvpair name="target-role" id="res_Filesys-meta_attributes-target-role"
value="Started"/>
</meta_attributes>
<operations id="res_Filesys-operations">
<op id="res_Filesys-op-monitor-20" interval="20" name="monitor"
timeout="40"/>
</operations>
<instance_attributes id="res_Filesys-instance_attributes">
<nvpair id="res_Filesys-instance_attributes-device" name="device"
value="/dev/drbd0"/>
<nvpair id="res_Filesys-instance_attributes-directory" name="directory"
value="/data"/>
<nvpair id="res_Filesys-instance_attributes-fstype" name="fstype"
value="xfs"/>
<nvpair id="res_Filesys-instance_attributes-options" name="options"
value="noatime,nodiratime,quota"/>
</instance_attributes>
</primitive>
<group id="res_storage">
<meta_attributes id="res_storage-meta_attributes">
<nvpair name="target-role" id="res_storage-meta_attributes-target-role"
value="started"/>
</meta_attributes>
<primitive class="ocf" id="res_IP-r003d" provider="heartbeat"
type="IPaddr2">
<operations id="res_IP-r003d-operations">
<op id="res_IP-r003d-op-monitor-10s" interval="10s" name="monitor"
timeout="20s"/>
</operations>
<instance_attributes id="res_IP-r003d-instance_attributes">
<nvpair id="res_IP-r003d-instance_attributes-ip" name="ip"
value="192.168.3.55"/>
<nvpair id="res_IP-r003d-instance_attributes-cidr_netmask"
name="cidr_netmask" value="24"/>
<nvpair id="res_IP-r003d-instance_attributes-nic" name="nic" value="eth0"/>
</instance_attributes>
</primitive>
<primitive class="lsb" id="res_nfs-common" type="nfs-common">
<operations id="res_nfs-common-operations">
<op id="res_nfs-common-op-monitor-15" interval="15" name="monitor"
start-delay="15" timeout="15"/>
</operations>
</primitive>
<primitive class="lsb" id="res_nfs-kernel-server" type="nfs-kernel-server">
<operations id="res_nfs-kernel-server-operations">
<op id="res_nfs-kernel-server-op-monitor-10" interval="10"
name="monitor" timeout="20s"/>
</operations>
</primitive>
</group>
</resources>
<constraints>
<rsc_location id="res_loc_IPMI-r003d-1" node="r003d-2"
rsc="IPMI-r003d-1" score="-INFINITY"/>
<rsc_location id="res_loc_IPMI-r003d-2" node="r003d-1"
rsc="IPMI-r003d-2" score="-INFINITY"/>
<rsc_location id="res_loc_ms_DRBD" node="r003d-1" rsc="ms_DRBD"
score="2000"/>
<rsc_colocation id="res_coloc_Filesys" rsc="res_Filesys"
score="INFINITY" with-rsc="ms_DRBD" with-rsc-role="Master"/>
<rsc_order first="ms_DRBD" first-action="promote" id="res_order_Filesys"
then="res_Filesys" then-action="start"/>
<rsc_location id="res_loc_Filesys" node="r003d-1" rsc="res_Filesys"
score="2000"/>
<rsc_colocation id="res_coloc_storage" rsc="res_storage"
score="INFINITY" with-rsc="res_Filesys" with-rsc-role="Started"/>
<rsc_order first="res_Filesys" id="res_order_storage" symmetrical="true"
then="res_storage"/>
</constraints>
<rsc_defaults>
<meta_attributes id="rsc_defaults-options">
<nvpair id="rsc_defaults-options-resource-stickiness"
name="resource-stickiness" value="2000"/>
</meta_attributes>
</rsc_defaults>
</configuration>
</cib>
More information about the Pacemaker
mailing list