#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"
#include <crm/cluster/compat.h>
Go to the source code of this file.
◆ crm_cluster_connect()
Connect to the cluster layer.
- Parameters
-
[in,out] | Initialized | cluster object to connect |
- Returns
- TRUE on success, otherwise FALSE
Definition at line 75 of file cluster.c.
◆ crm_cluster_disconnect()
Disconnect from the cluster layer.
- Parameters
-
[in,out] | cluster | Cluster object to disconnect |
Definition at line 101 of file cluster.c.
◆ crm_peer_uname()
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 250 of file cluster.c.
◆ crm_peer_uuid()
Get (and set if needed) a node's UUID.
- Parameters
-
[in,out] | peer | Node to check |
- Returns
- Node UUID of
peer
, or NULL if unknown
Definition at line 38 of file cluster.c.
◆ CRM_TRACE_INIT_DATA()
CRM_TRACE_INIT_DATA |
( |
cluster |
| ) |
|
◆ get_cluster_type()
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 325 of file cluster.c.
◆ get_local_node_name()
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 184 of file cluster.c.
◆ get_node_name()
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 204 of file cluster.c.
◆ is_corosync_cluster()
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 389 of file cluster.c.
◆ name_for_cluster_type()
Get a log-friendly string equivalent of a cluster type.
- Parameters
-
- Returns
- Log-friendly string corresponding to
type
Definition at line 304 of file cluster.c.
◆ pcmk_cluster_free()
Free a crm_cluster_t
object and its dynamically allocated members.
- Parameters
-
[in,out] | cluster | Cluster object to free |
Definition at line 141 of file cluster.c.
◆ pcmk_cluster_new()
Allocate a new crm_cluster_t
object.
- Returns
- A newly allocated
crm_cluster_t
object (guaranteed not NULL
)
- Note
- The caller is responsible for freeing the return value using
pcmk_cluster_free()
.
Definition at line 127 of file cluster.c.
◆ send_cluster_message()
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 162 of file cluster.c.
◆ set_uuid()
void set_uuid |
( |
xmlNode * |
xml, |
|
|
const char * |
attr, |
|
|
crm_node_t * |
node |
|
) |
| |