pacemaker  2.1.2-ada5c3b36
Scalable High-Availability cluster resource manager
libpacemaker_private.h
Go to the documentation of this file.
1 /*
2  * Copyright 2021 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__LIBPACEMAKER_PRIVATE__H
11 # define PCMK__LIBPACEMAKER_PRIVATE__H
12 
13 /* This header is for the sole use of libpacemaker, so that functions can be
14  * declared with G_GNUC_INTERNAL for efficiency.
15  */
16 
17 #include <crm/pengine/pe_types.h> // pe_action_t, pe_node_t, pe_working_set_t
18 
19 G_GNUC_INTERNAL
21  pe_action_wrapper_t *input);
22 
23 G_GNUC_INTERNAL
24 void pcmk__order_vs_fence(pe_action_t *stonith_op, pe_working_set_t *data_set);
25 
26 G_GNUC_INTERNAL
28  pe_action_t *action, enum pe_ordering order,
29  pe_working_set_t *data_set);
30 
31 G_GNUC_INTERNAL
32 void pcmk__fence_guest(pe_node_t *node, pe_working_set_t *data_set);
33 
34 G_GNUC_INTERNAL
35 bool pcmk__node_unfenced(pe_node_t *node);
36 
37 G_GNUC_INTERNAL
39  const pe_working_set_t *data_set);
40 
41 G_GNUC_INTERNAL
42 pe_resource_t *pcmk__find_constraint_resource(GList *rsc_list, const char *id);
43 
44 G_GNUC_INTERNAL
45 xmlNode *pcmk__expand_tags_in_sets(xmlNode *xml_obj,
46  pe_working_set_t *data_set);
47 
48 G_GNUC_INTERNAL
49 bool pcmk__valid_resource_or_tag(pe_working_set_t *data_set, const char *id,
50  pe_resource_t **rsc, pe_tag_t **tag);
51 
52 G_GNUC_INTERNAL
53 bool pcmk__tag_to_set(xmlNode *xml_obj, xmlNode **rsc_set, const char *attr,
54  bool convert_rsc, pe_working_set_t *data_set);
55 
56 G_GNUC_INTERNAL
58 
59 
60 // Location constraints
61 
62 G_GNUC_INTERNAL
63 void pcmk__unpack_location(xmlNode *xml_obj, pe_working_set_t *data_set);
64 
65 G_GNUC_INTERNAL
66 pe__location_t *pcmk__new_location(const char *id, pe_resource_t *rsc,
67  int node_weight, const char *discover_mode,
68  pe_node_t *foo_node,
69  pe_working_set_t *data_set);
70 
71 G_GNUC_INTERNAL
73 
74 G_GNUC_INTERNAL
75 void pcmk__apply_location(pe__location_t *constraint, pe_resource_t *rsc);
76 
77 
78 // Colocation constraints
79 
84 };
85 
86 G_GNUC_INTERNAL
88  pe_resource_t *primary,
89  pcmk__colocation_t *constraint,
90  bool preview);
91 
92 G_GNUC_INTERNAL
94  pe_resource_t *primary,
95  pcmk__colocation_t *constraint);
96 
97 G_GNUC_INTERNAL
99  pe_resource_t *primary,
100  pcmk__colocation_t *constraint);
101 
102 G_GNUC_INTERNAL
103 void pcmk__unpack_colocation(xmlNode *xml_obj, pe_working_set_t *data_set);
104 
105 G_GNUC_INTERNAL
106 void pcmk__new_colocation(const char *id, const char *node_attr, int score,
107  pe_resource_t *dependent, pe_resource_t *primary,
108  const char *dependent_role, const char *primary_role,
109  bool influence, pe_working_set_t *data_set);
110 
111 G_GNUC_INTERNAL
113  pe_working_set_t *data_set);
114 
115 G_GNUC_INTERNAL
116 void pcmk__new_ordering(pe_resource_t *lh_rsc, char *lh_task,
117  pe_action_t *lh_action, pe_resource_t *rh_rsc,
118  char *rh_task, pe_action_t *rh_action,
119  enum pe_ordering type, pe_working_set_t *data_set);
120 
121 G_GNUC_INTERNAL
122 void pcmk__unpack_ordering(xmlNode *xml_obj, pe_working_set_t *data_set);
123 
124 G_GNUC_INTERNAL
126 
127 G_GNUC_INTERNAL
129  pe_action_t *shutdown_op,
130  pe_working_set_t *data_set);
131 
132 G_GNUC_INTERNAL
134 
146 #define pcmk__order_resource_actions(lh_rsc, lh_task, rh_rsc, rh_task, \
147  flags, data_set) \
148  pcmk__new_ordering((lh_rsc), pcmk__op_key((lh_rsc)->id, (lh_task), 0), \
149  NULL, \
150  (rh_rsc), pcmk__op_key((rh_rsc)->id, (rh_task), 0), \
151  NULL, (flags), (data_set))
152 
153 #define pcmk__order_starts(rsc1, rsc2, type, data_set) \
154  pcmk__order_resource_actions((rsc1), CRMD_ACTION_START, \
155  (rsc2), CRMD_ACTION_START, (type), (data_set))
156 
157 #define pcmk__order_stops(rsc1, rsc2, type, data_set) \
158  pcmk__order_resource_actions((rsc1), CRMD_ACTION_STOP, \
159  (rsc2), CRMD_ACTION_STOP, (type), (data_set))
160 
161 G_GNUC_INTERNAL
162 void pcmk__unpack_rsc_ticket(xmlNode *xml_obj, pe_working_set_t *data_set);
163 
164 G_GNUC_INTERNAL
165 void pcmk__order_probes(pe_working_set_t *data_set);
166 
167 G_GNUC_INTERNAL
169 
170 G_GNUC_INTERNAL
172 
173 G_GNUC_INTERNAL
175 
176 G_GNUC_INTERNAL
178 
179 G_GNUC_INTERNAL
180 void pcmk__substitute_remote_addr(pe_resource_t *rsc, GHashTable *params,
181  pe_working_set_t *data_set);
182 
183 G_GNUC_INTERNAL
184 void pcmk__add_bundle_meta_to_xml(xmlNode *args_xml, pe_action_t *action);
185 
186 
187 // Groups (pcmk_sched_group.c)
188 
189 G_GNUC_INTERNAL
191  pe_resource_t *orig_rsc,
192  GList *colocated_rscs);
193 
194 
195 // Functions applying to more than one variant (pcmk_sched_resource.c)
196 
197 G_GNUC_INTERNAL
199  GList *colocated_rscs);
200 
201 #endif // PCMK__LIBPACEMAKER_PRIVATE__H
G_GNUC_INTERNAL void pcmk__substitute_remote_addr(pe_resource_t *rsc, GHashTable *params, pe_working_set_t *data_set)
pcmk__coloc_affects
G_GNUC_INTERNAL bool pcmk__node_unfenced(pe_node_t *node)
G_GNUC_INTERNAL GList * pcmk__colocated_resources(pe_resource_t *rsc, pe_resource_t *orig_rsc, GList *colocated_rscs)
G_GNUC_INTERNAL bool pcmk__rsc_corresponds_to_guest(pe_resource_t *rsc, pe_node_t *node)
G_GNUC_INTERNAL void pcmk__order_stops_before_shutdown(pe_node_t *node, pe_action_t *shutdown_op, pe_working_set_t *data_set)
G_GNUC_INTERNAL void pcmk__new_ordering(pe_resource_t *lh_rsc, char *lh_task, pe_action_t *lh_action, pe_resource_t *rh_rsc, char *rh_task, pe_action_t *rh_action, enum pe_ordering type, pe_working_set_t *data_set)
G_GNUC_INTERNAL bool pcmk__is_failed_remote_node(pe_node_t *node)
G_GNUC_INTERNAL void pcmk__disable_invalid_orderings(pe_working_set_t *data_set)
enum crm_ais_msg_types type
Definition: cpg.c:48
G_GNUC_INTERNAL void pcmk__order_probes(pe_working_set_t *data_set)
G_GNUC_INTERNAL void pcmk__order_vs_fence(pe_action_t *stonith_op, pe_working_set_t *data_set)
G_GNUC_INTERNAL void pcmk__apply_coloc_to_priority(pe_resource_t *dependent, pe_resource_t *primary, pcmk__colocation_t *constraint)
const char * action
Definition: pcmk_fence.c:30
G_GNUC_INTERNAL void pcmk__new_colocation(const char *id, const char *node_attr, int score, pe_resource_t *dependent, pe_resource_t *primary, const char *dependent_role, const char *primary_role, bool influence, pe_working_set_t *data_set)
G_GNUC_INTERNAL xmlNode * pcmk__expand_tags_in_sets(xmlNode *xml_obj, pe_working_set_t *data_set)
G_GNUC_INTERNAL pe_node_t * pcmk__connection_host_for_action(pe_action_t *action)
G_GNUC_INTERNAL void pcmk__apply_locations(pe_working_set_t *data_set)
G_GNUC_INTERNAL void pcmk__block_colocated_starts(pe_action_t *action, pe_working_set_t *data_set)
G_GNUC_INTERNAL void pcmk__order_remote_connection_actions(pe_working_set_t *data_set)
G_GNUC_INTERNAL GList * pcmk__group_colocated_resources(pe_resource_t *rsc, pe_resource_t *orig_rsc, GList *colocated_rscs)
G_GNUC_INTERNAL void pcmk__create_internal_constraints(pe_working_set_t *data_set)
G_GNUC_INTERNAL bool pcmk__graph_has_loop(pe_action_t *init_action, pe_action_t *action, pe_action_wrapper_t *input)
G_GNUC_INTERNAL pe_resource_t * pcmk__find_constraint_resource(GList *rsc_list, const char *id)
G_GNUC_INTERNAL pe__location_t * pcmk__new_location(const char *id, pe_resource_t *rsc, int node_weight, const char *discover_mode, pe_node_t *foo_node, pe_working_set_t *data_set)
G_GNUC_INTERNAL void pcmk__add_bundle_meta_to_xml(xmlNode *args_xml, pe_action_t *action)
Add special bundle meta-attributes to XML.
G_GNUC_INTERNAL void pcmk__order_vs_unfence(pe_resource_t *rsc, pe_node_t *node, pe_action_t *action, enum pe_ordering order, pe_working_set_t *data_set)
G_GNUC_INTERNAL void pcmk__unpack_ordering(xmlNode *xml_obj, pe_working_set_t *data_set)
G_GNUC_INTERNAL void pcmk__unpack_colocation(xmlNode *xml_obj, pe_working_set_t *data_set)
G_GNUC_INTERNAL void pcmk__fence_guest(pe_node_t *node, pe_working_set_t *data_set)
G_GNUC_INTERNAL enum pcmk__coloc_affects pcmk__colocation_affects(pe_resource_t *dependent, pe_resource_t *primary, pcmk__colocation_t *constraint, bool preview)
G_GNUC_INTERNAL void pcmk__unpack_location(xmlNode *xml_obj, pe_working_set_t *data_set)
Data types for cluster status.
G_GNUC_INTERNAL void pcmk__unpack_rsc_ticket(xmlNode *xml_obj, pe_working_set_t *data_set)
G_GNUC_INTERNAL void pcmk__apply_coloc_to_weights(pe_resource_t *dependent, pe_resource_t *primary, pcmk__colocation_t *constraint)
G_GNUC_INTERNAL void pcmk__apply_orderings(pe_working_set_t *data_set)
pe_ordering
Definition: pe_types.h:483
G_GNUC_INTERNAL bool pcmk__valid_resource_or_tag(pe_working_set_t *data_set, const char *id, pe_resource_t **rsc, pe_tag_t **tag)
G_GNUC_INTERNAL void pcmk__apply_location(pe__location_t *constraint, pe_resource_t *rsc)
G_GNUC_INTERNAL bool pcmk__is_unfence_device(const pe_resource_t *rsc, const pe_working_set_t *data_set)
G_GNUC_INTERNAL bool pcmk__tag_to_set(xmlNode *xml_obj, xmlNode **rsc_set, const char *attr, bool convert_rsc, pe_working_set_t *data_set)