10 #ifndef PCMK__CRM_CLUSTER_INTERNAL__H 11 # define PCMK__CRM_CLUSTER_INTERNAL__H 60 static inline uint32_t
61 crm_get_cluster_proc(
void)
81 static inline const char *
82 pcmk__cs_err_str(
int error)
86 case CS_OK:
return "OK";
87 case CS_ERR_LIBRARY:
return "Library error";
88 case CS_ERR_VERSION:
return "Version error";
89 case CS_ERR_INIT:
return "Initialization error";
90 case CS_ERR_TIMEOUT:
return "Timeout";
91 case CS_ERR_TRY_AGAIN:
return "Try again";
92 case CS_ERR_INVALID_PARAM:
return "Invalid parameter";
93 case CS_ERR_NO_MEMORY:
return "No memory";
94 case CS_ERR_BAD_HANDLE:
return "Bad handle";
95 case CS_ERR_BUSY:
return "Busy";
96 case CS_ERR_ACCESS:
return "Access error";
97 case CS_ERR_NOT_EXIST:
return "Doesn't exist";
98 case CS_ERR_NAME_TOO_LONG:
return "Name too long";
99 case CS_ERR_EXIST:
return "Exists";
100 case CS_ERR_NO_SPACE:
return "No space";
101 case CS_ERR_INTERRUPT:
return "Interrupt";
102 case CS_ERR_NAME_NOT_FOUND:
return "Name not found";
103 case CS_ERR_NO_RESOURCES:
return "No resources";
104 case CS_ERR_NOT_SUPPORTED:
return "Not supported";
105 case CS_ERR_BAD_OPERATION:
return "Bad operation";
106 case CS_ERR_FAILED_OPERATION:
return "Failed operation";
107 case CS_ERR_MESSAGE_ERROR:
return "Message error";
108 case CS_ERR_QUEUE_FULL:
return "Queue full";
109 case CS_ERR_QUEUE_NOT_AVAILABLE:
return "Queue not available";
110 case CS_ERR_BAD_FLAGS:
return "Bad flags";
111 case CS_ERR_TOO_BIG:
return "Too big";
112 case CS_ERR_NO_SECTIONS:
return "No sections";
115 return "Corosync error";
118 # if SUPPORT_COROSYNC 125 #define pcmk__init_cmap(handle) cmap_initialize_map((handle), CMAP_MAP_ICMAP) 127 #define pcmk__init_cmap(handle) cmap_initialize(handle) 134 const struct cpg_name *group_name,
135 const struct cpg_address *member_list,
136 size_t member_list_entries,
137 const struct cpg_address *left_list,
138 size_t left_list_entries,
139 const struct cpg_address *joined_list,
140 size_t joined_list_entries);
143 uint32_t
pid,
void *content, uint32_t *kind,
154 uint32_t flag,
const char *status);
156 const char *state, uint64_t membership);
159 const char *expected);
164 void (*destroy) (gpointer));
169 const xmlNode *
data);
195 const char *uuid, uint32_t
flags);
197 #endif // PCMK__CRM_CLUSTER_INTERNAL__H crm_node_t * pcmk__get_node(unsigned int id, const char *uname, const char *uuid, uint32_t flags)
void pcmk__reap_unseen_nodes(uint64_t ring_id)
void pcmk__cluster_forget_cluster_node(uint32_t id, const char *node_name)
const char * pcmk__node_name_from_uuid(const char *uuid)
Search for cluster nodes from membership cache.
bool pcmk__corosync_add_nodes(xmlNode *xml_parent)
void pcmk__cluster_forget_remote_node(const char *node_name)
const char * pcmk__cluster_local_node_name(void)
void pcmk__cpg_confchg_cb(cpg_handle_t handle, const struct cpg_name *group_name, const struct cpg_address *member_list, size_t member_list_entries, const struct cpg_address *left_list, size_t left_list_entries, const struct cpg_address *joined_list, size_t joined_list_entries)
bool pcmk__cluster_send_message(const crm_node_t *node, enum crm_ais_msg_types service, const xmlNode *data)
char * pcmk__corosync_cluster_name(void)
unsigned int pcmk__cluster_num_active_nodes(void)
crm_node_t * pcmk__update_peer_state(const char *source, crm_node_t *node, const char *state, uint64_t membership)
Update a node's state and membership information.
void pcmk__cluster_set_status_callback(void(*dispatch)(enum crm_status_type, crm_node_t *, const void *))
char * pcmk__cpg_message_data(cpg_handle_t handle, uint32_t sender_id, uint32_t pid, void *content, uint32_t *kind, const char **from)
crm_node_t * crm_update_peer_proc(const char *source, crm_node_t *peer, uint32_t flag, const char *status)
void pcmk__cluster_init_node_caches(void)
unsigned int pcmk__cluster_num_remote_nodes(void)
void pcmk__update_peer_expected(const char *source, crm_node_t *node, const char *expected)
Search for cluster member nodes and remote nodes.
void pcmk__cluster_set_autoreap(bool enable)
Search for cluster nodes from CIB (as of last cache refresh)
void pcmk__cluster_destroy_node_caches(void)
crm_node_t * pcmk__search_node_caches(unsigned int id, const char *uname, uint32_t flags)
void pcmk__corosync_quorum_connect(gboolean(*dispatch)(unsigned long long, gboolean), void(*destroy)(gpointer))
enum crm_ais_msg_types pcmk__cluster_parse_msg_type(const char *text)
char * pcmk__cluster_node_name(uint32_t nodeid)
void pcmk__purge_node_from_cache(const char *node_name, uint32_t node_id)
crm_node_t * pcmk__cluster_lookup_remote_node(const char *node_name)
bool pcmk__cluster_is_node_active(const crm_node_t *node)
enum pcmk_cluster_layer pcmk_get_cluster_layer(void)
Get and validate the local cluster layer.
const char * pcmk__cluster_node_uuid(crm_node_t *node)
void pcmk__refresh_node_caches_from_cib(xmlNode *cib)