Commit Graph

12 Commits

Author SHA1 Message Date
Jan Friesse
af4f8826dc timer-list: Rename delete and reschedule ops
Add entry to the name so it is more evident change is happening to the
entry and not to the list.

Signed-off-by: Jan Friesse <jfriesse@redhat.com>
2020-11-13 16:43:37 +01:00
Jan Friesse
fbc34f3b05 qnet: Add support for keep active partition vote
This patch adds qdevice-net part of keep active partition tie breaker
functionality. It's enabled by default.

When tie happens prefer partition with members of
previously active (quorate) partition. This is hard-coded
behavior of LMS algorithm so this setting affects only
FFSplit algorithm. By default it is disabled for backwards
compatibility.

This solves problem with FFSplit when node A (with lowest id) is killed,
node B gets vote and then node A starts up and creates single node
membership and gets vote.

Signed-off-by: Jan Friesse <jfriesse@redhat.com>
2020-10-27 17:22:46 +01:00
Jan Friesse
0013607e4b qdevice-net-heuristics: Fix log message
Signed-off-by: Jan Friesse <jfriesse@redhat.com>
2020-10-27 17:22:46 +01:00
Jan Friesse
8217e33e86 qdevice: Port qdevice to use pr-poll-loop
Signed-off-by: Jan Friesse <jfriesse@redhat.com>
2020-08-31 17:04:49 +02:00
Jan Friesse
6bf5f6c011 qdevice: Fix connect heuristics result callback
Previous patch 8dbf1bc8b0 was wrong
because it fixed the crash but made qdevice not work at all.

Correct solution is to test, if state is
QDEVICE_NET_INSTANCE_STATE_WAITING_INIT_REPLY.

Signed-off-by: Jan Friesse <jfriesse@redhat.com>
2020-08-28 08:57:15 +02:00
Jan Friesse
ae7d60290f heuristics: Remove qdevice instance pointer
Heuristics is designed to be component of its own, which doesn't depend
on qdevice_instance. Removing qdevice_instance pointer was easy as soon
as exec notifier got two user data pointers.

Signed-off-by: Jan Friesse <jfriesse@redhat.com>
2020-08-25 18:01:17 +02:00
Jan Friesse
8dbf1bc8b0 qdevice: Fix connect heuristics result callback
Qdevice may crash if server disconnect before connect
heuristics callback is processed.

This is quite hard to reproduce without adding sleep before
qdevice_net_heuristics_exec_after_connect call.

Solution is to check if qdevice is still connected and if it doesn't,
just throw away connect heuristics results.

Signed-off-by: Jan Friesse <jfriesse@redhat.com>
2020-08-12 15:52:18 +02:00
Jan Friesse
406b689d36 qdevice: Use EXIT_SUCCESS and EXIT_FAILURE codes
Signed-off-by: Jan Friesse <jfriesse@redhat.com>
2020-08-12 15:52:17 +02:00
liangxin1300
5cb2ff57f8 qdevice: Change log level to NOTICE on PASS
Previously when heuristics result became PASS it was logged as an error.
It shouldn't be and error message so change it to LOG_NOTICE level.

Signed-off-by: liangxin1300 <XLiang@suse.com>
Reviewed-by: Jan Friesse <jfriesse@redhat.com>
2020-03-13 08:50:08 +01:00
Jan Friesse
313d42d1e1 qdevice: Import log instead of qdevice-log
and move qdevice-log-debug to log-common to share it with qnetd.

Signed-off-by: Jan Friesse <jfriesse@redhat.com>
2019-08-12 17:47:39 +02:00
Jan Friesse
c8d19612c2 qdevice: Use log instead of libqb log
Signed-off-by: Jan Friesse <jfriesse@redhat.com>
2019-08-12 17:47:39 +02:00
Jan Friesse
9a1955a7d6 Initial import from corosync codebase
Used the code from corosync master
(31ddba64a2726bcedf81eb84df2e2da4846832f7)

Signed-off-by: Jan Friesse <jfriesse@redhat.com>
2018-01-23 14:24:36 +01:00