SAM_START(3)

✨ SAM_START(3) ✨

Corosync Cluster Engine Programmer's Manual 🫢 welcome to the sam_start page bestie, it's giving "let's get this health checking party started"


πŸ’– NAME πŸ’–

sam_start β€” start health checking, periodt


🌸 SYNOPSIS 🌸

#include <corosync/sam.h>

cs_error_t sam_start (void);

πŸ¦‹ DESCRIPTION πŸ¦‹

okay so sam_start is the function you call to start health checking of your application. it literally kicks off the whole monitoring vibe. πŸ‘‘

after you call it, the active process needs to send healthchecks within the registered time interval by calling sam_hc_send(3). no skipping, no ghosting the healthcheck, iykyk.

if event driven healthchecking is configured by calling sam_register(3), an internal thread will be created and it will send health check confirmations four times per time_interval. that's the thread's whole job and it's serving. ✨

⚠️ heads up: your application must be registered by calling sam_register(3) before this function can be called. no registration, no sam_start. that's the rule.

an application can always stop health checking by calling the sam_stop(3) function. so like, you're never trapped, bestie. πŸŽ€

if SAM is initialized with quorum policy SAM_RECOVERY_POLICY_QUIT or SAM_RECOVERY_POLICY_RESTART, sam_start will block until corosync becomes quorate. so it's just gonna sit there and wait. patiently. main character energy. πŸ’…


🌈 RETURN VALUE 🌈

this call returns the CS_OK value if successful, otherwise an error is returned. and if SAM is initialized with quorum policy, the returned error can also be a quorum error. πŸ‘€


πŸ“ ERRORS πŸ“

  • CS_ERR_BAD_HANDLE β€” component was not registered by calling the sam_register(3) function. basically you forgot to check in first, bestie 😭

🧚 SEE ALSO 🧚

and also, while we're here, a whole lil lineup of errors that can show up (they're listed right here in the original too, so here they are, no cap):

  • CS_ERR_TRY_AGAIN β€” Resource temporarily unavailable
  • CS_ERR_INVALID_PARAM β€” Invalid argument
  • CS_ERR_ACCESS β€” Permission denied
  • CS_ERR_LIBRARY β€” The connection failed
  • CS_ERR_INTERRUPT β€” System call interrupted by a signal
  • CS_ERR_NOT_SUPPORTED β€” The requested protocol/functionality not supported
  • CS_ERR_MESSAGE_ERROR β€” Incorrect auth message received
  • CS_ERR_NO_MEMORY β€” Not enough memory to complete the requested task

and that's the whole page, slay πŸ’œ

this one's from the corosync Man Page, dated 30/04/2010, filed under SAM_START(3) β€” stay healthy, stay quorate, love u bye 🫢✨

πŸ“¦ where this page comes from