pacemaker  3.0.0-d8340737c4
Scalable High-Availability cluster resource manager
pe_status_private.h
Go to the documentation of this file.
1 /*
2  * Copyright 2018-2024 the Pacemaker project contributors
3  *
4  * The version control history for this file may have further details.
5  *
6  * This source code is licensed under the GNU Lesser General Public License
7  * version 2.1 or later (LGPLv2.1+) WITHOUT ANY WARRANTY.
8  */
9 
10 #ifndef PCMK__PENGINE_PE_STATUS_PRIVATE__H
11 #define PCMK__PENGINE_PE_STATUS_PRIVATE__H
12 
13 /* This header is for the sole use of libpe_status, so that functions can be
14  * declared with G_GNUC_INTERNAL for efficiency.
15  */
16 
17 #include <glib.h> // G_GNUC_INTERNAL, GSList, GList, etc.
18 #include <libxml/tree.h> // xmlNode
19 
20 #include <crm/common/digest_internal.h> // pcmk__op_digest_t
21 #include <crm/common/scheduler_types.h> // pcmk_action_t, etc.
22 
23 #ifdef __cplusplus
24 extern "C" {
25 #endif
26 
27 #if defined(PCMK__UNIT_TESTING)
28 #undef G_GNUC_INTERNAL
29 #define G_GNUC_INTERNAL
30 #endif
31 
32 typedef struct notify_data_s {
33  GSList *keys; // Environment variable name/value pairs
34 
35  const char *action;
36 
41 
42  GList *active; /* notify_entry_t* */
43  GList *inactive; /* notify_entry_t* */
44  GList *start; /* notify_entry_t* */
45  GList *stop; /* notify_entry_t* */
46  GList *demote; /* notify_entry_t* */
47  GList *promote; /* notify_entry_t* */
48  GList *promoted; /* notify_entry_t* */
49  GList *unpromoted; /* notify_entry_t* */
50  GHashTable *allowed_nodes;
52 
53 G_GNUC_INTERNAL
56 
57 G_GNUC_INTERNAL
59  notify_data_t *n_data);
60 
61 G_GNUC_INTERNAL
63 
64 G_GNUC_INTERNAL
66  const char *task,
68  pcmk_action_t *complete);
69 
70 G_GNUC_INTERNAL
71 void pe__force_anon(const char *standard, pcmk_resource_t *rsc, const char *rid,
73 
74 G_GNUC_INTERNAL
75 gint pe__cmp_rsc_priority(gconstpointer a, gconstpointer b);
76 
77 G_GNUC_INTERNAL
78 gboolean pe__unpack_resource(xmlNode *xml_obj, pcmk_resource_t **rsc,
81 
82 G_GNUC_INTERNAL
83 gboolean unpack_remote_nodes(xmlNode *xml_resources,
85 
86 G_GNUC_INTERNAL
87 gboolean unpack_resources(const xmlNode *xml_resources,
89 
90 G_GNUC_INTERNAL
91 void pcmk__validate_fencing_topology(const xmlNode *xml);
92 
93 G_GNUC_INTERNAL
94 gboolean unpack_config(xmlNode *config, pcmk_scheduler_t *scheduler);
95 
96 G_GNUC_INTERNAL
97 gboolean unpack_nodes(xmlNode *xml_nodes, pcmk_scheduler_t *scheduler);
98 
99 G_GNUC_INTERNAL
100 gboolean unpack_tags(xmlNode *xml_tags, pcmk_scheduler_t *scheduler);
101 
102 G_GNUC_INTERNAL
103 gboolean unpack_status(xmlNode *status, pcmk_scheduler_t *scheduler);
104 
105 G_GNUC_INTERNAL
107  const char *agent,
108  pcmk_node_t *node,
110 
111 G_GNUC_INTERNAL
113 
114 // Primitive resource methods
115 
116 G_GNUC_INTERNAL
117 unsigned int pe__primitive_max_per_node(const pcmk_resource_t *rsc);
118 
119 // Group resource methods
120 
121 G_GNUC_INTERNAL
122 unsigned int pe__group_max_per_node(const pcmk_resource_t *rsc);
123 
124 // Clone resource methods
125 
126 G_GNUC_INTERNAL
127 unsigned int pe__clone_max_per_node(const pcmk_resource_t *rsc);
128 
129 // Bundle resource methods
130 
131 G_GNUC_INTERNAL
133  unsigned int *count_all,
134  unsigned int *count_clean);
135 
136 G_GNUC_INTERNAL
137 unsigned int pe__bundle_max_per_node(const pcmk_resource_t *rsc);
138 
139 #ifdef __cplusplus
140 }
141 #endif
142 
143 #endif // PCMK__PENGINE_PE_STATUS_PRIVATE__H
GHashTable * allowed_nodes
G_GNUC_INTERNAL pcmk_node_t * pe__bundle_active_node(const pcmk_resource_t *rsc, unsigned int *count_all, unsigned int *count_clean)
Definition: bundle.c:2001
Type aliases needed to define scheduler objects.
G_GNUC_INTERNAL unsigned int pe__clone_max_per_node(const pcmk_resource_t *rsc)
Definition: clone.c:1251
pcmk_action_t * pre
G_GNUC_INTERNAL gboolean unpack_remote_nodes(xmlNode *xml_resources, pcmk_scheduler_t *scheduler)
Definition: unpack.c:683
G_GNUC_INTERNAL void pcmk__validate_fencing_topology(const xmlNode *xml)
Definition: unpack.c:890
pcmk_action_t * post
pcmk_action_t * pre_done
G_GNUC_INTERNAL unsigned int pe__bundle_max_per_node(const pcmk_resource_t *rsc)
Definition: bundle.c:2085
G_GNUC_INTERNAL gboolean unpack_resources(const xmlNode *xml_resources, pcmk_scheduler_t *scheduler)
Definition: unpack.c:815
G_GNUC_INTERNAL void pe__unpack_node_health_scores(pcmk_scheduler_t *scheduler)
Definition: pe_health.c:24
const char * action
Definition: pcmk_fence.c:32
G_GNUC_INTERNAL gboolean unpack_status(xmlNode *status, pcmk_scheduler_t *scheduler)
Definition: unpack.c:1388
G_GNUC_INTERNAL void pe__force_anon(const char *standard, pcmk_resource_t *rsc, const char *rid, pcmk_scheduler_t *scheduler)
Definition: clone.c:205
G_GNUC_INTERNAL pcmk_resource_t * pe__create_clone_child(pcmk_resource_t *rsc, pcmk_scheduler_t *scheduler)
Definition: clone.c:222
G_GNUC_INTERNAL gboolean unpack_nodes(xmlNode *xml_nodes, pcmk_scheduler_t *scheduler)
Definition: unpack.c:601
pcmk_action_t * post_done
G_GNUC_INTERNAL unsigned int pe__primitive_max_per_node(const pcmk_resource_t *rsc)
Definition: native.c:1174
G_GNUC_INTERNAL gboolean pe__unpack_resource(xmlNode *xml_obj, pcmk_resource_t **rsc, pcmk_resource_t *parent, pcmk_scheduler_t *scheduler)
Definition: complex.c:700
G_GNUC_INTERNAL notify_data_t * pe__action_notif_pseudo_ops(pcmk_resource_t *rsc, const char *task, pcmk_action_t *action, pcmk_action_t *complete)
Definition: pe_notif.c:436
G_GNUC_INTERNAL void pe__create_action_notifications(pcmk_resource_t *rsc, notify_data_t *n_data)
Definition: pe_notif.c:951
G_GNUC_INTERNAL gint pe__cmp_rsc_priority(gconstpointer a, gconstpointer b)
Definition: utils.c:299
pcmk_scheduler_t * scheduler
G_GNUC_INTERNAL unsigned int pe__group_max_per_node(const pcmk_resource_t *rsc)
Definition: group.c:466
G_GNUC_INTERNAL pcmk__op_digest_t * pe__compare_fencing_digest(pcmk_resource_t *rsc, const char *agent, pcmk_node_t *node, pcmk_scheduler_t *scheduler)
Definition: pe_digest.c:549
G_GNUC_INTERNAL gboolean unpack_config(xmlNode *config, pcmk_scheduler_t *scheduler)
Definition: unpack.c:217
const char * parent
Definition: cib.c:27
struct notify_data_s notify_data_t
const char * action
G_GNUC_INTERNAL void pe__free_action_notification_data(notify_data_t *n_data)
Definition: pe_notif.c:968
G_GNUC_INTERNAL gboolean unpack_tags(xmlNode *xml_tags, pcmk_scheduler_t *scheduler)
Definition: unpack.c:925