I’m having trouble with setting up a cluster which contains two nodes. I want to setup a cluster with two centos nodes with a floating ip address and all packet which sends out from my active cluster node be from Virtual_IP not from the IP that is registered directly onto the NIC.
For this purpose I create two resource ocf_heartbeat_IPaddr2 and ocf:heartbeat:IPsrcaddr with these commands.
pcs resource create virtual_ip ocf:heartbeat:IPaddr2 ip=192.168.100.10 cidr_netmask=24 op monitor interval=30s
pcs resource create src_ip ocf:heartbeat:IPsrcaddr ipaddress=192.168.100.10 cidr_netmask=24 op monitor interval=30
then I create a group of two resources for ordering resource and create a constraint.
pcs resource group add IPS virtual_ip src_ip pcs constraint order set virtual_ip src_ip
but my src_ip resource is stopped. I want to all incoming packet and outgoing packet from my cluster be from virtual ip. IPaddr2 resource is started and fine but I dont know why IPsrcaddr is stopped ?