#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 "crmcluster_private.h"
Go to the source code of this file.
Connect to the cluster layer.
- Parameters
-
[in] | Initialized | cluster object to connect |
- Returns
- TRUE on success, otherwise FALSE
Definition at line 75 of file cluster.c.
Disconnect from the cluster layer.
- Parameters
-
[in] | cluster | Cluster object to disconnect |
Definition at line 102 of file cluster.c.
const char* crm_peer_uname |
( |
const char * |
uuid | ) |
|
Get the node name corresponding to a node UUID.
- Parameters
-
[in] | uuid | UUID 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 221 of file cluster.c.
Get (and set if needed) a node's UUID.
- Parameters
-
- Returns
- Node UUID of
peer
, or NULL if unknown
Definition at line 38 of file cluster.c.
CRM_TRACE_INIT_DATA |
( |
cluster |
| ) |
|
Get (and validate) the local cluster type.
- Returns
- Local cluster type
- Note
- This will fatally exit if the local cluster type is invalid.
Definition at line 311 of file cluster.c.
const char* get_local_node_name |
( |
void |
| ) |
|
Get the local node's name.
- Returns
- Local node's name
- Note
- This will fatally exit if local node name cannot be known.
Definition at line 155 of file cluster.c.
char* get_node_name |
( |
uint32_t |
nodeid | ) |
|
Get the node name corresponding to a cluster node ID.
- Parameters
-
[in] | nodeid | Node ID to check (or 0 for local node) |
- Returns
- Node name corresponding to
nodeid
- Note
- This will fatally exit if
nodeid
is 0 and local node name cannot be known.
Definition at line 175 of file cluster.c.
gboolean is_corosync_cluster |
( |
void |
| ) |
|
Check whether the local cluster is a Corosync cluster.
- Returns
- TRUE if the local cluster is a Corosync cluster, otherwise FALSE
Definition at line 375 of file cluster.c.
Get a log-friendly string equivalent of a cluster type.
- Parameters
-
- Returns
- Log-friendly string corresponding to
type
Definition at line 290 of file cluster.c.
Send an XML message via the cluster messaging layer.
- Parameters
-
[in] | node | Cluster node to send message to |
[in] | service | Message type to use in message host info |
[in] | data | XML message to send |
[in] | ordered | Ignored for currently supported messaging layers |
- Returns
- TRUE on success, otherwise FALSE
Definition at line 133 of file cluster.c.
void set_uuid |
( |
xmlNode * |
xml, |
|
|
const char * |
attr, |
|
|
crm_node_t * |
node |
|
) |
| |
Add a node's UUID as an XML attribute.
- Parameters
-
[in,out] | xml | XML element to add UUID to |
[in] | attr | XML attribute name to set |
[in] | node | Node whose UUID should be used as attribute value |
Definition at line 277 of file cluster.c.