I use pacemaker and corosync to manage failover with two nodes in active/passive mode. I have configured a virtual IP resource as this:
# pcs resource create VirtualIP ocf:heartbeat:IPaddr2 \
ip=192.9.50.54 cidr_netmask=32 op monitor interval=1s timeout=5s \
start interval=0s timeout=30s
# pcs resource create PingIP ocf:pacemaker:ping dampen=5s multiplier=1000 host_list=@IP --clone
# pcs constraint location VirtualIP rule score=-INFINITY pingd lt 1 or not_defined pingd
where @IP is the IP address to ping.
Everything work fine, the VIP move over the node according to the ping. However when both node can not ping @IP, my resource VirtualIP is disabled. I would like in this case to keep the VirtualIP resource enabled on the last node where it was enabled.
I think that I have to modify the score of my resource VirtualIP according to the ping result, but I do not found how to do it.
Thanks for your help