[ClusterLabs] IPAddr2 RA and CLUSTERIP local_node

Tomer Azran tomer.azran at edp.co.il
Tue Sep 3 19:03:42 EDT 2019


Hello,

When using IPaddr2 RA in order to set a cloned IP address resource:

pcs resource create vip1 ocf:heartbeat:IPaddr2 ip=10.0.0.100 iflabel=vip1 cidr_netmask=24 flush_routes=true op monitor interval=30s
pcs resource clone vip1 clone-max=2 clone-node-max=2 globally-unique=true

Then the cluster set the iptables CLUSTERIP module, and the result is something like that:

# iptables -L -n
.
.
.
CLUSTERIP  all  --  0.0.0.0/0            10.0.0.100         CLUSTERIP hashmode=sourceip-sourceport clustermac=A1:DE:DE:89:A6:FE total_nodes=2 local_node=2 hash_init=0
.
.
.

The problem is that on both nodes, I can see that the local_node value on the CLUSTERIP is the same ("2")
I looked on the RA source code, at https://github.com/ClusterLabs/resource-agents/blob/master/heartbeat/IPaddr2,  and found that the local-node parameter is set to this value:

IP_INC_NO=`expr ${OCF_RESKEY_CRM_meta_clone:-0} + 1`

Can you think of a reason why my RA always set the local_node to "2"?


Tomer Azran
IDM & LINUX Professional Services

tomer.azran at edp.co.il
m: +972-52-6389961
t: +972-3-6438222
f: +972-3-6438004 

www.edp.co.il



More information about the Users mailing list