pacemaker
2.1.9-49aab99839
Scalable High-Availability cluster resource manager
|
#include <crm_internal.h>
#include <inttypes.h>
#include <sys/param.h>
#include <sys/types.h>
#include <stdio.h>
#include <unistd.h>
#include <string.h>
#include <glib.h>
#include <crm/common/ipc.h>
#include <crm/common/xml_internal.h>
#include <crm/cluster/internal.h>
#include <crm/common/xml.h>
#include <crm/stonith-ng.h>
#include "crmcluster_private.h"
#include <crm/cluster/compat.h>
Go to the source code of this file.
Macros | |
#define | _GNU_SOURCE |
#define | set_peer_flags(peer, flags_to_set) |
#define | clear_peer_flags(peer, flags_to_clear) |
Functions | |
unsigned int | pcmk__cluster_num_remote_nodes (void) |
crm_node_t * | pcmk__cluster_lookup_remote_node (const char *node_name) |
void | pcmk__cluster_forget_remote_node (const char *node_name) |
bool | pcmk__cluster_is_node_active (const crm_node_t *node) |
void | pcmk__cluster_forget_cluster_node (uint32_t id, const char *node_name) |
unsigned int | pcmk__cluster_num_active_nodes (void) |
void | pcmk__cluster_init_node_caches (void) |
void | pcmk__cluster_destroy_node_caches (void) |
void | pcmk__cluster_set_status_callback (void(*dispatch)(enum crm_status_type, crm_node_t *, const void *)) |
void | pcmk__cluster_set_autoreap (bool enable) |
crm_node_t * | pcmk__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) |
crm_node_t * | pcmk__get_node (unsigned int id, const char *uname, const char *uuid, uint32_t flags) |
crm_node_t * | crm_update_peer_proc (const char *source, crm_node_t *node, uint32_t flag, const char *status) |
void | pcmk__update_peer_expected (const char *source, crm_node_t *node, const char *expected) |
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. More... | |
void | pcmk__reap_unseen_nodes (uint64_t membership) |
void | pcmk__refresh_node_caches_from_cib (xmlNode *cib) |
int | crm_terminate_member (int nodeid, const char *uname, void *unused) |
int | crm_terminate_member_no_mainloop (int nodeid, const char *uname, int *connection) |
crm_node_t * | crm_get_peer (unsigned int id, const char *uname) |
crm_node_t * | crm_get_peer_full (unsigned int id, const char *uname, int flags) |
int | crm_remote_peer_cache_size (void) |
void | crm_remote_peer_cache_refresh (xmlNode *cib) |
crm_node_t * | crm_remote_peer_get (const char *node_name) |
void | crm_remote_peer_cache_remove (const char *node_name) |
gboolean | crm_is_peer_active (const crm_node_t *node) |
guint | crm_active_peers (void) |
guint | reap_crm_member (uint32_t id, const char *name) |
void | crm_peer_init (void) |
void | crm_peer_destroy (void) |
void | crm_set_autoreap (gboolean enable) |
void | crm_set_status_callback (void(*dispatch)(enum crm_status_type, crm_node_t *, const void *)) |
Variables | |
GHashTable * | crm_peer_cache = NULL |
GHashTable * | crm_remote_peer_cache = NULL |
unsigned long long | crm_peer_seq = 0 |
gboolean | crm_have_quorum = FALSE |
#define _GNU_SOURCE |
Definition at line 13 of file membership.c.
#define clear_peer_flags | ( | peer, | |
flags_to_clear | |||
) |
Definition at line 80 of file membership.c.
#define set_peer_flags | ( | peer, | |
flags_to_set | |||
) |
Definition at line 73 of file membership.c.
guint crm_active_peers | ( | void | ) |
Definition at line 1507 of file membership.c.
crm_node_t* crm_get_peer | ( | unsigned int | id, |
const char * | uname | ||
) |
Definition at line 1463 of file membership.c.
crm_node_t* crm_get_peer_full | ( | unsigned int | id, |
const char * | uname, | ||
int | flags | ||
) |
Definition at line 1469 of file membership.c.
gboolean crm_is_peer_active | ( | const crm_node_t * | node | ) |
Definition at line 1501 of file membership.c.
void crm_peer_destroy | ( | void | ) |
Definition at line 1552 of file membership.c.
void crm_peer_init | ( | void | ) |
Definition at line 1546 of file membership.c.
void crm_remote_peer_cache_refresh | ( | xmlNode * | cib | ) |
Definition at line 1483 of file membership.c.
void crm_remote_peer_cache_remove | ( | const char * | node_name | ) |
Definition at line 1495 of file membership.c.
int crm_remote_peer_cache_size | ( | void | ) |
Definition at line 1475 of file membership.c.
crm_node_t* crm_remote_peer_get | ( | const char * | node_name | ) |
Definition at line 1489 of file membership.c.
void crm_set_autoreap | ( | gboolean | enable | ) |
Definition at line 1558 of file membership.c.
void crm_set_status_callback | ( | void(*)(enum crm_status_type, crm_node_t *, const void *) | dispatch | ) |
Definition at line 1564 of file membership.c.
int crm_terminate_member | ( | int | nodeid, |
const char * | uname, | ||
void * | unused | ||
) |
Definition at line 1451 of file membership.c.
int crm_terminate_member_no_mainloop | ( | int | nodeid, |
const char * | uname, | ||
int * | connection | ||
) |
stonith_api_kick()
from libstonithd instead Definition at line 1457 of file membership.c.
crm_node_t* crm_update_peer_proc | ( | const char * | source, |
crm_node_t * | node, | ||
uint32_t | flag, | ||
const char * | status | ||
) |
Definition at line 1059 of file membership.c.
void pcmk__cluster_destroy_node_caches | ( | void | ) |
Definition at line 557 of file membership.c.
void pcmk__cluster_forget_cluster_node | ( | uint32_t | id, |
const char * | node_name | ||
) |
Definition at line 442 of file membership.c.
void pcmk__cluster_forget_remote_node | ( | const char * | node_name | ) |
Definition at line 196 of file membership.c.
void pcmk__cluster_init_node_caches | ( | void | ) |
Definition at line 537 of file membership.c.
bool pcmk__cluster_is_node_active | ( | const crm_node_t * | node | ) |
Definition at line 347 of file membership.c.
crm_node_t* pcmk__cluster_lookup_remote_node | ( | const char * | node_name | ) |
Definition at line 122 of file membership.c.
unsigned int pcmk__cluster_num_active_nodes | ( | void | ) |
Definition at line 507 of file membership.c.
unsigned int pcmk__cluster_num_remote_nodes | ( | void | ) |
Definition at line 98 of file membership.c.
void pcmk__cluster_set_autoreap | ( | bool | enable | ) |
Definition at line 616 of file membership.c.
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.
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.
void pcmk__purge_node_from_cache | ( | const char * | node_name, |
uint32_t | node_id | ||
) |
Definition at line 808 of file membership.c.
void pcmk__reap_unseen_nodes | ( | uint64_t | membership | ) |
Definition at line 1291 of file membership.c.
void pcmk__refresh_node_caches_from_cib | ( | xmlNode * | cib | ) |
Definition at line 1439 of file membership.c.
crm_node_t* pcmk__search_node_caches | ( | unsigned int | id, |
const char * | uname, | ||
uint32_t | flags | ||
) |
Definition at line 765 of file membership.c.
void pcmk__update_peer_expected | ( | const char * | source, |
crm_node_t * | node, | ||
const char * | expected | ||
) |
Definition at line 1153 of file membership.c.
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.
[in] | source | Caller's function name (for log messages) |
[in,out] | node | Node object to update |
[in] | state | Node's new state |
[in] | membership | Node's new membership ID |
Definition at line 1278 of file membership.c.
guint reap_crm_member | ( | uint32_t | id, |
const char * | name | ||
) |
Definition at line 1513 of file membership.c.
gboolean crm_have_quorum = FALSE |
Definition at line 68 of file membership.c.
GHashTable* crm_peer_cache = NULL |
Definition at line 40 of file membership.c.
unsigned long long crm_peer_seq = 0 |
Definition at line 67 of file membership.c.
GHashTable* crm_remote_peer_cache = NULL |
Definition at line 57 of file membership.c.