1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
|
/*
* Copyright 2004-2024 the Pacemaker project contributors
*
* The version control history for this file may have further details.
*
* This source code is licensed under the GNU Lesser General Public License
* version 2.1 or later (LGPLv2.1+) WITHOUT ANY WARRANTY.
*/
#ifndef PCMK__CRM_CLUSTER_COMPAT__H
# define PCMK__CRM_CLUSTER_COMPAT__H
#include <stdint.h> // uint32_t
#include <sys/types.h> // size_t
#include <glib.h> // gboolean, guint
#include <libxml/tree.h> // xmlNode
#if SUPPORT_COROSYNC
#include <corosync/cpg.h> // cpg_handle_t
#endif // SUPPORT_COROSYNC
#include <crm/cluster.h> // crm_node_t
#ifdef __cplusplus
extern "C" {
#endif
/**
* \file
* \brief Deprecated Pacemaker cluster API
* \ingroup cluster
* \deprecated Do not include this header directly. The cluster APIs in this
* header, and the header itself, will be removed in a future
* release.
*/
//! \deprecated Do not use
enum crm_get_peer_flags {
CRM_GET_PEER_CLUSTER = 0x0001,
CRM_GET_PEER_REMOTE = 0x0002,
CRM_GET_PEER_ANY = CRM_GET_PEER_CLUSTER|CRM_GET_PEER_REMOTE,
};
// NOTE: sbd (as of at least 1.5.2) uses this
//! \deprecated Use \c pcmk_cluster_t instead
typedef pcmk_cluster_t crm_cluster_t;
//! \deprecated Do not use Pacemaker for cluster node cacheing
crm_node_t *crm_get_peer(unsigned int id, const char *uname);
//! \deprecated Do not use Pacemaker for cluster node cacheing
crm_node_t *crm_get_peer_full(unsigned int id, const char *uname, int flags);
//! \deprecated Use stonith_api_kick() from libstonithd instead
int crm_terminate_member(int nodeid, const char *uname, void *unused);
//! \deprecated Use \c stonith_api_kick() from libstonithd instead
int crm_terminate_member_no_mainloop(int nodeid, const char *uname,
int *connection);
/*!
* \deprecated Use
* <tt>crm_xml_add(xml, attr, pcmk__cluster_node_uuid(node))</tt>
* instead
*/
void set_uuid(xmlNode *xml, const char *attr, crm_node_t *node);
#if SUPPORT_COROSYNC
//! \deprecated Do not use
gboolean cluster_connect_cpg(pcmk_cluster_t *cluster);
//! \deprecated Do not use
void cluster_disconnect_cpg(pcmk_cluster_t *cluster);
//! \deprecated Do not use
uint32_t get_local_nodeid(cpg_handle_t handle);
//! \deprecated Do not use
void pcmk_cpg_membership(cpg_handle_t handle,
const struct cpg_name *group_name,
const struct cpg_address *member_list,
size_t member_list_entries,
const struct cpg_address *left_list,
size_t left_list_entries,
const struct cpg_address *joined_list,
size_t joined_list_entries);
//! \deprecated Do not use
gboolean crm_is_corosync_peer_active(const crm_node_t * node);
//! \deprecated Do not use
gboolean send_cluster_text(enum crm_ais_msg_class msg_class, const char *data,
gboolean local, const crm_node_t *node,
enum crm_ais_msg_types dest);
//! \deprecated Do not use
char *pcmk_message_common_cs(cpg_handle_t handle, uint32_t nodeid, uint32_t pid,
void *msg, uint32_t *kind, const char **from);
#endif // SUPPORT_COROSYNC
// NOTE: sbd (as of at least 1.5.2) uses this
//! \deprecated Use \c pcmk_cluster_connect() instead
gboolean crm_cluster_connect(pcmk_cluster_t *cluster);
//! \deprecated Use \c pcmk_cluster_disconnect() instead
void crm_cluster_disconnect(pcmk_cluster_t *cluster);
//! \deprecated Do not use
int crm_remote_peer_cache_size(void);
//! \deprecated Do not use
void crm_remote_peer_cache_refresh(xmlNode *cib);
//! \deprecated Do not use
crm_node_t *crm_remote_peer_get(const char *node_name);
//! \deprecated Do not use
void crm_remote_peer_cache_remove(const char *node_name);
//! \deprecated Do not use
gboolean crm_is_peer_active(const crm_node_t *node);
//! \deprecated Do not use
guint crm_active_peers(void);
//! \deprecated Do not use
guint reap_crm_member(uint32_t id, const char *name);
// NOTE: sbd (as of at least 1.5.2) uses this enum
//!@{
//! \deprecated Use <tt>enum pcmk_cluster_layer</tt> instead
enum cluster_type_e {
// NOTE: sbd (as of at least 1.5.2) uses this value
pcmk_cluster_unknown = pcmk_cluster_layer_unknown,
pcmk_cluster_invalid = pcmk_cluster_layer_invalid,
// NOTE: sbd (as of at least 1.5.2) uses this value
pcmk_cluster_corosync = pcmk_cluster_layer_corosync,
};
//!@}
// NOTE: sbd (as of at least 1.5.2) uses this
//! \deprecated Use \c pcmk_cluster_layer_text() instead
const char *name_for_cluster_type(enum cluster_type_e type);
// NOTE: sbd (as of at least 1.5.2) uses this
//! \deprecated Use \c pcmk_get_cluster_layer() instead
enum cluster_type_e get_cluster_type(void);
//! \deprecated Use \c pcmk_get_cluster_layer() instead
gboolean is_corosync_cluster(void);
//! \deprecated Do not use
void crm_peer_init(void);
//! \deprecated Do not use
void crm_peer_destroy(void);
//! \deprecated Do not use
gboolean send_cluster_message(const crm_node_t *node,
enum crm_ais_msg_types service,
const xmlNode *data, gboolean ordered);
//! \deprecated Do not use
const char *crm_peer_uuid(crm_node_t *node);
//! \deprecated Do not use
enum crm_ais_msg_types text2msg_type(const char *text);
//! \deprecated Do not use
char *get_node_name(uint32_t nodeid);
//! \deprecated Do not use
const char *get_local_node_name(void);
//! \deprecated Do not use
void crm_set_autoreap(gboolean enable);
//! \deprecated Do not use
void crm_set_status_callback(void (*dispatch)(enum crm_status_type,
crm_node_t *, const void *));
//! \deprecated Do not use
const char *crm_peer_uname(const char *uuid);
#ifdef __cplusplus
}
#endif
#endif // PCMK_CLUSTER_COMPAT__H
|