pacemaker  2.0.2-debe490
Scalable High-Availability cluster resource manager
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Functions
cluster.c File Reference
#include <crm_internal.h>
#include <dlfcn.h>
#include <stdio.h>
#include <unistd.h>
#include <string.h>
#include <stdlib.h>
#include <time.h>
#include <sys/param.h>
#include <sys/types.h>
#include <crm/crm.h>
#include <crm/msg_xml.h>
#include <crm/common/ipc.h>
#include <crm/cluster/internal.h>
Include dependency graph for cluster.c:

Go to the source code of this file.

Functions

 CRM_TRACE_INIT_DATA (cluster)
 
const char * crm_peer_uuid (crm_node_t *peer)
 
gboolean crm_cluster_connect (crm_cluster_t *cluster)
 
void crm_cluster_disconnect (crm_cluster_t *cluster)
 
gboolean send_cluster_message (crm_node_t *node, enum crm_ais_msg_types service, xmlNode *data, gboolean ordered)
 
const char * get_local_node_name (void)
 
char * get_node_name (uint32_t nodeid)
 
const char * crm_peer_uname (const char *uuid)
 Get the node name corresponding to a node UUID. More...
 
void set_uuid (xmlNode *xml, const char *attr, crm_node_t *node)
 
const char * name_for_cluster_type (enum cluster_type_e type)
 
int set_cluster_type (enum cluster_type_e type)
 
enum cluster_type_e get_cluster_type (void)
 
gboolean is_corosync_cluster (void)
 
gboolean node_name_is_valid (const char *key, const char *name)
 

Function Documentation

gboolean crm_cluster_connect ( crm_cluster_t cluster)

Definition at line 59 of file cluster.c.

void crm_cluster_disconnect ( crm_cluster_t cluster)

Definition at line 81 of file cluster.c.

const char* crm_peer_uname ( const char *  uuid)

Get the node name corresponding to a node UUID.

Parameters
[in]uuidUUID of desired node
Returns
name of desired node
Note
This relies on the remote peer cache being populated with all remote nodes in the cluster, so callers should maintain that cache.

Definition at line 176 of file cluster.c.

const char* crm_peer_uuid ( crm_node_t peer)

Definition at line 28 of file cluster.c.

CRM_TRACE_INIT_DATA ( cluster  )
enum cluster_type_e get_cluster_type ( void  )

Definition at line 273 of file cluster.c.

const char* get_local_node_name ( void  )

Definition at line 118 of file cluster.c.

char* get_node_name ( uint32_t  nodeid)

Definition at line 130 of file cluster.c.

gboolean is_corosync_cluster ( void  )

Definition at line 328 of file cluster.c.

const char* name_for_cluster_type ( enum cluster_type_e  type)

Definition at line 234 of file cluster.c.

gboolean node_name_is_valid ( const char *  key,
const char *  name 
)

Definition at line 334 of file cluster.c.

gboolean send_cluster_message ( crm_node_t node,
enum crm_ais_msg_types  service,
xmlNode *  data,
gboolean  ordered 
)

Definition at line 102 of file cluster.c.

int set_cluster_type ( enum cluster_type_e  type)

Definition at line 253 of file cluster.c.

void set_uuid ( xmlNode *  xml,
const char *  attr,
crm_node_t node 
)

Definition at line 225 of file cluster.c.