[ClusterLabs] IPAddr2 RA and CLUSTERIP local_node
Andrei Borzenkov
arvidjaar at gmail.com
Wed Sep 4 00:43:36 EDT 2019
04.09.2019 2:03, Tomer Azran пишет:
> 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"?
>
Can you show dump of envornent ob both nodes?
Anyway, it looks indeed questionable due to this manual statement:
--><--
The resource agent must not make any assumptions (based on
OCF_RESKEY_CRM_meta_clone) about which numerical instances are active.
In particular, the list of active copies will not always be an unbroken
sequence, nor always start at 0.
--><--
To me this sounds like RA agent assumption (OCF_RESKEY_CRM_meta_clone <
OCF_RESKEY_CRM_meta_clone_max) is not valid. Otherwise documentation
certainly needs clarification.
More information about the Users
mailing list