9 #ifndef PCMK__CRM_COMMON_RESULTS__H 10 #define PCMK__CRM_COMMON_RESULTS__H 27 # if (defined __cplusplus \ 28 && ((201103 <= __cplusplus && !(__GNUC__ == 4 && __GNUC_MINOR__ == 7)) \ 29 || (defined _MSC_VER && 1900 <= _MSC_VER))) 30 # define _Noreturn [[noreturn]] 31 # elif ((!defined __cplusplus || defined __clang__) \ 32 && (201112 <= (defined __STDC_VERSION__ ? __STDC_VERSION__ : 0) \ 33 || 4 < __GNUC__ + (7 <= __GNUC_MINOR__))) 35 # elif 2 < __GNUC__ + (8 <= __GNUC_MINOR__) || 0x5110 <= __SUNPRO_C 36 # define _Noreturn __attribute__ ((__noreturn__)) 37 # elif 1200 <= (defined _MSC_VER ? _MSC_VER : 0) 38 # define _Noreturn __declspec (noreturn) 67 #define PCMK_ERROR_OFFSET 190 68 #define PCMK_CUSTOM_OFFSET 200 69 #define pcmk_err_generic 201 70 #define pcmk_err_no_quorum 202 71 #define pcmk_err_schema_validation 203 72 #define pcmk_err_transform_failed 204 73 #define pcmk_err_old_data 205 76 #define pcmk_err_diff_failed 206 79 #define pcmk_err_diff_resync 207 81 #define pcmk_err_cib_modified 208 82 #define pcmk_err_cib_backup 209 83 #define pcmk_err_cib_save 210 84 #define pcmk_err_schema_unchanged 211 85 #define pcmk_err_cib_corrupt 212 86 #define pcmk_err_multiple 213 87 #define pcmk_err_node_unknown 214 88 #define pcmk_err_already 215 91 #define pcmk_err_bad_nvpair 250 92 #define pcmk_err_unknown_format 252 94 #define pcmk_err_bad_nvpair 216 95 #define pcmk_err_unknown_format 217 201 #if !defined(PCMK_ALLOW_DEPRECATED) || (PCMK_ALLOW_DEPRECATED == 1) 368 const char **
name,
const char **desc);
391 void crm_abort(
const char *file,
const char *
function,
int line,
392 const char *condition, gboolean do_core, gboolean do_fork);
394 static inline const char *
411 default:
return "UNKNOWN!";
419 #if !defined(PCMK_ALLOW_DEPRECATED) || (PCMK_ALLOW_DEPRECATED == 1)
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.
void crm_abort(const char *file, const char *function, int line, const char *condition, gboolean do_core, gboolean do_fork)
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.
Deprecated Pacemaker results API.
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.