10 #ifndef CRM_CLUSTER_INTERNAL__H
11 # define CRM_CLUSTER_INTERNAL__H
66 static inline uint32_t
67 crm_get_cluster_proc(
void)
79 static inline const char *
82 const char *text =
"unknown";
89 text =
"pacemaker-based";
92 text =
"pacemaker-controld";
95 text =
"pacemaker-schedulerd";
98 text =
"pacemaker-execd";
101 text =
"pacemaker-attrd";
104 text =
"pacemaker-fenced";
107 text =
"corosync-cpg";
113 static inline const char *
118 }
else if (host->
size > 0) {
125 # define ais_data_len(msg) (msg->is_compressed?msg->compressed_size:msg->size)
161 static inline const char *
162 ais_error2text(
int error)
164 const char *text =
"unknown";
166 # if SUPPORT_COROSYNC
172 text =
"Library error";
175 text =
"Version error";
178 text =
"Initialization error";
183 case CS_ERR_TRY_AGAIN:
186 case CS_ERR_INVALID_PARAM:
187 text =
"Invalid parameter";
189 case CS_ERR_NO_MEMORY:
192 case CS_ERR_BAD_HANDLE:
199 text =
"Access error";
201 case CS_ERR_NOT_EXIST:
202 text =
"Doesn't exist";
204 case CS_ERR_NAME_TOO_LONG:
205 text =
"Name too long";
210 case CS_ERR_NO_SPACE:
213 case CS_ERR_INTERRUPT:
216 case CS_ERR_NAME_NOT_FOUND:
217 text =
"Name not found";
219 case CS_ERR_NO_RESOURCES:
220 text =
"No resources";
222 case CS_ERR_NOT_SUPPORTED:
223 text =
"Not supported";
225 case CS_ERR_BAD_OPERATION:
226 text =
"Bad operation";
228 case CS_ERR_FAILED_OPERATION:
229 text =
"Failed operation";
231 case CS_ERR_MESSAGE_ERROR:
232 text =
"Message error";
234 case CS_ERR_QUEUE_FULL:
237 case CS_ERR_QUEUE_NOT_AVAILABLE:
238 text =
"Queue not available";
240 case CS_ERR_BAD_FLAGS:
246 case CS_ERR_NO_SECTIONS:
247 text =
"No sections";
254 static inline const char *
257 const char *text =
"unknown";
296 # if SUPPORT_COROSYNC
318 uint32_t flag,
const char *status);
320 const char *state, uint64_t membership);
327 void (*destroy) (gpointer));
enum crm_ais_msg_types type
gboolean send_cpg_iov(struct iovec *iov)
void crm_reap_unseen_nodes(uint64_t ring_id)
char * corosync_node_name(uint64_tcmap_handle, uint32_t nodeid)
void terminate_cs_connection(crm_cluster_t *cluster)
cs_ipc_header_response_t header __attribute__((aligned(8)))
crm_node_t * crm_update_peer_state(const char *source, crm_node_t *node, const char *state, uint64_t membership)
Update a node's state and membership information.
gboolean cluster_connect_quorum(gboolean(*dispatch)(unsigned long long, gboolean), void(*destroy)(gpointer))
gboolean init_cs_connection(crm_cluster_t *cluster)
char * corosync_cluster_name(void)
crm_node_t * crm_update_peer_proc(const char *source, crm_node_t *peer, uint32_t flag, const char *status)
gboolean check_message_sanity(const AIS_Message *msg, const char *data)
int corosync_cmap_has_config(const char *prefix)
struct qb_ipc_response_header cs_ipc_header_response_t
enum cluster_type_e find_corosync_variant(void)
void crm_update_peer_expected(const char *source, crm_node_t *node, const char *expected)
gboolean init_cs_connection_once(crm_cluster_t *cluster)
crm_node_t * crm_find_known_peer_full(unsigned int id, const char *uname, int flags)
gboolean node_name_is_valid(const char *key, const char *name)
crm_node_t * crm_find_peer_full(unsigned int id, const char *uname, int flags)
gboolean send_cluster_message_cs(xmlNode *msg, gboolean local, crm_node_t *node, enum crm_ais_msg_types dest)
char * get_corosync_uuid(crm_node_t *node)
void crm_update_peer_uname(crm_node_t *node, const char *uname)
void crm_peer_caches_refresh(xmlNode *cib)
crm_node_t * crm_find_peer(unsigned int id, const char *uname)
gboolean corosync_initialize_nodelist(void *cluster, gboolean force_member, xmlNode *xml_parent)
enum crm_proc_flag __attribute__
enum crm_ais_msg_types type
enum cluster_type_e get_cluster_type(void)