QUORU...IALIZE(3)
π QUORU...IALIZE(3) π
okay bestie, sit down, hydrate, because this is a page from the Corosync Cluster Engine Programmer's Manual, section 3, and it's about the moment you and the Quorum service first start talking. it's giving first-day-of-school butterflies but for daemons. π¦
β¨ NAME β¨
quorum_model_initialize β create a new connection to the Quorum service
like. that's it. that's the whole vibe. you're opening a connection. slay.
πΈ SYNOPSIS πΈ
#include <corosync/quorum.h>
cs_error_t quorum_model_initialize(quorum_handle_t *handle,
quorum_model_t model, quorum_model_data_t *model_data, uint32_t
*quorum_type,void *context);
yes the line breaks are weird, no I did not fix them, that's literally what it says π
π DESCRIPTION π
so quorum_model_initialize is the glow-up version of connecting to the quorum API. it's the enhanced way to initialize a connection. the old way walked so this one could run.
each application can have several connections to the quorum API. not one, not two, several β she's popular. π
and each application uses the handle argument to uniquely identify which connection is which. that handle then gets passed into other function calls so everyone knows which connection you're talking about when you're communicating with the quorum service.
the model is how you explicitly choose your set of callbacks and internal parameters. right now two models are defined: QUORUM_MODEL_V0 and QUORUM_MODEL_V1.
π¨ okay important:QUORUM_MODEL_V0exists only for compatibility reasons withquorum_initialize(3), and it is not recommended to use it as an argument forquorum_model_initialize(3). it's the old ex you keep texting. don't.
the following description is focused only on the QUORUM_MODEL_V1 model. V1 is the main character here, periodt. β¨
every single time the voting configuration changes β like when a node joins or leaves the cluster β or when the quorum status changes, the quorum callback gets called. here's the type definition for that callback function:
typedef void (*quorum_v1_quorum_notification_fn_t) (
quorum_handle_t handle,
uint32_t quorate,
struct quorum_ring_id ring_id,
uint32_t member_list_entries,
const uint32_t *member_list
);
and ALSO, every time the membership configuration changes β again, node joins or leaves the cluster β the node list change callback gets called before the quorum callback. yes, order matters, she has a schedule. the node list change callback function looks like this:
typedef void (*quorum_v1_nodelist_notification_fn_t) (
quorum_handle_t handle,
struct quorum_ring_id ring_id,
uint32_t member_list_entries,
const uint32_t *member_list,
uint32_t joined_list_entries,
const uint32_t *joined_list,
uint32_t left_list_entries,
const uint32_t *left_list
);
the model_data argument for QUORUM_MODEL_V1 is this type:
typedef struct {
quorum_model_t model;
quorum_v1_quorum_notification_fn_t quorum_notify_fn;
quorum_v1_nodelist_notification_fn_t nodelist_notify_fn;
} quorum_model_v1_data_t;
ngl, it's not required (and honestly not recommended) to set the model field in the structure. and it's also totally fine if you only use some of the notification callbacks β in that case only those events will be delivered. lowkey a choose-your-own-adventure. π
the quorum_type argument gets set to one of these:
#define QUORUM_FREE 0
#define QUORUM_SET 1
QUORUM_FREEmeans no quorum algorithm is loaded and no callbacks will take place. it's the empty party. πQUORUM_SETmeans one quorum algorithm is configured and callbacks will take place. the party is ON. π₯
the context argument sets context the exact same way as quorum_context_set(3) does. same energy, same behaviour. π«Ά
and when a configuration change occurs, the callback is called from the quorum_dispatch(3) function. iykyk.
β RETURN VALUE β
this call returns the CS_OK value if it's successful. otherwise, an error gets returned. no cap. π
π ERRORS π
CS_ERR_TRY_AGAINβ resource temporarily unavailableCS_ERR_INVALID_PARAMβ invalid argumentCS_ERR_ACCESSβ permission deniedCS_ERR_LIBRARYβ the connection failedCS_ERR_INTERRUPTβ system call interrupted by a signalCS_ERR_NOT_SUPPORTEDβ the requested protocol/functionality not supportedCS_ERR_MESSAGE_ERRORβ incorrect auth message receivedCS_ERR_NO_MEMORYβ not enough memory to complete the requested task
π SEE ALSO π
quorum_overview(3), quorum_initialize(3), quorum_finalize(3), quorum_getquorate(3), quorum_trackstart(3), quorum_trackstop(3), quorum_fd_get(3), quorum_dispatch(3), quorum_context_set(3), quorum_context_get(3)
go read those too bestie, the whole squad is iconic π
and that's the page!! this lil beauty comes from the corosync Man Page, dated 2026-09-04. go forth and initialize your quorum connection, you absolute legend. mwah. πβ¨π
π¦ where this page comes from
- fedora 43: corosynclib-devel 3.1.10-3.fc43 Β· BSD-3-Clause
- fedora 43: corosynclib-devel 3.1.10-3.fc43 Β· BSD-3-Clause
- fedora 44: corosynclib-devel 3.1.10-6.fc44 Β· BSD-3-Clause
- fedora 44: corosynclib-devel 3.1.10-6.fc44 Β· BSD-3-Clause
- Copyright (c) 2012-2020 Red Hat, Inc
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms