10 # define CRM_RESULTS__H
25 # if (defined __cplusplus \
26 && ((201103 <= __cplusplus && !(__GNUC__ == 4 && __GNUC_MINOR__ == 7)) \
27 || (defined _MSC_VER && 1900 <= _MSC_VER)))
28 # define _Noreturn [[noreturn]]
29 # elif ((!defined __cplusplus || defined __clang__) \
30 && (201112 <= (defined __STDC_VERSION__ ? __STDC_VERSION__ : 0) \
31 || 4 < __GNUC__ + (7 <= __GNUC_MINOR__)))
33 # elif 2 < __GNUC__ + (8 <= __GNUC_MINOR__) || 0x5110 <= __SUNPRO_C
34 # define _Noreturn __attribute__ ((__noreturn__))
35 # elif 1200 <= (defined _MSC_VER ? _MSC_VER : 0)
36 # define _Noreturn __declspec (noreturn)
42 # define CRM_ASSERT(expr) do { \
44 crm_abort(__FILE__, __func__, __LINE__, #expr, TRUE, FALSE); \
69 # define PCMK_ERROR_OFFSET 190
70 # define PCMK_CUSTOM_OFFSET 200
71 # define pcmk_err_generic 201
72 # define pcmk_err_no_quorum 202
73 # define pcmk_err_schema_validation 203
74 # define pcmk_err_transform_failed 204
75 # define pcmk_err_old_data 205
76 # define pcmk_err_diff_failed 206
77 # define pcmk_err_diff_resync 207
78 # define pcmk_err_cib_modified 208
79 # define pcmk_err_cib_backup 209
80 # define pcmk_err_cib_save 210
81 # define pcmk_err_schema_unchanged 211
82 # define pcmk_err_cib_corrupt 212
83 # define pcmk_err_multiple 213
84 # define pcmk_err_node_unknown 214
85 # define pcmk_err_already 215
88 # define pcmk_err_bad_nvpair 250
89 # define pcmk_err_unknown_format 252
91 # define pcmk_err_bad_nvpair 216
92 # define pcmk_err_unknown_format 217
190 #if !defined(PCMK_ALLOW_DEPRECATED) || (PCMK_ALLOW_DEPRECATED == 1)
339 static inline const char *
356 default:
return "UNKNOWN!";
crm_exit_e
Exit status codes for tools and daemons.
@ CRM_EX_IOERR
File I/O error.
@ CRM_EX_PANIC
Panic the local host.
@ CRM_EX_PROTOCOL
Protocol violated.
@ CRM_EX_NOSUCH
Requested item does not exist.
@ CRM_EX_DATAERR
User-supplied data incorrect.
@ CRM_EX_UNSATISFIED
Requested item does not satisfy constraints.
@ CRM_EX_UNSAFE
Requires –force or new conditions.
@ CRM_EX_EXISTS
Requested item already exists.
@ CRM_EX_TIMEOUT
Convention from timeout(1)
@ CRM_EX_NOT_RUNNING
Service safely stopped.
@ CRM_EX_MULTIPLE
Requested item has multiple matches.
@ CRM_EX_UNIMPLEMENT_FEATURE
Requested action not implemented.
@ CRM_EX_ERROR
Unspecified error.
@ CRM_EX_NOT_YET_IN_EFFECT
Requested item is not in effect.
@ CRM_EX_DEGRADED
Service active but more likely to fail soon.
@ CRM_EX_CANTCREAT
File couldn't be created.
@ CRM_EX_OLD
Update older than existing config.
@ CRM_EX_SOFTWARE
Internal software bug.
@ CRM_EX_OSFILE
System file not usable.
@ CRM_EX_NOHOST
Host unknown.
@ CRM_EX_CONFIG
Misconfiguration.
@ CRM_EX_NOPERM
Non-file permission issue.
@ CRM_EX_NOT_CONFIGURED
Parameter invalid (inherently)
@ CRM_EX_NOINPUT
Input file not available.
@ CRM_EX_UNAVAILABLE
Needed service unavailable.
@ CRM_EX_OSERR
External (OS/environmental) problem.
@ CRM_EX_DISCONNECT
Lost connection to something.
@ CRM_EX_FATAL
Do not respawn.
@ CRM_EX_DIGEST
Digest comparison failed.
@ CRM_EX_EXPIRED
Requested item has expired.
@ CRM_EX_NOUSER
User does not exist.
@ CRM_EX_DEGRADED_PROMOTED
Service promoted but more likely to fail soon.
@ CRM_EX_USAGE
Command line usage error.
@ CRM_EX_MAX
Ensure crm_exit_t can hold this.
@ CRM_EX_QUORUM
Local partition does not have quorum.
@ CRM_EX_NOT_INSTALLED
Dependencies not available locally.
@ CRM_EX_INVALID_PARAM
Parameter invalid (in local context)
@ CRM_EX_INSUFFICIENT_PRIV
Insufficient privileges.
@ CRM_EX_TEMPFAIL
Try again.
@ CRM_EX_INDETERMINATE
Could not determine status.
const char * bz2_strerror(int rc)
_Noreturn crm_exit_t crm_exit(crm_exit_t rc)
enum ocf_exitcode pcmk_rc2ocf(int rc)
Map a function return code to the most similar OCF exit code.
ocf_exitcode
Exit status codes for resource agents.
@ PCMK_OCF_INSUFFICIENT_PRIV
Insufficient privileges.
@ PCMK_OCF_FAILED_PROMOTED
Service failed and possibly in promoted role.
@ PCMK_OCF_RUNNING_PROMOTED
Service active and promoted.
@ PCMK_OCF_DEGRADED_MASTER
@ PCMK_OCF_DEGRADED_PROMOTED
Service promoted but more likely to fail soon.
@ PCMK_OCF_UNIMPLEMENT_FEATURE
Requested action not implemented.
@ PCMK_OCF_NOT_CONFIGURED
Parameter invalid (inherently)
@ PCMK_OCF_DEGRADED
Service active but more likely to fail soon.
@ PCMK_OCF_NOT_INSTALLED
Dependencies not available locally.
@ PCMK_OCF_UNKNOWN_ERROR
Unspecified error.
@ PCMK_OCF_RUNNING_MASTER
@ PCMK_OCF_INVALID_PARAM
Parameter invalid (in local context)
@ PCMK_OCF_NOT_RUNNING
Service safely stopped.
@ PCMK_OCF_UNKNOWN
Action is pending.
@ PCMK_OCF_CONNECTION_DIED
pcmk_rc_e
Return codes for Pacemaker API functions.
@ pcmk_rc_transform_failed
@ pcmk_rc_schema_validation
@ pcmk_rc_ipc_unauthorized
@ pcmk_rc_schema_unchanged
@ pcmk_rc_ipc_unresponsive
@ pcmk_rc_invalid_transition
crm_exit_t crm_errno2exit(int rc)
const char * pcmk_strerror(int rc)
const char * pcmk_rc_str(int rc)
Get a user-friendly description of a return code.
const char * crm_exit_name(crm_exit_t exit_code)
int pcmk_rc2legacy(int rc)
const char * pcmk_rc_name(int rc)
Get a return code constant name as a string.
const char * crm_exit_str(crm_exit_t exit_code)
pcmk_exec_status
Execution status.
@ PCMK_EXEC_CANCELLED
Action was cancelled.
@ PCMK_EXEC_NO_SECRETS
Necessary CIB secrets are unavailable.
@ PCMK_EXEC_ERROR_FATAL
Execution failed, do not retry anywhere.
@ PCMK_EXEC_NOT_INSTALLED
Agent or dependency not available locally.
@ PCMK_EXEC_INVALID
Action cannot be attempted (e.g. shutdown)
@ PCMK_EXEC_DONE
Action completed, result is known.
@ PCMK_EXEC_ERROR
Execution failed, may be retried.
@ PCMK_EXEC_NOT_SUPPORTED
Agent does not implement requested action.
@ PCMK_EXEC_TIMEOUT
Action did not complete in time.
@ PCMK_EXEC_PENDING
Action is in progress.
@ PCMK_EXEC_UNKNOWN
Used only to initialize variables.
@ PCMK_EXEC_ERROR_HARD
Execution failed, do not retry on node.
@ PCMK_EXEC_MAX
Maximum value for this enum.
@ PCMK_EXEC_NO_FENCE_DEVICE
No fence device is configured for target.
@ PCMK_EXEC_NOT_CONNECTED
No connection to executor.
const char * pcmk_errorname(int rc)
int pcmk_legacy2rc(int legacy_rc)
enum crm_exit_e crm_exit_t
crm_exit_t pcmk_rc2exitc(int rc)
Map a function return code to the most similar exit code.