On Fri, 2018-07-20 at 08:41 +0800, Confidential Company wrote: > I configured ping-RA via ocf:pacemaker. During testing the resource- > agent works fine, it executes ping action to my gateway every 10 > seconds and 3 attempts. But I noticed that even I disconnect the > physical link of node where the resource resides, it doesnt failover > to other node.
The ping agent by itself only sets a node attribute. Failover requires additional constraints: http://clusterlabs.org/pacemaker/doc/en-US/Pacemaker/1.1/html-single/Pacemaker_Explained/index.html#_moving_resources_due_to_connectivity_changes > > > IP CONFIG: > > 172.16.10.0/24 = interface to gateway > 172.16.11.0/24= heartbeat link (interface to avoid split brain as my > goal is to only failover ping-resource after 3-attempts failure to > ping my gateway) > > CONFIG: > > [root@node1 ~]# pcs config > Cluster Name: clusterPa > Corosync Nodes: > node1 node2 > Pacemaker Nodes: > node1 node2 > > Resources: > Resource: ping-gateway (class=ocf provider=pacemaker type=ping) > Attributes: host_list=172.16.10.1 > Operations: monitor interval=10 timeout=60 (ping-gateway-monitor- > interval-10) > start interval=0s timeout=60 (ping-gateway-start- > interval-0s) > stop interval=0s timeout=20 (ping-gateway-stop- > interval-0s) > > Stonith Devices: > Fencing Levels: > > Location Constraints: > Ordering Constraints: > Colocation Constraints: > Ticket Constraints: > > Alerts: > No alerts defined > > Resources Defaults: > No defaults set > Operations Defaults: > No defaults set > > Cluster Properties: > cluster-infrastructure: corosync > cluster-name: clusterPa > dc-version: 1.1.16-12.el7-94ff4df > have-watchdog: false > last-lrm-refresh: 1531899781 > stonith-enabled: false > > Quorum: > Options: > [root@node1 ~]# > _______________________________________________ > Users mailing list: Users@clusterlabs.org > https://lists.clusterlabs.org/mailman/listinfo/users > > Project Home: http://www.clusterlabs.org > Getting started: http://www.clusterlabs.org/doc/Cluster_from_Scratch. > pdf > Bugs: http://bugs.clusterlabs.org -- Ken Gaillot <kgail...@redhat.com> _______________________________________________ Users mailing list: Users@clusterlabs.org https://lists.clusterlabs.org/mailman/listinfo/users Project Home: http://www.clusterlabs.org Getting started: http://www.clusterlabs.org/doc/Cluster_from_Scratch.pdf Bugs: http://bugs.clusterlabs.org