0

I have a floating IP setup with a pacemaker ipaddr2 resource.

test-IP4       (ocf::heartbeat:IPaddr2):       Started node1

The floating IP is set to start on my ib0 interface. The ib0 port is connected to a network switch. When I disable the port on the network switch, the ib0 port goes down. But the resource does not fail. I can ping the the IP address from the same host but other hosts cannot ping it. Why is the resource not failing?

This is what it looks like before I disable the port on the switch.

ib0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 2044 qdisc pfifo_fast state UP group default qlen 256
    link/infiniband 80:00:02:08:fe:80:00:00:00:00:00:00:00:02:c9:03:00:18:97:71 brd 00:ff:ff:ff:ff:12:40:1b:ff:ff:00:00:00:00:00:00:ff:ff:ff:ff
    inet 192.168.2.168/24 brd 192.168.2.255 scope global noprefixroute ib0
       valid_lft forever preferred_lft forever

This is what it looks like when I disable the port on the switch.

ib0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 2044 qdisc pfifo_fast state DOWN group default qlen 256
    link/infiniband 80:00:02:08:fe:80:00:00:00:00:00:00:00:02:c9:03:00:18:97:71 brd 00:ff:ff:ff:ff:12:40:1b:ff:ff:00:00:00:00:00:00:ff:ff:ff:ff
    inet 192.168.2.168/24 brd 192.168.2.255 scope global noprefixroute ib0
       valid_lft forever preferred_lft forever
dev4life
  • 1
  • 1

1 Answers1

0

The virtual IP (IPaddr2) will not failover if the interface is failed. As per my experience, IPaddr2 will try to recover this, in its start call and remain on the same Node. The pacemaker uses a stonith to handle network issue but if are monitoring other networks then we can use ping resource to do failover.

There are 3 ways to address this issue

1. Stonith configuration Generally, network issue is handled by stonith agent, after configuring stonith, it fences the unhealthy node to avoid the split-brain problem.

2. Create a custom resource to monitor the network and put dependency of ipaddr resource on this resource, whenever there is a network fault it will be handled by custom resource.

3. Create pingd resource Create ocf:pacemaker:ping clone resource and add dependency rule on ipaddr as ping will fail after nework fail, the ipaddr will failover to healthy node.

pcs resource create ping_res ocf:pacemaker:ping dampen=5s multiplier=1000 host_list="node1 node2" clone

pcs constraint location ipaddr-name-res rule score=-INFINITY pingd lt 1 or not_defined pingd

If ping failed then -INFINITY porperty will be set for ipaddr-name-res resource

Ajay P.
  • 1
  • 2