pacemaker  2.1.8-3980678f03
Scalable High-Availability cluster resource manager
Enumerations | Functions
internal.h File Reference
#include <stdbool.h>
#include <stdint.h>
#include <glib.h>
#include <crm/cluster.h>
Include dependency graph for internal.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Enumerations

enum  crm_proc_flag { crm_proc_none = 0x00000001, crm_proc_cpg = 0x04000000 }
 
enum  pcmk__node_search_flags {
  pcmk__node_search_none = 0, pcmk__node_search_cluster_member = (1 << 0), pcmk__node_search_remote = (1 << 1), pcmk__node_search_any,
  pcmk__node_search_cluster_cib = (1 << 2)
}
 

Functions

const char * pcmk__cluster_node_uuid (crm_node_t *node)
 
char * pcmk__cluster_node_name (uint32_t nodeid)
 
const char * pcmk__cluster_local_node_name (void)
 
const char * pcmk__node_name_from_uuid (const char *uuid)
 
crm_node_tcrm_update_peer_proc (const char *source, crm_node_t *peer, uint32_t flag, const char *status)
 
crm_node_tpcmk__update_peer_state (const char *source, crm_node_t *node, const char *state, uint64_t membership)
 Update a node's state and membership information. More...
 
void pcmk__update_peer_expected (const char *source, crm_node_t *node, const char *expected)
 
void pcmk__reap_unseen_nodes (uint64_t ring_id)
 
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)
 
bool pcmk__cluster_send_message (const crm_node_t *node, enum crm_ais_msg_types service, const xmlNode *data)
 
void pcmk__cluster_init_node_caches (void)
 
void pcmk__cluster_destroy_node_caches (void)
 
void pcmk__cluster_set_autoreap (bool enable)
 
void pcmk__cluster_set_status_callback (void(*dispatch)(enum crm_status_type, crm_node_t *, const void *))
 
bool pcmk__cluster_is_node_active (const crm_node_t *node)
 
unsigned int pcmk__cluster_num_active_nodes (void)
 
unsigned int pcmk__cluster_num_remote_nodes (void)
 
crm_node_tpcmk__cluster_lookup_remote_node (const char *node_name)
 
void pcmk__cluster_forget_cluster_node (uint32_t id, const char *node_name)
 
void pcmk__cluster_forget_remote_node (const char *node_name)
 
crm_node_tpcmk__search_node_caches (unsigned int id, const char *uname, uint32_t flags)
 
void pcmk__purge_node_from_cache (const char *node_name, uint32_t node_id)
 
void pcmk__refresh_node_caches_from_cib (xmlNode *cib)
 
crm_node_tpcmk__get_node (unsigned int id, const char *uname, const char *uuid, uint32_t flags)
 

Enumeration Type Documentation

◆ crm_proc_flag

Enumerator
crm_proc_none 
crm_proc_cpg 

Definition at line 20 of file internal.h.

◆ pcmk__node_search_flags

Enumerator
pcmk__node_search_none 

Does not affect search.

pcmk__node_search_cluster_member 

Search for cluster nodes from membership cache.

pcmk__node_search_remote 

Search for remote nodes.

pcmk__node_search_any 

Search for cluster member nodes and remote nodes.

pcmk__node_search_cluster_cib 

Search for cluster nodes from CIB (as of last cache refresh)

Definition at line 32 of file internal.h.

Function Documentation

◆ crm_update_peer_proc()

crm_node_t* crm_update_peer_proc ( const char *  source,
crm_node_t peer,
uint32_t  flag,
const char *  status 
)

Definition at line 1059 of file membership.c.

◆ pcmk__cluster_destroy_node_caches()

void pcmk__cluster_destroy_node_caches ( void  )

Definition at line 557 of file membership.c.

◆ pcmk__cluster_forget_cluster_node()

void pcmk__cluster_forget_cluster_node ( uint32_t  id,
const char *  node_name 
)

Definition at line 442 of file membership.c.

◆ pcmk__cluster_forget_remote_node()

void pcmk__cluster_forget_remote_node ( const char *  node_name)

Definition at line 196 of file membership.c.

