pacemaker 3.0.1-16e74fc4da
Scalable High-Availability cluster resource manager
Loading...
Searching...
No Matches
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
24extern "C" {
25#endif
26
27#if defined(PCMK__UNIT_TESTING)
28#undef G_GNUC_INTERNAL
29#define G_GNUC_INTERNAL
30#endif
31
32typedef 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
53G_GNUC_INTERNAL
56
57G_GNUC_INTERNAL
59 notify_data_t *n_data);
60
61G_GNUC_INTERNAL
63
64G_GNUC_INTERNAL
66 const char *task,
68 pcmk_action_t *complete);
69
70G_GNUC_INTERNAL
71void pe__force_anon(const char *standard, pcmk_resource_t *rsc, const char *rid,
73
74G_GNUC_INTERNAL
75gint pe__cmp_rsc_priority(gconstpointer a, gconstpointer b);
76
77G_GNUC_INTERNAL
78gboolean pe__unpack_resource(xmlNode *xml_obj, pcmk_resource_t **rsc,
81
82G_GNUC_INTERNAL
83gboolean unpack_remote_nodes(xmlNode *xml_resources,
85
86G_GNUC_INTERNAL
87gboolean unpack_resources(const xmlNode *xml_resources,
89
90G_GNUC_INTERNAL
91void pcmk__validate_fencing_topology(const xmlNode *xml);
92
93G_GNUC_INTERNAL
94gboolean unpack_config(xmlNode *config, pcmk_scheduler_t *scheduler);
95
96G_GNUC_INTERNAL
97gboolean unpack_nodes(xmlNode *xml_nodes, pcmk_scheduler_t *scheduler);
98
99G_GNUC_INTERNAL
100gboolean unpack_tags(xmlNode *xml_tags, pcmk_scheduler_t *scheduler);
101
102G_GNUC_INTERNAL
103gboolean unpack_status(xmlNode *status, pcmk_scheduler_t *scheduler);
104
105G_GNUC_INTERNAL
107 const char *agent,
108 pcmk_node_t *node,
110
111G_GNUC_INTERNAL
113
114// Primitive resource methods
115
116G_GNUC_INTERNAL
117unsigned int pe__primitive_max_per_node(const pcmk_resource_t *rsc);
118
119// Group resource methods
120
121G_GNUC_INTERNAL
122unsigned int pe__group_max_per_node(const pcmk_resource_t *rsc);
123
124// Clone resource methods
125
126G_GNUC_INTERNAL
127unsigned int pe__clone_max_per_node(const pcmk_resource_t *rsc);
128
129// Bundle resource methods
130
131G_GNUC_INTERNAL
133 unsigned int *count_all,
134 unsigned int *count_clean);
135
136G_GNUC_INTERNAL
137unsigned 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
const char * parent
Definition cib.c:27
pcmk_scheduler_t * scheduler
const char * action
Definition pcmk_fence.c:32
G_GNUC_INTERNAL void pe__free_action_notification_data(notify_data_t *n_data)
Definition pe_notif.c:979
G_GNUC_INTERNAL unsigned int pe__bundle_max_per_node(const pcmk_resource_t *rsc)
Definition bundle.c:2092
G_GNUC_INTERNAL gboolean unpack_resources(const xmlNode *xml_resources, pcmk_scheduler_t *scheduler)
Definition unpack.c:824
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 gint pe__cmp_rsc_priority(gconstpointer a, gconstpointer b)
Definition utils.c:332
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 gboolean unpack_tags(xmlNode *xml_tags, pcmk_scheduler_t *scheduler)
Definition unpack.c:934
struct notify_data_s notify_data_t
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:686
G_GNUC_INTERNAL void pe__create_action_notifications(pcmk_resource_t *rsc, notify_data_t *n_data)
Definition pe_notif.c:962
G_GNUC_INTERNAL void pe__unpack_node_health_scores(pcmk_scheduler_t *scheduler)
Definition pe_health.c:24
G_GNUC_INTERNAL unsigned int pe__group_max_per_node(const pcmk_resource_t *rsc)
Definition group.c:466
G_GNUC_INTERNAL gboolean unpack_remote_nodes(xmlNode *xml_resources, pcmk_scheduler_t *scheduler)
Definition unpack.c:692
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:550
G_GNUC_INTERNAL void pcmk__validate_fencing_topology(const xmlNode *xml)
Definition unpack.c:899
G_GNUC_INTERNAL gboolean unpack_status(xmlNode *status, pcmk_scheduler_t *scheduler)
Definition unpack.c:1397
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:440
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:2008
G_GNUC_INTERNAL gboolean unpack_nodes(xmlNode *xml_nodes, pcmk_scheduler_t *scheduler)
Definition unpack.c:610
G_GNUC_INTERNAL unsigned int pe__clone_max_per_node(const pcmk_resource_t *rsc)
Definition clone.c:1253
G_GNUC_INTERNAL unsigned int pe__primitive_max_per_node(const pcmk_resource_t *rsc)
Definition native.c:1153
G_GNUC_INTERNAL gboolean unpack_config(xmlNode *config, pcmk_scheduler_t *scheduler)
Definition unpack.c:219
Type aliases needed to define scheduler objects.
pcmk_action_t * pre
const char * action
GHashTable * allowed_nodes
pcmk_action_t * post
pcmk_action_t * pre_done
pcmk_action_t * post_done