Module votequorum

Module votequorum 

Source
Expand description

votequorum is the main quorum provider for corosync, using this API, users can query the state of nodes in the cluster, request callbacks when the nodelists change, and set up a quorum device.

Structs§

Callbacks
Callbacks that can be called from votequorum, pass these in to initialize
Handle
A handle into the votequorum library. Returned from initialize and needed for all other calls
Node
Basic information about a node in the cluster. Contains NodeId, and NodeState
NodeInfo
Detailed information about a node in the cluster, returned from get_info
NodeInfoFlags
Flags in the NodeInfo struct
RingId
RingId returned by votequorum_notification_fn

Enums§

NodeState
Current state of a node in the cluster, part of the NodeInfo and Node structs

Functions§

context_get
Get the current ‘context’ value for this handle. The context value is an arbitrary value that is always passed back to callbacks to help identify the source
context_set
Set the current ‘context’ value for this handle. The context value is an arbitrary value that is always passed back to callbacks to help identify the source. Normally this is set in trackstart, but this allows it to be changed
dispatch
Call any/all active votequorum callbacks for this Handle. see DispatchFlags for details
fd_get
Return a file descriptor to use for poll/select on the VOTEQUORUM handle
finalize
Finish with a connection to corosync
get_info
Returns detailed information about a node in a NodeInfo structure
initialize
Initialize a connection to the votequorum library. You must call this before doing anything else and use the passed back Handle. Remember to free the handle using finalize when finished.
qdevice_master_wins
Allow qdevice to tell votequorum if master_wins can be enabled or not
qdevice_poll
Poll a quorum device This must be done more often than the qdevice timeout (default 10s) while the device is active and the RingId must match the current value returned from the callbacks for it to be accepted.
qdevice_register
Register a quorum device
qdevice_unregister
Unregister a quorum device
qdevice_update
Update the name of a quorum device
set_expected
Set the current expected_votes for the cluster, this value must be valid and not result in an inquorate cluster.
set_votes
Set the current votes for a node
trackstart
Track node and votequorum changes
trackstop
Stop tracking node and votequorum changes