◆ pcmk__cluster_init_node_caches()

void pcmk__cluster_init_node_caches ( void  )

Definition at line 537 of file membership.c.

◆ pcmk__cluster_is_node_active()

bool pcmk__cluster_is_node_active ( const crm_node_t node)

Definition at line 347 of file membership.c.

◆ pcmk__cluster_local_node_name()

const char* pcmk__cluster_local_node_name ( void  )

Definition at line 325 of file cluster.c.

◆ pcmk__cluster_lookup_remote_node()

crm_node_t* pcmk__cluster_lookup_remote_node ( const char *  node_name)

Definition at line 122 of file membership.c.

◆ pcmk__cluster_node_name()

char* pcmk__cluster_node_name ( uint32_t  nodeid)

Definition at line 269 of file cluster.c.

◆ pcmk__cluster_node_uuid()

const char* pcmk__cluster_node_uuid ( crm_node_t node)

Definition at line 89 of file cluster.c.

◆ pcmk__cluster_num_active_nodes()

unsigned int pcmk__cluster_num_active_nodes ( void  )

Definition at line 507 of file membership.c.

◆ pcmk__cluster_num_remote_nodes()

unsigned int pcmk__cluster_num_remote_nodes ( void  )

Definition at line 98 of file membership.c.

◆ pcmk__cluster_parse_msg_type()

enum crm_ais_msg_types pcmk__cluster_parse_msg_type ( const char *  text)

Definition at line 44 of file cluster.c.

◆ pcmk__cluster_send_message()

bool pcmk__cluster_send_message ( const crm_node_t node,
enum crm_ais_msg_types  service,
const xmlNode *  data 
)

Definition at line 236 of file cluster.c.

◆ pcmk__cluster_set_autoreap()

void pcmk__cluster_set_autoreap ( bool  enable)

Definition at line 616 of file membership.c.

◆ pcmk__cluster_set_status_callback()

void pcmk__cluster_set_status_callback ( void(*)(enum crm_status_type, crm_node_t *, const void *)  dispatch)

Definition at line 594 of file membership.c.

◆ pcmk__corosync_quorum_connect()

void pcmk__corosync_quorum_connect ( gboolean(*)(unsigned long long, gboolean)  dispatch,
void(*)(gpointer)  destroy 
)

Definition at line 343 of file corosync.c.

◆ pcmk__get_node()

crm_node_t* pcmk__get_node ( unsigned int  id,
const char *  uname,
const char *  uuid,
uint32_t  flags 
)

Definition at line 890 of file membership.c.

◆ pcmk__node_name_from_uuid()

const char* pcmk__node_name_from_uuid ( const char *  uuid)

Definition at line 347 of file cluster.c.

◆ pcmk__purge_node_from_cache()

void pcmk__purge_node_from_cache ( const char *  node_name,
uint32_t  node_id 
)

Definition at line 808 of file membership.c.

◆ pcmk__reap_unseen_nodes()

void pcmk__reap_unseen_nodes ( uint64_t  ring_id)

Definition at line 1291 of file membership.c.

◆ pcmk__refresh_node_caches_from_cib()

void pcmk__refresh_node_caches_from_cib ( xmlNode *  cib)

Definition at line 1439 of file membership.c.

◆ pcmk__search_node_caches()

crm_node_t* pcmk__search_node_caches ( unsigned int  id,
const char *  uname,
uint32_t  flags 
)

Definition at line 765 of file membership.c.

◆ pcmk__update_peer_expected()

void pcmk__update_peer_expected ( const char *  source,
crm_node_t node,
const char *  expected 
)

Definition at line 1153 of file membership.c.

◆ pcmk__update_peer_state()

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.

Parameters
[in]sourceCaller's function name (for log messages)
[in,out]nodeNode object to update
[in]stateNode's new state
[in]membershipNode's new membership ID
Returns
NULL if any node was reaped, value of node otherwise
Note
If this function returns NULL, the supplied node object was likely freed and should not be used again. This function should not be called within a cache iteration if reaping is possible, otherwise reaping could invalidate the iterator.

Definition at line 1278 of file membership.c.