VOTEQ...VOTES(3)

πŸ’– VOTEQ...VOTES(3) πŸ’–

okay bestie, sit DOWN, we're learning votequorum today and it's gonna be iconic, no cap. this one lives in the Corosync Cluster Engine Programmer's Manual, so you already know it's giving ✨ serious systems energy ✨. grab a snack, hydrate, and let's go 🫢


🌸 NAME 🌸

votequorum_setvotes β€” sets the number of votes for a node. literally its whole job. one (1) task. main character behavior honestly πŸ‘‘


πŸŽ€ SYNOPSIS πŸŽ€

#include <corosync/votequorum.h>

int votequorum_setexpected(votequorum_handle_t handle, unsigned int
nodeid, int votes);

so first you gotta pull in the header with that #include <corosync/votequorum.h> line, and then the call itself is votequorum_setexpected. it takes a votequorum_handle_t handle, an unsigned int nodeid, and an int votes.

ok bestie i KNOW. the NAME section says votequorum_setvotes and the synopsis declares votequorum_setexpected. that's just what the page says, i'm not touching it, i'm just reporting the vibes πŸ’€ copy it exactly as written, don't get cute with it.

πŸ¦‹ DESCRIPTION πŸ¦‹

so votequorum_setvotes is the function you use to change how many votes a node has. that's the whole point of it. it's a glow-up for a node's vote count πŸ’…

BUT β€” and this is the important part, listen up β€” you cannot use this function to change the number of node votes in a way that makes the cluster go inquorate. nope. not allowed. the function will simply not let you do that. so don't show up trying to tank your own cluster, it's not the vibe πŸ”₯


⭐ RETURN VALUE ⭐

this call returns the CS_OK value if it's successful. and if it's not? you get an error back instead. that's it, that's the deal ✨


🌈 ERRORS 🌈

here's the whole roster of what can come back at you, every single one:

  • CS_ERR_TRY_AGAIN β€” resource temporarily unavailable. it's busy, bestie, try again in a sec πŸ™ˆ
  • CS_ERR_INVALID_PARAM β€” invalid argument. something you passed in was just... not it πŸ’€
  • CS_ERR_ACCESS β€” permission denied. not your house, not your rules 🚫
  • CS_ERR_LIBRARY β€” the connection failed. the link is not linking 😭
  • CS_ERR_INTERRUPT β€” system call interrupted by a signal. rude honestly πŸ“
  • CS_ERR_NOT_SUPPORTED β€” the requested protocol/functionality not supported. it's giving "we don't do that here" πŸ’…
  • CS_ERR_MESSAGE_ERROR β€” incorrect auth message received. sus message detected πŸ”
  • CS_ERR_NO_MEMORY β€” not enough memory to complete the requested task. the brain is full, no thoughts, head empty 🧚

πŸ’œ SEE ALSO πŸ’œ

go read these next, they're the whole friend group:


and that's the page, bestie 🫢 this was the Corosync man page, dated 2026-09-04, and it's from the Corosync Man Page source. periodt πŸ’–βœ¨

πŸ“¦ where this page comes from