]> git.proxmox.com Git - mirror_corosync-qdevice.git/commit
qnetd: Improve dead peer detection
authorJan Friesse <jfriesse@redhat.com>
Wed, 18 Nov 2020 13:31:01 +0000 (14:31 +0100)
committerJan Friesse <jfriesse@redhat.com>
Wed, 18 Nov 2020 14:05:21 +0000 (15:05 +0100)
commita8b7513df9050777a31dd4ebc7b82c82f60d2721
tree42852c36b6bf6ff9ea456ccb57911096ddfafe74
parent8211cf239403839d652b43eb0a83dd5136a94f6d
qnetd: Improve dead peer detection

Previously dead peer detection timer was scheduled every dpd_interval,
added dpd_interval to all of the clients timestamp and if timestamp was
larger than client hearbeat interval * 1.2 then check if client sent
some message. If so, flag was reset.

This method was source of number of problems so instead different method
is now used.

Every single client has its own timer with timeout based on
(configurable) dpd_interval_coefficient and multiplied with
client heartbeat timeout. When message is received from client timer is
rescheduled. When timer callback is called (= client doesn't sent
message during timeout) then client is disconnected.

Signed-off-by: Jan Friesse <jfriesse@redhat.com>
16 files changed:
man/corosync-qnetd.8
qdevices/Makefile.am
qdevices/corosync-qnetd.c
qdevices/qnet-config.h
qdevices/qnetd-advanced-settings.c
qdevices/qnetd-advanced-settings.h
qdevices/qnetd-client-dpd-timer.c [new file with mode: 0644]
qdevices/qnetd-client-dpd-timer.h [new file with mode: 0644]
qdevices/qnetd-client-msg-received.c
qdevices/qnetd-client-net.c
qdevices/qnetd-client.c
qdevices/qnetd-client.h
qdevices/qnetd-dpd-timer.c [deleted file]
qdevices/qnetd-dpd-timer.h [deleted file]
qdevices/qnetd-instance.c
qdevices/qnetd-instance.h