mirror_corosync/exec
Jan Friesse 4eb3629728 quorum: Add support for nodelist callback
Current quorum callback contains only actual view list and there is no
way how to find out joined/left nodes. This cannot be emulated by user
app, because when corosync restarts before other nodes notices then view
list is unchanged (ring id is changed tho).

Solution is to implement similar callback as for cpg which contains ring
id, member list, joined list and left list.

To implement such callback and keep backwards compatibility,
quorum_model_initialize is introduced. Its behavior is similar to
cpg_model_initialize. This allows passing model v1, which contains
enhanced quorum (full ring id is passed instead of just seq number)
and nodelist callbacks.

To find out which events should be sent by corosync daemon, new message
MESSAGE_REQ_QUORUM_MODEL_GETTYPE is used. Quorum library on init was
sending MESSAGE_REQ_QUORUM_GETTYPE. Whem model v1 is requested the
MESSAGE_REQ_QUORUM_MODEL_GETTYPE is used, which contains model number
so corosync knows that client is using model v1 and can send enhanced
quorum and nodelist events.

Nodelist event is (for now) send both in case of change of membership
and also when requested, also when CS_TRACK_CURRENT is requested, but
then left_list and joined_list is left empty, because they don't make
too much sense there.

New test application testquorummodel is added as an example of new API
usage.

Also during patch developement, I found few bugs here and there, which
are also fixed:
- quorum_initialize was never returning error code returned by
  MESSAGE_REQ_QUORUM_GETTYPE call (always returned CS_OK)
- Allocated memory in send_library_notification was based
  on sizeof(unsigned int) instead of mar_uint32_t. That's not wrong,
  but   it make more sense to use sizeof(mar_uint32_t) instead

(big thanks to Chrissie for englishify the man pages)

Signed-off-by: Jan Friesse <jfriesse@redhat.com>
Reviewed-by: Christine Caulfield <ccaulfie@redhat.com>
2020-10-12 13:22:11 +02:00
..
.gitignore Add .gitignore files. 2010-10-21 07:43:46 -07:00
apidef.c CFG: Remove ring-reenable code 2017-08-03 14:32:02 +02:00
apidef.h Update copyright header dates in exec directory 2012-02-13 17:05:04 -07:00
cfg.c cfg: enhance message_handler_req_lib_cfg_killnode 2020-09-17 15:26:10 +02:00
cmap.c cmap: Assert copied string length 2019-11-28 09:44:44 +01:00
coroparse.c knet: Use block_unlisted_ips 2019-05-29 16:30:18 +02:00
cpg.c cpg: Change downlist log level 2020-01-09 12:40:32 +01:00
cs_queue.h Update copyright header dates in exec directory 2012-02-13 17:05:04 -07:00
fsm.h Make logging of WD and MON service correct 2012-08-16 14:45:15 +02:00
icmap.c icmap: icmap_init_r() leaks if trie_create() fails 2020-03-26 14:42:41 +01:00
ipc_glue.c main: Move sched paramaters to config file 2018-11-15 17:30:03 +01:00
ipcs_stats.h stats: Add cmap key to clear the various stats. 2017-10-31 17:39:14 +01:00
logconfig.c logconfig: Remove double free of value 2019-11-28 09:44:44 +01:00
logconfig.h list: Replace uses of list.h with qblist.h 2016-10-27 14:56:52 +02:00
logsys.c logsys: Support hires timestamp 2018-10-29 17:45:29 +01:00
main.c config: Allow reconfiguration of crypto options 2020-07-09 16:54:16 +02:00
main.h main: Replace COROSYNC_MAIN_CONFIG_FILE 2018-11-15 17:30:14 +01:00
Makefile.am nozzle: Add support for libnozzle devices 2019-02-26 13:11:35 +01:00
mon.c list: Replace uses of list.h with qblist.h 2016-10-27 14:56:52 +02:00
pload.c build: bring SOLARIS up to the same standard as other OSes 2012-08-30 15:00:27 +02:00
quorum.c Remove redundant header file inclusion 2016-12-05 09:59:08 +01:00
quorum.h Update copyright header dates in exec directory 2012-02-13 17:05:04 -07:00
schedwrk.c schedwrk: Cleanup and make it work on PPC BE 2016-05-17 16:29:25 +02:00
schedwrk.h Update copyright header dates in exec directory 2012-02-13 17:05:04 -07:00
service.c service: Fix memleak in service_unlink_and_exit 2013-06-21 11:21:29 +02:00
service.h service: remove leftovers from mt corosync 2012-08-09 15:10:16 +02:00
stats.c stats: Add stats for scheduler misses 2020-01-22 17:06:10 +01:00
stats.h stats: Add stats for scheduler misses 2020-01-22 17:06:10 +01:00
sync.c sync: Assert sync_callbacks.name length 2019-11-28 09:44:44 +01:00
sync.h sync: kill evil and syncv1 in one shot 2012-03-09 11:15:08 +01:00
timer.c Update copyright header dates in exec directory 2012-02-13 17:05:04 -07:00
timer.h Update copyright header dates in exec directory 2012-02-13 17:05:04 -07:00
totemconfig.c totemconfig: improve linknumber checking 2020-09-18 12:12:26 +02:00
totemconfig.h config: Allow reconfiguration of crypto options 2020-07-09 16:54:16 +02:00
totemip.c Revert "totemip: compare sin6_scope_id and interface_num" 2020-04-22 13:30:36 +02:00
totemknet.c config: Allow reconfiguration of crypto options 2020-07-09 16:54:16 +02:00
totemknet.h config: Allow reconfiguration of crypto options 2020-07-09 16:54:16 +02:00
totemnet.c config: Allow reconfiguration of crypto options 2020-07-09 16:54:16 +02:00
totemnet.h config: Allow reconfiguration of crypto options 2020-07-09 16:54:16 +02:00
totempg.c config: Allow reconfiguration of crypto options 2020-07-09 16:54:16 +02:00
totemsrp.c totemsrp: Move token received callback 2020-09-29 15:51:49 +02:00
totemsrp.h config: Allow reconfiguration of crypto options 2020-07-09 16:54:16 +02:00
totemudp.c totem: Display IP of sender 2018-03-16 13:58:15 +01:00
totemudp.h totem: Display IP of sender 2018-03-16 13:58:15 +01:00
totemudpu.c udpu: Drop packets from unlisted IPs 2019-05-29 16:30:10 +02:00
totemudpu.h totem: Display IP of sender 2018-03-16 13:58:15 +01:00
util.c main: Rename run_dir to state_dir 2018-12-14 13:48:33 +01:00
util.h main: Rename run_dir to state_dir 2018-12-14 13:48:33 +01:00
votequorum.c config: don't reload vquorum if reload fails 2020-04-24 16:27:01 +02:00
votequorum.h list: Replace uses of list.h with qblist.h 2016-10-27 14:56:52 +02:00
vsf_quorum.c quorum: Add support for nodelist callback 2020-10-12 13:22:11 +02:00
vsf_ykd.c YKD: Fix loading of YKD quorum module 2014-08-18 09:33:59 +01:00
vsf_ykd.h list: Replace uses of list.h with qblist.h 2016-10-27 14:56:52 +02:00
vsf.h Update copyright header dates in exec directory 2012-02-13 17:05:04 -07:00
wd.c wd: fix snprintf warnings 2017-12-01 17:23:54 +01:00