Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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>
- Loading branch information
Showing
21 changed files
with
898 additions
and
79 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
5.0.0 | ||
5.1.0 |
Oops, something went wrong.