[Pacemaker] How to make the 1st resources to failover is 2nd resources is being killed?
Paul Sun
paul.sun at syniverse.com
Fri Mar 15 04:21:29 CET 2013
I noticed that I need to configure the "failover-timeout" together with "migration-threshold" in order to achieve the expected failover behavior, is this the correct implementation? Can advice?
<nodes>
<node id="HA_NODE1" uname="HA_NODE1"/>
<node id="HA_NODE2" uname="HA_NODE2"/>
<node id="HA_NODE3" uname="HA_NODE3"/>
</nodes>
<resources>
<primitive class="lsb" id="PDNS-Recursor" type="pdns_recursord">
<meta_attributes id="PDNS-Recursor-meta_attributes">
<nvpair id="PDNS-Recursor-meta_attributes-migration-threshold" name="migration-threshold" value="1"/>
<nvpair id="PDNS-Recursor-meta_attributes-failure-timeout" name="failure-timeout" value="30"/>
</meta_attributes>
<operations>
<op id="PDNS-Recursor-monitor-30s" interval="30s" name="monitor" on-fail="restart"/>
</operations>
</primitive>
<primitive class="ocf" id="FloatingIP_02" provider="heartbeat" type="IPaddr2">
<instance_attributes id="FloatingIP_02-instance_attributes">
<nvpair id="FloatingIP_02-instance_attributes-ip" name="ip" value="192.168.206.160"/>
<nvpair id="FloatingIP_02-instance_attributes-cidr_netmask" name="cidr_netmask" value="32"/>
<nvpair id="FloatingIP_02-instance_attributes-nic" name="nic" value="eth2"/>
<nvpair id="FloatingIP_02-instance_attributes-iflabel" name="iflabel" value="vip2"/>
</instance_attributes>
<operations>
<op id="FloatingIP_02-monitor-30s" interval="30s" name="monitor"/>
</operations>
<meta_attributes id="FloatingIP_02-meta_attributes">
<nvpair id="FloatingIP_02-meta_attributes-resource-stickiness" name="resource-stickiness" value="1000"/>
</meta_attributes>
</primitive>
<constraints>
<rsc_colocation id="PDNS-Recursor-Services" rsc="PDNS-Recursor" score="INFINITY" with-rsc="FloatingIP_02"/>
<rsc_location id="PDNS-Recursor-prefer1" node="HA_NODE1" rsc="PDNS-Recursor" score="-INFINITY"/>
<rsc_location id="PDNS-Recursor-prefer2" node="HA_NODE2" rsc="PDNS-Recursor" score="400"/>
<rsc_location id="PDNS-Recursor-prefer3" node="HA_NODE3" rsc="PDNS-Recursor" score="300"/>
<rsc_order first="FloatingIP_02" id="PDNS-Recursor-Order" score="INFINITY" then="PDNS-Recursor"/>
<rsc_location id="PDNS-IP-prefer1" node="HA_NODE1" rsc="FloatingIP_02" score="-INFINITY"/>
</constraints>
-----Original Message-----
From: Paul Sun
Sent: Friday, March 15, 2013 10:14 AM
To: 'The Pacemaker cluster resource manager'
Subject: RE: How to make the 1st resources to failover is 2nd resources is being killed?
Thanks for the information, however, it only works for 1 times. The behavior is exactly same as the previous posts " http://www.mail-archive.com/pacemaker@oss.clusterlabs.org/msg00415.html"
When I killed the application for the 1st time, it will failover to other node, but when I terminate the application in the new node, it will never failover back, and the status is "stopped".
Any idea?
> Anyone can help?
Set migration-threshold.
And: this is a public community mailing list. Pinging after a few hours is not good style. If you need help that urgently, some people sell consulting for this.
Regards,
Lars
--
Architect Storage/HA
SUSE LINUX Products GmbH, GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer, HRB 21284 (AG Nürnberg) "Experience is the name everyone gives to their mistakes." -- Oscar Wilde
-----Original Message-----
From: Paul Sun
Sent: Thursday, March 14, 2013 6:20 PM
To: 'The Pacemaker cluster resource manager'
Subject: RE: How to make the 1st resources to failover is 2nd resources is being killed?
Anyone can help?
-----Original Message-----
From: Paul Sun
Sent: Thursday, March 14, 2013 4:16 PM
To: The Pacemaker cluster resource manager
Subject: How to make the 1st resources to failover is 2nd resources is being killed?
Hi
I have 3 node setup, the FloatingIP_02 and PDNS-Recursor serve for the same purpose. The PDNS-Recursor can only be started if FloatingIP_02 is presented on the same node. I would like to configure such that if I terminate PDNS-Recursor, the FloatingIP_02 together with PDNS-Recursor will be failed over to node2.
Below is my configuration.
Thanks
- Paul
node HA_NODE1
node HA_NODE2
node HA_NODE3
primitive FloatingIP_02 ocf:heartbeat:IPaddr2 \
params ip="192.168.206.160" cidr_netmask="32" nic="eth2" iflabel="vip2" \
op monitor interval="30s" \
meta resource-stickiness="1000"
primitive PDNS-Recursor lsb:pdns_recursord \
op monitor interval="30s"
location PDNS-IP-prefer1 FloatingIP_02 -inf: HA_NODE1 location PDNS-IP-prefer2 FloatingIP_02 400: HA_NODE2 location PDNS-IP-prefer3 FloatingIP_02 300: HA_NODE3 location PDNS-Recursor-prefer1 PDNS-Recursor -inf: HA_NODE1 colocation PDNS-Recursor-Services inf: PDNS-Recursor FloatingIP_02 order PDNS-Recursor-Order inf: FloatingIP_02 PDNS-Recursor property $id="cib-bootstrap-options" \
dc-version="1.1.8-7.el6-394e906" \
cluster-infrastructure="classic openais (with plugin)" \
expected-quorum-votes="3" \
stonith-enabled="true" \
no-quorum-policy="ignore" \
last-lrm-refresh="1363236700"
More information about the Pacemaker
mailing list