[Pacemaker] help building 2 node config
Alex Samad - Yieldbroker
Alex.Samad at yieldbroker.com
Thu Mar 13 03:06:54 UTC 2014
Hi
I sent out an email to help convert an old config. Thought it might better to start from scratch.
I have 2 nodes, which run an application (sort of a reverse proxy).
Node A
Node B
I would like to use OCF:IPaddr2 so that I can load balance IP
# Create ybrp ip address
pcs resource create ybrpip ocf:heartbeat:IPaddr2 params ip=10.172.214.50 cidr_netmask=24 nic=eth0 clusterip_hash=sourceip-sourceport \
op start interval="0s" timeout="60s" \
op monitor interval="5s" timeout="20s" \
op stop interval="0s" timeout="60s" \
# Clone it
pcs resource clone ybrpip2 ybrpip meta master-max="2" master-node-max="2" clone-max="2" clone-node-max="1" notify="true" interleave="true"
This seems to work okay but I tested
On node B I ran this
crm_mon -1 ; iptables -nvL INPUT | head -5 ; ip a ; echo -n [ ; cat /proc/net/ipt_CLUSTERIP/10.172.214.50 ; echo ]
in particular I was watching /proc/net/ipt_CLUSTERIP/10.172.214.50
and I rebooted node A, I noticed ipt_CLUSTERIP didn't fail over ? I would have expected to see 1,2 in there on nodeB when nodeA failed
in fact when I reboot nodea it comes back with 2 in there ... that's not good !
pcs resource show ybrpip-clone
Clone: ybrpip-clone
Meta Attrs: master-max=2 master-node-max=2 clone-max=2 clone-node-max=1 notify=true interleave=true
Resource: ybrpip (class=ocf provider=heartbeat type=IPaddr2)
Attributes: ip=10.172.214.50 cidr_netmask=24 nic=eth0 clusterip_hash=sourceip-sourceport
Operations: start interval=0s timeout=60s (ybrpip-start-interval-0s)
monitor interval=5s timeout=20s (ybrpip-monitor-interval-5s)
stop interval=0s timeout=60s (ybrpip-stop-interval-0s)
pcs resource show ybrpip
Resource: ybrpip (class=ocf provider=heartbeat type=IPaddr2)
Attributes: ip=10.172.214.50 cidr_netmask=24 nic=eth0 clusterip_hash=sourceip-sourceport
Operations: start interval=0s timeout=60s (ybrpip-start-interval-0s)
monitor interval=5s timeout=20s (ybrpip-monitor-interval-5s)
stop interval=0s timeout=60s (ybrpip-stop-interval-0s)
so I think this has something todo with meta data..
I have another resource
pcs resource create ybrpstat ocf:yb:ybrp op monitor interval=5s
I want 2 of these one for nodeA and 1 for node B.
I want the IP address to be dependant on if this resource is available on the node. How can I do that ?
Alex
More information about the Pacemaker
mailing list