ClusterLabs / resource-agents

Combined repository of OCF agents from the RHCS and Linux-HA projects
GNU General Public License v2.0
494 stars 580 forks source link

conntrackd RA doesn't work with colocation #99

Closed sarmiena closed 12 years ago

sarmiena commented 12 years ago

Hello

I'm having a problem getting conntrackd ms to work with a colocation constraint. I need to have Master conntrackd only on the node that has the "lip" IPaddr2 primitive running on it.

Here are my specs:

Ubuntu: 12.04
corosync: 1.4.2
crm: 1.1.6
conntrackd: 1.0.0

Here is my configuration (notice I weighted the fw02 higher than fw01 to test my failover):

node fw01 \
    attributes firewall="100"
node fw02 \
    attributes firewall="150"
primitive lip ocf:heartbeat:IPaddr2 \
    meta target-role="Started" \
    params ip="192.168.100.2" cidr_netmask="24" nic="eth0"
primitive updated-conntrackd ocf:updates:conntrackd
ms conntrackd updated-conntrackd \
    meta master-max="1" master-node-max="1" clone-max="2" clone-node-max="1" notify="true" target-role="Master"
location conntrackd-run conntrackd \
    rule $id="conntrackd-run-rule-0" -inf: not_defined firewall or firewall number:lte 0 \
    rule $id="conntrackd-run-rule-1" firewall: defined firewall
location lip-loc lip \
    rule $id="lip-loc-rule-0" -inf: not_defined firewall or firewall number:lte 0 \
    rule $id="lip-loc-rule-1" firewall: defined firewall
colocation conntrackd-loc inf: conntrackd:Master lip:Started
property $id="cib-bootstrap-options" \
    dc-version="1.1.6-9971ebba4494012a93c03b40a2c58ec0eb60f50c" \
    cluster-infrastructure="openais" \
    expected-quorum-votes="2" \
    symmetric-cluster="false" \
    no-quorum-policy="ignore" \
    stonith-enabled="false" \
    last-lrm-refresh="1339040513"

So based on my configuration above, I would expect conntrackd to be Master on fw02, but it's not:

root@fw01:~# crm status
============
Last updated: Wed Jun  6 20:46:55 2012
Last change: Wed Jun  6 20:41:53 2012 via crmd on fw01
Stack: openais
Current DC: fw01 - partition with quorum
Version: 1.1.6-9971ebba4494012a93c03b40a2c58ec0eb60f50c
2 Nodes configured, 2 expected votes
3 Resources configured.
============

Online: [ fw01 fw02 ]

 Master/Slave Set: conntrackd [updated-conntrackd]
     Masters: [ fw01 ]
     Slaves: [ fw02 ]
 lip    (ocf::heartbeat:IPaddr2):   Started fw02

Interesting thing is... if I add "lip" to a group with another primitive and run the same logic, failover works just fine:

root@fw01:~# crm configure show
node fw01 \
    attributes firewall="100"
node fw02 \
    attributes firewall="150"
primitive lip ocf:heartbeat:IPaddr2 \
    params ip="192.168.100.2" cidr_netmask="24" nic="eth0"
primitive lip2 ocf:heartbeat:IPaddr2 \
    params ip="192.168.100.101" cidr_netmask="24" nic="eth0"
primitive updated-conntrackd ocf:updates:conntrackd
group gateway lip lip2 \
    meta target-role="Started"
ms conntrackd updated-conntrackd \
    meta master-max="1" master-node-max="1" clone-max="2" clone-node-max="1" notify="true" target-role="Master"
location conntrackd-run conntrackd \
    rule $id="conntrackd-run-rule-0" -inf: not_defined firewall or firewall number:lte 0 \
    rule $id="conntrackd-run-rule-1" firewall: defined firewall
location gateway-loc gateway \
    rule $id="lip-loc-rule-0" -inf: not_defined firewall or firewall number:lte 0 \
    rule $id="lip-loc-rule-1" firewall: defined firewall
colocation conntrackd-loc inf: conntrackd:Master gateway:Started
property $id="cib-bootstrap-options" \
    dc-version="1.1.6-9971ebba4494012a93c03b40a2c58ec0eb60f50c" \
    cluster-infrastructure="openais" \
    expected-quorum-votes="2" \
    symmetric-cluster="false" \
    no-quorum-policy="ignore" \
    stonith-enabled="false" \
    last-lrm-refresh="1339041080"
root@fw01:~# crm status
============
Last updated: Wed Jun  6 20:52:17 2012
Last change: Wed Jun  6 20:52:03 2012 via cibadmin on fw01
Stack: openais
Current DC: fw01 - partition with quorum
Version: 1.1.6-9971ebba4494012a93c03b40a2c58ec0eb60f50c
2 Nodes configured, 2 expected votes
4 Resources configured.
============

Online: [ fw01 fw02 ]

 Master/Slave Set: conntrackd [updated-conntrackd]
     Masters: [ fw02 ]
     Slaves: [ fw01 ]
 Resource Group: gateway
     lip    (ocf::heartbeat:IPaddr2):   Started fw02
     lip2   (ocf::heartbeat:IPaddr2):   Started fw02
fghaas commented 12 years ago

This is probably unrelated to the resource agent, and possibly points to a Policy Engine issue. Please post this issue to the Pacemaker mailing list, and be sure to include a link to a full CIB dump created with cibadmin -Q and uploaded to pastebin (or similar).