9 #ifndef PCMK__CRM_COMMON_RESULTS__H 10 # define PCMK__CRM_COMMON_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 191 #if !defined(PCMK_ALLOW_DEPRECATED) || (PCMK_ALLOW_DEPRECATED == 1) 357 const char **
name,
const char **desc);
370 static inline const char *
387 default:
return "UNKNOWN!";
const char * pcmk_errorname(int rc)
ocf_exitcode
Exit status codes for resource agents.
Service failed and possibly in promoted role.
const char * pcmk_strerror(int rc)
No connection to executor.
Service active and promoted.
Requested item does not exist.
int pcmk_rc2legacy(int rc)
_Noreturn crm_exit_t crm_exit(crm_exit_t rc)
Dependencies not available locally.
Update older than existing config.
Could not determine status.
Service active and promoted.
Service promoted but more likely to fail soon.
crm_exit_t pcmk_rc2exitc(int rc)
Map a function return code to the most similar exit code.
Necessary CIB secrets are unavailable.
Requested item does not satisfy constraints.
enum crm_exit_e crm_exit_t
Service promoted but more likely to fail soon.
Command line usage error.
enum crm_ais_msg_types type
Ensure crm_exit_t can hold this.
Action did not complete in time.
const char * pcmk_rc_str(int rc)
Get a user-friendly description of a return code.
Execution failed, do not retry on node.
Non-file permission issue.
No fence device is configured for target.
pcmk_rc_e
Return codes for Pacemaker API functions.
Maximum value for this enum.
const char * crm_exit_str(crm_exit_t exit_code)
User-supplied data incorrect.
Requested item has multiple matches.
Used only to initialize variables.
Requested action not implemented.
Parameter invalid (in local context)
Input file not available.
External (OS/environmental) problem.
Parameter invalid (inherently)
Action completed, result is known.
int pcmk_result_get_strings(int code, enum pcmk_result_type type, const char **name, const char **desc)
Get the name and description of a given result code.
Service failed and possibly promoted.
int pcmk_legacy2rc(int legacy_rc)
Execution failed, do not retry anywhere.
Dependencies not available locally.
Service active but more likely to fail soon.
Requested item has expired.
Requested action not implemented.
Legacy API function return code.
Requires –force or new conditions.
Service active but more likely to fail soon.
Agent does not implement requested action.
const char * pcmk_rc_name(int rc)
Get a return code constant name as a string.
Needed service unavailable.
File couldn't be created.
Local partition does not have quorum.
Lost connection to something.
Requested item is not in effect.
Standard Pacemaker return code.
No exit status available.
Agent or dependency not available locally.
Digest comparison failed.
crm_exit_e
Exit status codes for tools and daemons.
pcmk_exec_status
Execution status.
Parameter invalid (in local context)
Convention from timeout(1)
Action cannot be attempted (e.g. shutdown)
enum ocf_exitcode pcmk_rc2ocf(int rc)
Map a function return code to the most similar OCF exit code.
Requested item already exists.
Execution failed, may be retried.
Parameter invalid (inherently)
const char * crm_exit_name(crm_exit_t exit_code)
pcmk_result_type
Types of Pacemaker result codes.