[Pacemaker] resource priority

Dennis Jacobfeuerborn dennisml at conversis.de
Fri Nov 8 23:15:52 UTC 2013


Hi,
I'm finally moving forward with creating a redundant gateway System for 
a network but I'm running into trouble. This is the configuration that 
I'm using:

node gw01 \
	attributes standby="off"
node gw02 \
	attributes standby="off"
primitive p_ip_gw_ext ocf:heartbeat:IPaddr2 \
	params ip="192.168.100.132" cidr_netmask="29" nic="eth0" \
	op monitor interval="10s"
primitive p_ip_gw_int ocf:heartbeat:IPaddr2 \
	params ip="192.168.214.4" cidr_netmask="24" nic="eth1" \
	op monitor interval="10s"
primitive p_route_ext ocf:heartbeat:Route \
	params destination="default" device="eth0" gateway="192.168.100.129" \
	op monitor interval="10" timeout="20" depth="0"
primitive p_route_int ocf:heartbeat:Route \
	params destination="default" device="eth1" gateway="192.168.214.1" \
	op monitor interval="10" timeout="20" depth="0"
group g_gateway p_ip_gw_ext p_ip_gw_int
colocation c_route_ext -inf: p_route_ext p_ip_gw_ext
colocation c_routes -inf: p_route_ext p_route_int
property $id="cib-bootstrap-options" \
	dc-version="1.1.10-1.el6_4.4-368c726" \
	cluster-infrastructure="cman" \
	stonith-enabled="false" \
	no-quorum-policy="ignore" \
	last-lrm-refresh="1383949342"

The setup is fairly simple. One IP on the public interface, one IP on 
the private interface. On the active system the default route is 
configured through the public interface, on the secondary system the 
default route is configured through the private interface.

The problem is that when I put the active node on standby the 
p_route_int resource stays on the secondary system and the p_route_ext 
resource gets stopped.

My interpretation is that since there is no explicit priority defined 
for either route and with only one node online only one route can be 
placed that pacemaker decides arbitrarily to keep p_route_int online and 
take p_route_ext offline.

What I really want to express is that p_route_ext should always be 
placed first and p_route_int only be placed if possible (i.e. forced 
migration) but if not should be taken offline instead (i.e. a node is down).
Any ideas on how to accomplish this?

Regards,
   Dennis




More information about the Pacemaker mailing list