1

I have a server cluster consisted of following setup:

2 Virtual Servers with 2 NIC's. eth0 (private network 10.0.0.0/16) and eth1 (public network 77.1.2.0/24 with gateway as 77.1.2.1)

For HA-01 VPS i have Private IP on eth0 set as 10.0.0.1 For HA-02 VPS i have Private IP set on eth0 as 10.0.0.2

Pacemaker/Corosync Cluster has been established between private IP addresses and Virtual IP (77.1.2.4) defined as clone Resource (IPAddr2) so it can float between two nodes.

pcs resource create VirtualIP1 ocf:heartbeat:IPaddr2 ip="77.1.2.4" cidr_netmask="24" nic="eth1" clusterip_hash="sourceip-sourceport" op start interval="0s" timeout="60s" op monitor interval="1s" timeout="20s" op stop interval="0s" timeout="60s" clone interleave=true ordered=true

Problem is, i cannot reach that IP address from world. I noticed that there is a route missing, so i add the static route

ip r add default via 77.1.2.1 dev eth1

But i still cannot ping google.com from those servers nor world can see them on that IP. I also tried adding IP addresses from same subnet on eth1 like this:

HA-01 eth1: 77.1.2.2
HA-02 eth1: 77.1.2.3

Servers can be seen on those IPs by world but if i add VirtualIP resource i cannot reach them on Virtual IP address. I also tried adding a source ip in routing table

ip r add default via 77.1.2.1 src 77.1.2.4

to no avail. I don't know what am i supposed to do to get this VirtualIP working. I can reach 77.1.2.4 (Virtual IP Address) from other servers on that network, but not outside that network.

Firewall is established and high availability ports are passed via command

firewall-cmd --add-service="high availability"; firewall-cmd --add-service="high availability" --permanent

Is there anything here that i am missing? If i add that address (77.1.2.4 - Virtual IP) alone on the interface of only one of those servers, it will work.... So is there an issue with ARP table perhaps or maybe router blocking some traffic?

ctrl-alt-delor
  • 27,473
  • 9
  • 58
  • 102
Marko Todoric
  • 357
  • 2
  • 17

1 Answers1

0

Take a look on this question: https://serverfault.com/questions/778997/pacemaker-virtual-ip-loadbalancing-with-clone-and-clusterip

I think that this is an route problem. Try the last comment made in the question, by strzelecki.maciek. He apply some iptables prerouting that helped. Maybe is your case.

  • I kind of gave up on this setup since it had some sort of flaw beside virtual ip. But i will test it out under other circumstances when need comes up for that. Thanks !! – Marko Todoric Sep 01 '19 at 17:40