[ClusterLabs] ocf:pacemaker:ping every X seconds

Andrei Borzenkov arvidjaar at gmail.com
Fri Oct 9 02:10:08 EDT 2020


09.10.2020 08:21, Rohit Saini пишет:
> Hi Team,
> I am using  ocf:pacemaker:ping resource to check aliveness of a machine
> every X seconds. As I understand, monitor interval 'Y' will cause ping to
> happen every 'Y' seconds. So, for my case, Y should be equal to X?
> I do not see this behavior though. I see pings happening every 7 seconds.

No. What you see is ping *failing* every 7 seconds (BTW second interval
is 9 seconds, not 7). If you want to see every ping, add debug output to
agent to log also successful ping.

> 1) How is 7 sec coming here?
> 2) What do I need to do to make ping happen every X seconds.
> 
> *Configuration:*
> pcs resource delete rsc1
> pcs resource create rsc1 ocf:pacemaker:ping host_list="192.168.168.3"
> debug=true attempts=3 timeout=200ms
> pcs resource update rsc1 op monitor interval=2s
> 
> *Pcs config:*
> [root at rohit-abc1 ~]# pcs config
> Cluster Name: ucc1
> Corosync Nodes:
>  rohit-abc1 rohit-abc2
> Pacemaker Nodes:
>  rohit-abc1 rohit-abc2
> 
> Resources:
>  Master: ucc1-master
>   Meta Attrs: master-node-max=1 clone-max=2 ordered=true master-max=1
> notify=true clone-node-max=1
>   Resource: ucc1 (class=ocf provider=pw type=uc)
>    Attributes: state=/var/run/uc/role
>    Operations: demote interval=0 on-fail=restart timeout=20
> (ucc1-demote-interval-0)
>                monitor interval=10 role=Master timeout=20
> (ucc1-monitor-interval-10)
>                monitor interval=11 role=Slave timeout=20
> (ucc1-monitor-interval-11)
>                promote interval=0 on-fail=restart timeout=20
> (ucc1-promote-interval-0)
>                start interval=0s timeout=20 (ucc1-start-interval-0s)
>                stop interval=0s timeout=20 (ucc1-stop-interval-0s)
>  Resource: rsc1 (class=ocf provider=pacemaker type=ping)
>   Attributes: attempts=3 debug=true host_list=192.168.168.3 timeout=200ms
>   Operations: monitor interval=2s (rsc1-monitor-interval-2s)
>               start interval=0s timeout=60 (rsc1-start-interval-0s)
>               stop interval=0s timeout=20 (rsc1-stop-interval-0s)
> 
> *Output:*
> [root at rohit~]# taillog |grep 192.168.168.3
> 2020-10-09T05:16:54.628154+00:00 rohit ping(rsc1)[1721]: WARNING:
> 192.168.168.3 is inactive
> 2020-10-09T05:17:01.427983+00:00 rohit ping(rsc1)[1778]: WARNING:
> 192.168.168.3 is inactive
> 2020-10-09T05:17:10.194989+00:00 rohit ping(rsc1)[1858]: WARNING:
> 192.168.168.3 is inactive
> 
> Thanks,
> Rohit
> 
> 
> _______________________________________________
> Manage your subscription:
> https://lists.clusterlabs.org/mailman/listinfo/users
> 
> ClusterLabs home: https://www.clusterlabs.org/
> 



More information about the Users mailing list