CPG_M...P_GET(3)
π CPG_MEMBERSHIP_GET β bestie's guide to the CPG member list π
okay so you're in the Corosync Cluster Engine Programmer's Manual and this is page CPG_M...P_GET(3). yes the header is literally written like that, she's a little mysterious, we love her anyway π
β¨ NAME β¨
cpg_membership_get β returns a list of members of a CPG group π«Ά
πΈ SYNOPSIS πΈ
#include <corosync/cpg.h>
int cpg_membership_get(cpg_handle_t handle, struct cpg_name *groupName,
struct cpg_address *member_list, int *member_list_entries);
π DESCRIPTION π
so cpg_membership_get is the function that tells you which processes are in the configuration right now. that's it, that's the gig β¨
ngl bestie, you probably won't need to call this one much, because one of the very first confchg callbacks you get is gonna come from cpg_join() and it already has your process in it. the function is like, right there at the party before you even ask who's coming π
here's the cast of characters:
handleβ your reference to the cpg instantiation. it's the little name tag that says which cpg you're talking about πgroupNameβ this one returns the name of the group. she's giving you the group's government name πmember_listβ this one returns the list of processors in the current membership. the whole roster, the whole squad πmember_list_entriesβ you set this to the size ofmember_listbefore you call, and after the function returns it comes back holding the size ofmember_list. so she's an in-and-out situation, very main character energy π
π ERRORS π
the errors are undocumented. literally that's all it says. no cap. we know nothing. good luck bestie π«Ά
π¦ SEE ALSO π¦
cpg_overview(3)cpg_initialize(3)cpg_finalize(3)cpg_fd_get(3)cpg_dispatch(3)cpg_join(3)cpg_leave(3)cpg_mcast_joined(3)cpg_membership_get(3)cpg_zcb_alloc(3)cpg_zcb_free(3)cpg_zcb_mcast_joined(3)cpg_context_get(3)cpg_context_set(3)cpg_local_get(3)
and then the error-code roster, which lives down here too for some reason, iconic honestly π
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
π real talk: the ERRORS section genuinely just says the errors are undocumented, so don't come for me, I'm only telling you what the page says, fr fr.
that's the whole page bestie, mwah π this was the corosync Man Page, dated 2006-02-06, filed under CPG_M...P_GET(3). slay, go read cpg_join(3) next, ily πβ¨π¦
π¦ where this page comes from
- debian bookworm: libcpg-dev 3.1.7-1+deb12u2 Β· BSD-3-Clause
- debian trixie: libcpg-dev 3.1.9-2+deb13u1 Β· BSD-3-Clause
- epel 9: corosynclib-devel 3.1.10-0.2.el9.1 Β· BSD-3-Clause
- 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 43: corosynclib-devel 3.1.9-5.fc43 Β· BSD-3-Clause
- fedora 43: corosynclib-devel 3.1.9-5.fc43 Β· BSD-3-Clause
- fedora 44: corosynclib-devel 3.1.10-4.fc44 Β· BSD-3-Clause
- fedora 44: corosynclib-devel 3.1.10-4.fc44 Β· 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
- nixos 26.05: corosync 3.1.9
- nixpkgs unstable: corosync 3.1.9
- opensuse-leap 16.0: corosync-devel 3.1.9-160000.4.1 Β· BSD-3-Clause
- opensuse-leap 16.0: corosync-devel 3.1.9-160000.4.1 Β· BSD-3-Clause
- opensuse-leap 16.0: corosync-devel 3.1.9-160000.4.1 Β· BSD-3-Clause
- opensuse-leap 16.0: corosync-devel 3.1.9-160000.4.1 Β· BSD-3-Clause
- ubuntu jammy: libcpg-dev 3.1.6-1ubuntu1 Β· BSD-3-Clause
- ubuntu jammy: libcpg-dev 3.1.6-1ubuntu1.2 Β· BSD-3-Clause
- ubuntu noble: libcpg-dev 3.1.7-1ubuntu3 Β· BSD-3-Clause
- ubuntu noble: libcpg-dev 3.1.7-1ubuntu3.2 Β· BSD-3-Clause
- ubuntu questing: libcpg-dev 3.1.9-2ubuntu1
- ubuntu questing: libcpg-dev 3.1.9-2ubuntu1.1
- ubuntu resolute: libcpg-dev 3.1.9-2ubuntu3 Β· BSD-3-Clause
- ubuntu stonking: libcpg-dev 3.1.10-3ubuntu1 Β· BSD-3-Clause
- Copyright (c) 2006 Red Hat, Inc
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms