28 # include <libxml/tree.h> 30 # define CRM_FEATURE_SET "3.1.0" 33 # define DIMOF(a) ((int) (sizeof(a)/sizeof(a[0])) ) 40 # define __builtin_expect(expr, result) (expr) 44 # define __likely(expr) __builtin_expect(expr, 1) 45 # define __unlikely(expr) __builtin_expect(expr, 0) 47 # define CRM_META "CRM_meta" 54 # define MAX_IPC_DELAY 120 57 # define CRM_SCORE_INFINITY 1000000 58 # define CRM_INFINITY_S "INFINITY" 59 # define CRM_PLUS_INFINITY_S "+" CRM_INFINITY_S 60 # define CRM_MINUS_INFINITY_S "-" CRM_INFINITY_S 69 # define INFINITY_S "INFINITY" 70 # define MINUS_INFINITY_S "-INFINITY" 71 # define INFINITY 1000000 74 # define CRM_SYSTEM_DC "dc" 75 # define CRM_SYSTEM_DCIB "dcib" 77 # define CRM_SYSTEM_CIB "cib" 78 # define CRM_SYSTEM_CRMD "crmd" 79 # define CRM_SYSTEM_LRMD "lrmd" 80 # define CRM_SYSTEM_PENGINE "pengine" 81 # define CRM_SYSTEM_TENGINE "tengine" 82 # define CRM_SYSTEM_STONITHD "stonithd" 83 # define CRM_SYSTEM_MCP "pacemakerd" 86 # define CRM_ATTR_UNAME "#uname" 87 # define CRM_ATTR_ID "#id" 88 # define CRM_ATTR_KIND "#kind" 89 # define CRM_ATTR_ROLE "#role" 90 # define CRM_ATTR_IS_DC "#is_dc" 91 # define CRM_ATTR_CLUSTER_NAME "#cluster-name" 92 # define CRM_ATTR_SITE_NAME "#site-name" 93 # define CRM_ATTR_UNFENCED "#node-unfenced" 94 # define CRM_ATTR_DIGESTS_ALL "#digests-all" 95 # define CRM_ATTR_DIGESTS_SECURE "#digests-secure" 96 # define CRM_ATTR_RA_VERSION "#ra-version" 97 # define CRM_ATTR_PROTOCOL "#attrd-protocol" 100 # define CRM_OP_NOOP "noop" 101 # define CRM_OP_JOIN_ANNOUNCE "join_announce" 102 # define CRM_OP_JOIN_OFFER "join_offer" 103 # define CRM_OP_JOIN_REQUEST "join_request" 104 # define CRM_OP_JOIN_ACKNAK "join_ack_nack" 105 # define CRM_OP_JOIN_CONFIRM "join_confirm" 106 # define CRM_OP_PING "ping" 107 # define CRM_OP_NODE_INFO "node-info" 108 # define CRM_OP_THROTTLE "throttle" 109 # define CRM_OP_VOTE "vote" 110 # define CRM_OP_NOVOTE "no-vote" 111 # define CRM_OP_HELLO "hello" 112 # define CRM_OP_PECALC "pe_calc" 113 # define CRM_OP_QUIT "quit" 114 # define CRM_OP_LOCAL_SHUTDOWN "start_shutdown" 115 # define CRM_OP_SHUTDOWN_REQ "req_shutdown" 116 # define CRM_OP_SHUTDOWN "do_shutdown" 117 # define CRM_OP_FENCE "stonith" 118 # define CRM_OP_REGISTER "register" 119 # define CRM_OP_IPC_FWD "ipc_fwd" 120 # define CRM_OP_INVOKE_LRM "lrm_invoke" 121 # define CRM_OP_LRM_REFRESH "lrm_refresh" 122 # define CRM_OP_LRM_QUERY "lrm_query" 123 # define CRM_OP_LRM_DELETE "lrm_delete" 124 # define CRM_OP_LRM_FAIL "lrm_fail" 125 # define CRM_OP_PROBED "probe_complete" 126 # define CRM_OP_REPROBE "probe_again" 127 # define CRM_OP_CLEAR_FAILCOUNT "clear_failcount" 128 # define CRM_OP_REMOTE_STATE "remote_state" 129 # define CRM_OP_RELAXED_SET "one-or-more" 130 # define CRM_OP_RELAXED_CLONE "clone-one-or-more" 131 # define CRM_OP_RM_NODE_CACHE "rm_node_cache" 132 # define CRM_OP_MAINTENANCE_NODES "maintenance_nodes" 135 # define CRMD_JOINSTATE_DOWN "down" 136 # define CRMD_JOINSTATE_PENDING "pending" 137 # define CRMD_JOINSTATE_MEMBER "member" 138 # define CRMD_JOINSTATE_NACK "banned" 140 # define CRMD_ACTION_DELETE "delete" 141 # define CRMD_ACTION_CANCEL "cancel" 143 # define CRMD_ACTION_RELOAD "reload" 144 # define CRMD_ACTION_MIGRATE "migrate_to" 145 # define CRMD_ACTION_MIGRATED "migrate_from" 147 # define CRMD_ACTION_START "start" 148 # define CRMD_ACTION_STARTED "running" 150 # define CRMD_ACTION_STOP "stop" 151 # define CRMD_ACTION_STOPPED "stopped" 153 # define CRMD_ACTION_PROMOTE "promote" 154 # define CRMD_ACTION_PROMOTED "promoted" 155 # define CRMD_ACTION_DEMOTE "demote" 156 # define CRMD_ACTION_DEMOTED "demoted" 158 # define CRMD_ACTION_NOTIFY "notify" 159 # define CRMD_ACTION_NOTIFIED "notified" 161 # define CRMD_ACTION_STATUS "monitor" 162 # define CRMD_ACTION_METADATA "meta-data" 163 # define CRMD_METADATA_CALL_TIMEOUT 30000 166 # define RSC_DELETE CRMD_ACTION_DELETE 167 # define RSC_CANCEL CRMD_ACTION_CANCEL 169 # define RSC_MIGRATE CRMD_ACTION_MIGRATE 170 # define RSC_MIGRATED CRMD_ACTION_MIGRATED 172 # define RSC_START CRMD_ACTION_START 173 # define RSC_STARTED CRMD_ACTION_STARTED 175 # define RSC_STOP CRMD_ACTION_STOP 176 # define RSC_STOPPED CRMD_ACTION_STOPPED 178 # define RSC_PROMOTE CRMD_ACTION_PROMOTE 179 # define RSC_PROMOTED CRMD_ACTION_PROMOTED 180 # define RSC_DEMOTE CRMD_ACTION_DEMOTE 181 # define RSC_DEMOTED CRMD_ACTION_DEMOTED 183 # define RSC_NOTIFY CRMD_ACTION_NOTIFY 184 # define RSC_NOTIFIED CRMD_ACTION_NOTIFIED 186 # define RSC_STATUS CRMD_ACTION_STATUS 187 # define RSC_METADATA CRMD_ACTION_METADATA 195 static inline const char *
196 crm_action_str(
const char *task, guint interval_ms) {
Wrappers for and extensions to libqb logging.
#define safe_str_eq(a, b)