SAM_STOP(3)
π SAM_STOP(3) β sam_mark_failed π
okay bestie, welcome to the Corosync Cluster Engine Programmer's Manual, section 3 π this one's about sam_mark_failed, and ngl it's the "yeah no this process is DONE" button. let's get into it π¦
β¨ NAME β¨
sam_mark_failed β Mark process failed π
β¨ SYNOPSIS β¨
#include <corosync/sam.h>
cs_error_t sam_mark_failed (void);
β¨ DESCRIPTION β¨
so the sam_mark_failed function is used with SAM_RECOVERY_POLICY_CMAP β mostly alongside SAM_RECOVERY_POLICY_RESTART β to mark a process failed. periodt.
and likeβ¦ a process that's been marked failed gets killed without sending the warn signal, and the control process will exit exactly the way it does with the SAM_RECOVERY_POLICY_QUIT policy. π
also the Condb key state gets set to failed so the corosync watchdog can take whatever action it needs to take. it's giving "we handled it, the watchdog handles the rest" energy π
β¨ RETURN VALUE β¨
this call returns the CS_OK value if it worked, otherwise an error is returned. simple as that π«Ά
β¨ ERRORS β¨
here's the vibe-check-failed list, bestie:
CS_ERR_BAD_HANDLEβ the library was not initialized by callingsam_initialize(3), or it was already finalized πCS_ERR_INVALID_PARAMβ the recovery policy doesn't have theSAM_RECOVERY_POLICY_CMAPflag set πCS_ERR_LIBRARYβ some internal error showed up (communication with the parent process) π
β¨ SEE ALSO β¨
and the lil bonus error-code glossary that comes along with it π
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
lowkey important: once a process is marked failed it's killed with no warn signal β no goodbye, no warning shot, just gone. and the Condb key state flips to failed. know that going in, bestie π
that's the whole page, you ate it up fr fr β this was the corosync Man Page, page SAM_STOP(3), dated 21/05/2010 β mwah, go slay some clusters πβ¨π§
π¦ where this page comes from
- debian bookworm: libsam-dev 3.1.7-1+deb12u2 Β· BSD-3-Clause
- debian trixie: libsam-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: libsam-dev 3.1.6-1ubuntu1 Β· BSD-3-Clause
- ubuntu jammy: libsam-dev 3.1.6-1ubuntu1.2 Β· BSD-3-Clause
- ubuntu noble: libsam-dev 3.1.7-1ubuntu3 Β· BSD-3-Clause
- ubuntu noble: libsam-dev 3.1.7-1ubuntu3.2 Β· BSD-3-Clause
- ubuntu questing: libsam-dev 3.1.9-2ubuntu1
- ubuntu questing: libsam-dev 3.1.9-2ubuntu1.1
- ubuntu resolute: libsam-dev 3.1.9-2ubuntu3 Β· BSD-3-Clause
- ubuntu stonking: libsam-dev 3.1.10-3ubuntu1 Β· BSD-3-Clause
- Copyright (c) 2010 Red Hat, Inc
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms