pacemaker  2.0.2-debe490
Scalable High-Availability cluster resource manager
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
internal.h
Go to the documentation of this file.
1 /*
2  * Copyright 2004-2019 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 PE_INTERNAL__H
11 # define PE_INTERNAL__H
12 # include <string.h>
13 # include <crm/pengine/status.h>
14 # include <crm/pengine/remote.h>
15 
16 # define pe_rsc_info(rsc, fmt, args...) crm_log_tag(LOG_INFO, rsc ? rsc->id : "<NULL>", fmt, ##args)
17 # define pe_rsc_debug(rsc, fmt, args...) crm_log_tag(LOG_DEBUG, rsc ? rsc->id : "<NULL>", fmt, ##args)
18 # define pe_rsc_trace(rsc, fmt, args...) crm_log_tag(LOG_TRACE, rsc ? rsc->id : "<NULL>", fmt, ##args)
19 
20 # define pe_err(fmt...) { was_processing_error = TRUE; crm_config_error = TRUE; crm_err(fmt); }
21 # define pe_warn(fmt...) { was_processing_warning = TRUE; crm_config_warning = TRUE; crm_warn(fmt); }
22 # define pe_proc_err(fmt...) { was_processing_error = TRUE; crm_err(fmt); }
23 # define pe_proc_warn(fmt...) { was_processing_warning = TRUE; crm_warn(fmt); }
24 # define pe_set_action_bit(action, bit) action->flags = crm_set_bit(__FUNCTION__, __LINE__, action->uuid, action->flags, bit)
25 # define pe_clear_action_bit(action, bit) action->flags = crm_clear_bit(__FUNCTION__, __LINE__, action->uuid, action->flags, bit)
26 
27 typedef struct pe__location_constraint_s {
28  char *id; // Constraint XML ID
29  pe_resource_t *rsc_lh; // Resource being located
30  enum rsc_role_e role_filter; // Role to locate
31  enum pe_discover_e discover_mode; // Resource discovery
32  GListPtr node_list_rh; // List of pe_node_t*
34 
35 typedef struct pe__order_constraint_s {
36  int id;
38 
39  void *lh_opaque;
43 
44  void *rh_opaque;
49 
50 typedef struct notify_data_s {
51  GSList *keys; // Environment variable name/value pairs
52 
53  const char *action;
54 
59 
60  GListPtr active; /* notify_entry_t* */
61  GListPtr inactive; /* notify_entry_t* */
62  GListPtr start; /* notify_entry_t* */
63  GListPtr stop; /* notify_entry_t* */
64  GListPtr demote; /* notify_entry_t* */
65  GListPtr promote; /* notify_entry_t* */
66  GListPtr master; /* notify_entry_t* */
67  GListPtr slave; /* notify_entry_t* */
68  GHashTable *allowed_nodes;
69 
71 
72 bool pe_can_fence(pe_working_set_t *data_set, node_t *node);
73 
74 int merge_weights(int w1, int w2);
75 void add_hash_param(GHashTable * hash, const char *name, const char *value);
76 
77 char *native_parameter(resource_t * rsc, node_t * node, gboolean create, const char *name,
78  pe_working_set_t * data_set);
79 pe_node_t *native_location(const pe_resource_t *rsc, GList **list, int current);
80 
81 void pe_metadata(void);
82 void verify_pe_options(GHashTable * options);
83 
84 void common_update_score(resource_t * rsc, const char *id, int score);
85 void native_add_running(resource_t * rsc, node_t * node, pe_working_set_t * data_set);
86 
87 gboolean native_unpack(resource_t * rsc, pe_working_set_t * data_set);
88 gboolean group_unpack(resource_t * rsc, pe_working_set_t * data_set);
89 gboolean clone_unpack(resource_t * rsc, pe_working_set_t * data_set);
90 gboolean pe__unpack_bundle(pe_resource_t *rsc, pe_working_set_t *data_set);
91 
92 resource_t *native_find_rsc(resource_t *rsc, const char *id, const node_t *node,
93  int flags);
94 
95 gboolean native_active(resource_t * rsc, gboolean all);
96 gboolean group_active(resource_t * rsc, gboolean all);
97 gboolean clone_active(resource_t * rsc, gboolean all);
98 gboolean pe__bundle_active(pe_resource_t *rsc, gboolean all);
99 
100 void native_print(resource_t * rsc, const char *pre_text, long options, void *print_data);
101 void group_print(resource_t * rsc, const char *pre_text, long options, void *print_data);
102 void clone_print(resource_t * rsc, const char *pre_text, long options, void *print_data);
103 void pe__print_bundle(pe_resource_t *rsc, const char *pre_text, long options,
104  void *print_data);
105 
106 void native_free(resource_t * rsc);
107 void group_free(resource_t * rsc);
108 void clone_free(resource_t * rsc);
109 void pe__free_bundle(pe_resource_t *rsc);
110 
111 enum rsc_role_e native_resource_state(const resource_t * rsc, gboolean current);
112 enum rsc_role_e group_resource_state(const resource_t * rsc, gboolean current);
113 enum rsc_role_e clone_resource_state(const resource_t * rsc, gboolean current);
115  gboolean current);
116 
117 gboolean common_unpack(xmlNode * xml_obj, resource_t ** rsc, resource_t * parent,
118  pe_working_set_t * data_set);
119 void common_free(resource_t * rsc);
120 
121 extern node_t *node_copy(const node_t *this_node);
122 extern time_t get_effective_time(pe_working_set_t * data_set);
123 
124 /* Failure handling utilities (from failcounts.c) */
125 
126 // bit flags for fail count handling options
129  pe_fc_effective = 0x01, // don't count expired failures
130  pe_fc_fillers = 0x02, // if container, include filler failures in count
131 };
132 
133 int pe_get_failcount(node_t *node, resource_t *rsc, time_t *last_failure,
134  uint32_t flags, xmlNode *xml_op,
135  pe_working_set_t *data_set);
136 
138  const char *reason,
139  pe_working_set_t *data_set);
140 
141 /* Functions for finding/counting a resource's active nodes */
142 
144  unsigned int *count_all,
145  unsigned int *count_clean);
147  unsigned int *count);
148 
149 static inline pe_node_t *
150 pe__current_node(const pe_resource_t *rsc)
151 {
152  return pe__find_active_on(rsc, NULL, NULL);
153 }
154 
155 
156 /* Binary like operators for lists of nodes */
157 extern void node_list_exclude(GHashTable * list, GListPtr list2, gboolean merge_scores);
158 extern GListPtr node_list_dup(GListPtr list, gboolean reset, gboolean filter);
159 
160 extern GHashTable *node_hash_from_list(GListPtr list);
161 static inline gpointer
162 pe_hash_table_lookup(GHashTable * hash, gconstpointer key)
163 {
164  if (hash) {
165  return g_hash_table_lookup(hash, key);
166  }
167  return NULL;
168 }
169 
170 extern action_t *get_pseudo_op(const char *name, pe_working_set_t * data_set);
171 extern gboolean order_actions(action_t * lh_action, action_t * rh_action, enum pe_ordering order);
172 
173 GHashTable *node_hash_dup(GHashTable * hash);
174 
175 /* Printing functions for debug */
176 extern void print_node(const char *pre_text, node_t * node, gboolean details);
177 
178 extern void print_resource(int log_level, const char *pre_text, resource_t * rsc, gboolean details);
179 
180 extern void dump_node_scores_worker(int level, const char *file, const char *function, int line,
181  resource_t * rsc, const char *comment, GHashTable * nodes);
182 
183 extern void dump_node_capacity(int level, const char *comment, node_t * node);
184 extern void dump_rsc_utilization(int level, const char *comment, resource_t * rsc, node_t * node);
185 
186 # define dump_node_scores(level, rsc, text, nodes) do { \
187  dump_node_scores_worker(level, __FILE__, __FUNCTION__, __LINE__, rsc, text, nodes); \
188  } while(0)
189 
190 /* Sorting functions */
191 extern gint sort_rsc_priority(gconstpointer a, gconstpointer b);
192 extern gint sort_rsc_index(gconstpointer a, gconstpointer b);
193 
194 extern xmlNode *find_rsc_op_entry(resource_t * rsc, const char *key);
195 
196 extern action_t *custom_action(resource_t * rsc, char *key, const char *task, node_t * on_node,
197  gboolean optional, gboolean foo, pe_working_set_t * data_set);
198 
199 # define delete_key(rsc) generate_op_key(rsc->id, CRMD_ACTION_DELETE, 0)
200 # define delete_action(rsc, node, optional) custom_action( \
201  rsc, delete_key(rsc), CRMD_ACTION_DELETE, node, \
202  optional, TRUE, data_set);
203 
204 # define stopped_key(rsc) generate_op_key(rsc->id, CRMD_ACTION_STOPPED, 0)
205 # define stopped_action(rsc, node, optional) custom_action( \
206  rsc, stopped_key(rsc), CRMD_ACTION_STOPPED, node, \
207  optional, TRUE, data_set);
208 
209 # define stop_key(rsc) generate_op_key(rsc->id, CRMD_ACTION_STOP, 0)
210 # define stop_action(rsc, node, optional) custom_action( \
211  rsc, stop_key(rsc), CRMD_ACTION_STOP, node, \
212  optional, TRUE, data_set);
213 
214 # define reload_key(rsc) generate_op_key(rsc->id, CRMD_ACTION_RELOAD, 0)
215 # define start_key(rsc) generate_op_key(rsc->id, CRMD_ACTION_START, 0)
216 # define start_action(rsc, node, optional) custom_action( \
217  rsc, start_key(rsc), CRMD_ACTION_START, node, \
218  optional, TRUE, data_set)
219 
220 # define started_key(rsc) generate_op_key(rsc->id, CRMD_ACTION_STARTED, 0)
221 # define started_action(rsc, node, optional) custom_action( \
222  rsc, started_key(rsc), CRMD_ACTION_STARTED, node, \
223  optional, TRUE, data_set)
224 
225 # define promote_key(rsc) generate_op_key(rsc->id, CRMD_ACTION_PROMOTE, 0)
226 # define promote_action(rsc, node, optional) custom_action( \
227  rsc, promote_key(rsc), CRMD_ACTION_PROMOTE, node, \
228  optional, TRUE, data_set)
229 
230 # define promoted_key(rsc) generate_op_key(rsc->id, CRMD_ACTION_PROMOTED, 0)
231 # define promoted_action(rsc, node, optional) custom_action( \
232  rsc, promoted_key(rsc), CRMD_ACTION_PROMOTED, node, \
233  optional, TRUE, data_set)
234 
235 # define demote_key(rsc) generate_op_key(rsc->id, CRMD_ACTION_DEMOTE, 0)
236 # define demote_action(rsc, node, optional) custom_action( \
237  rsc, demote_key(rsc), CRMD_ACTION_DEMOTE, node, \
238  optional, TRUE, data_set)
239 
240 # define demoted_key(rsc) generate_op_key(rsc->id, CRMD_ACTION_DEMOTED, 0)
241 # define demoted_action(rsc, node, optional) custom_action( \
242  rsc, demoted_key(rsc), CRMD_ACTION_DEMOTED, node, \
243  optional, TRUE, data_set)
244 
245 extern int pe_get_configured_timeout(resource_t *rsc, const char *action,
246  pe_working_set_t *data_set);
247 
248 extern action_t *find_first_action(GListPtr input, const char *uuid, const char *task,
249  node_t * on_node);
250 extern enum action_tasks get_complex_task(resource_t * rsc, const char *name,
251  gboolean allow_non_atomic);
252 
253 extern GListPtr find_actions(GListPtr input, const char *key, const node_t *on_node);
254 GList *find_actions_exact(GList *input, const char *key,
255  const pe_node_t *on_node);
256 extern GListPtr find_recurring_actions(GListPtr input, node_t * not_on_node);
257 GList *pe__resource_actions(const pe_resource_t *rsc, const pe_node_t *node,
258  const char *task, bool require_node);
259 
260 extern void pe_free_action(action_t * action);
261 
262 extern void resource_location(resource_t * rsc, node_t * node, int score, const char *tag,
263  pe_working_set_t * data_set);
264 
265 extern gint sort_op_by_callid(gconstpointer a, gconstpointer b);
266 extern gboolean get_target_role(resource_t * rsc, enum rsc_role_e *role);
267 
268 extern resource_t *find_clone_instance(resource_t * rsc, const char *sub_id,
269  pe_working_set_t * data_set);
270 
271 extern void destroy_ticket(gpointer data);
272 extern ticket_t *ticket_new(const char *ticket_id, pe_working_set_t * data_set);
273 
274 // Resources for manipulating resource names
275 const char *pe_base_name_end(const char *id);
276 char *clone_strip(const char *last_rsc_id);
277 char *clone_zero(const char *last_rsc_id);
278 
279 static inline bool
280 pe_base_name_eq(resource_t *rsc, const char *id)
281 {
282  if (id && rsc && rsc->id) {
283  // Number of characters in rsc->id before any clone suffix
284  size_t base_len = pe_base_name_end(rsc->id) - rsc->id + 1;
285 
286  return (strlen(id) == base_len) && !strncmp(id, rsc->id, base_len);
287  }
288  return FALSE;
289 }
290 
291 int get_target_rc(xmlNode * xml_op);
292 
293 gint sort_node_uname(gconstpointer a, gconstpointer b);
294 bool is_set_recursive(resource_t * rsc, long long flag, bool any);
295 
306 };
307 
308 typedef struct op_digest_cache_s {
310  xmlNode *params_all;
311  xmlNode *params_secure;
312  xmlNode *params_restart;
317 
318 op_digest_cache_t *rsc_action_digest_cmp(resource_t * rsc, xmlNode * xml_op, node_t * node,
319  pe_working_set_t * data_set);
320 
321 action_t *pe_fence_op(node_t * node, const char *op, bool optional, const char *reason, pe_working_set_t * data_set);
322 void trigger_unfencing(
323  resource_t * rsc, node_t *node, const char *reason, action_t *dependency, pe_working_set_t * data_set);
324 
325 void pe_action_set_reason(pe_action_t *action, const char *reason, bool overwrite);
326 void pe_action_set_flag_reason(const char *function, long line, pe_action_t *action, pe_action_t *reason, const char *text, enum pe_action_flags flags, bool overwrite);
327 
328 #define pe_action_required(action, reason, text) pe_action_set_flag_reason(__FUNCTION__, __LINE__, action, reason, text, pe_action_optional, FALSE)
329 #define pe_action_implies(action, reason, flag) pe_action_set_flag_reason(__FUNCTION__, __LINE__, action, reason, NULL, flag, FALSE)
330 
331 void set_bit_recursive(resource_t * rsc, unsigned long long flag);
332 void clear_bit_recursive(resource_t * rsc, unsigned long long flag);
333 
334 gboolean add_tag_ref(GHashTable * tags, const char * tag_name, const char * obj_ref);
335 
336 void print_rscs_brief(GListPtr rsc_list, const char * pre_text, long options,
337  void * print_data, gboolean print_all);
338 void pe_fence_node(pe_working_set_t * data_set, node_t * node, const char *reason);
339 
340 node_t *pe_create_node(const char *id, const char *uname, const char *type,
341  const char *score, pe_working_set_t * data_set);
342 bool remote_id_conflict(const char *remote_name, pe_working_set_t *data);
343 void common_print(resource_t * rsc, const char *pre_text, const char *name, node_t *node, long options, void *print_data);
345  const pe_node_t *node);
347 const char *pe__add_bundle_remote_name(pe_resource_t *rsc, xmlNode *xml,
348  const char *field);
349 const char *pe_node_attribute_calculated(const pe_node_t *node,
350  const char *name,
351  const resource_t *rsc);
352 const char *pe_node_attribute_raw(pe_node_t *node, const char *name);
354  pe_working_set_t *data_set);
355 void pe__add_param_check(xmlNode *rsc_op, pe_resource_t *rsc, pe_node_t *node,
356  enum pe_check_parameters, pe_working_set_t *data_set);
358  void (*cb)(pe_resource_t*, pe_node_t*, xmlNode*,
359  enum pe_check_parameters,
360  pe_working_set_t*));
362 #endif
bool remote_id_conflict(const char *remote_name, pe_working_set_t *data)
Definition: unpack.c:394
void pe__foreach_param_check(pe_working_set_t *data_set, void(*cb)(pe_resource_t *, pe_node_t *, xmlNode *, enum pe_check_parameters, pe_working_set_t *))
Definition: remote.c:241
char uname[MAX_NAME]
Definition: internal.h:87
void verify_pe_options(GHashTable *options)
Definition: common.c:175
enum rsc_role_e role_filter
Definition: internal.h:30
resource_t * lh_rsc
Definition: internal.h:40
void clone_print(resource_t *rsc, const char *pre_text, long options, void *print_data)
Definition: clone.c:367
action_t * pre_done
Definition: internal.h:57
void group_free(resource_t *rsc)
Definition: group.c:184
void dump_rsc_utilization(int level, const char *comment, resource_t *rsc, node_t *node)
Definition: utils.c:370
gint sort_rsc_priority(gconstpointer a, gconstpointer b)
Definition: utils.c:414
gint sort_rsc_index(gconstpointer a, gconstpointer b)
Definition: utils.c:387
gboolean get_target_role(resource_t *rsc, enum rsc_role_e *role)
Definition: utils.c:1740
action_t * rh_action
Definition: internal.h:46
void pe_metadata(void)
Definition: common.c:166
node_t * node_copy(const node_t *this_node)
Definition: utils.c:118
action_t * post_done
Definition: internal.h:58
pe_check_parameters
Definition: pe_types.h:165
GListPtr node_list_dup(GListPtr list, gboolean reset, gboolean filter)
Definition: utils.c:191
GHashTable * allowed_nodes
Definition: internal.h:68
void pe__add_param_check(xmlNode *rsc_op, pe_resource_t *rsc, pe_node_t *node, enum pe_check_parameters, pe_working_set_t *data_set)
Definition: remote.c:215
action_t * post
Definition: internal.h:56
pe_node_t * pe__find_active_on(const pe_resource_t *rsc, unsigned int *count_all, unsigned int *count_clean)
Definition: complex.c:842
node_t * pe_create_node(const char *id, const char *uname, const char *type, const char *score, pe_working_set_t *data_set)
Definition: unpack.c:333
bool pe_can_fence(pe_working_set_t *data_set, node_t *node)
Definition: utils.c:91
void pe__free_bundle(pe_resource_t *rsc)
Definition: bundle.c:1623
enum action_tasks get_complex_task(resource_t *rsc, const char *name, gboolean allow_non_atomic)
Definition: utils.c:1374
enum rsc_role_e pe__bundle_resource_state(const pe_resource_t *rsc, gboolean current)
Definition: bundle.c:1657
struct op_digest_cache_s op_digest_cache_t
action_t * pe_fence_op(node_t *node, const char *op, bool optional, const char *reason, pe_working_set_t *data_set)
Definition: utils.c:2193
GListPtr slave
Definition: internal.h:67
char * native_parameter(resource_t *rsc, node_t *node, gboolean create, const char *name, pe_working_set_t *data_set)
Definition: native.c:267
pe_node_t * native_location(const pe_resource_t *rsc, GList **list, int current)
Definition: native.c:800
GListPtr find_actions(GListPtr input, const char *key, const node_t *on_node)
Definition: utils.c:1428
gboolean common_unpack(xmlNode *xml_obj, resource_t **rsc, resource_t *parent, pe_working_set_t *data_set)
Definition: complex.c:360
void common_update_score(resource_t *rsc, const char *id, int score)
Definition: complex.c:707
void common_free(resource_t *rsc)
Definition: complex.c:760
void pe_action_set_flag_reason(const char *function, long line, pe_action_t *action, pe_action_t *reason, const char *text, enum pe_action_flags flags, bool overwrite)
Definition: utils.c:2345
void print_node(const char *pre_text, node_t *node, gboolean details)
Definition: utils.c:1253
gint sort_op_by_callid(gconstpointer a, gconstpointer b)
Definition: utils.c:1609
time_t get_effective_time(pe_working_set_t *data_set)
Definition: utils.c:1725
xmlNode * params_restart
Definition: internal.h:312
void set_bit_recursive(resource_t *rsc, unsigned long long flag)
Definition: utils.c:2159
pe_resource_t * rsc_lh
Definition: internal.h:29
action_t * get_pseudo_op(const char *name, pe_working_set_t *data_set)
Definition: utils.c:1828
int get_target_rc(xmlNode *xml_op)
Definition: unpack.c:3016
void native_print(resource_t *rsc, const char *pre_text, long options, void *print_data)
Definition: native.c:750
void pe__print_bundle(pe_resource_t *rsc, const char *pre_text, long options, void *print_data)
Definition: bundle.c:1521
void print_rscs_brief(GListPtr rsc_list, const char *pre_text, long options, void *print_data, gboolean print_all)
Definition: native.c:927
resource_t * native_find_rsc(resource_t *rsc, const char *id, const node_t *node, int flags)
Definition: native.c:212
pe_discover_e
Definition: pe_types.h:430
GListPtr find_recurring_actions(GListPtr input, node_t *not_on_node)
Definition: utils.c:1340
bool pe__bundle_needs_remote_name(pe_resource_t *rsc)
Definition: bundle.c:955
gboolean pe__unpack_bundle(pe_resource_t *rsc, pe_working_set_t *data_set)
Definition: bundle.c:1024
void clone_free(resource_t *rsc)
Definition: clone.c:571
enum rsc_role_e group_resource_state(const resource_t *rsc, gboolean current)
Definition: group.c:205
pe_resource_t * pe__find_bundle_replica(const pe_resource_t *bundle, const pe_node_t *node)
Definition: bundle.c:1404
enum pe_discover_e discover_mode
Definition: internal.h:31
void pe_action_set_reason(pe_action_t *action, const char *reason, bool overwrite)
Definition: utils.c:2403
pe_action_flags
Definition: pe_types.h:258
struct pe__order_constraint_s pe__ordering_t
GListPtr stop
Definition: internal.h:63
void native_add_running(resource_t *rsc, node_t *node, pe_working_set_t *data_set)
Definition: native.c:37
char * digest_all_calc
Definition: internal.h:313
char * clone_strip(const char *last_rsc_id)
Definition: unpack.c:1512
const char * pe__add_bundle_remote_name(pe_resource_t *rsc, xmlNode *xml, const char *field)
Definition: bundle.c:985
enum rsc_digest_cmp_val rc
Definition: internal.h:309
action_t * find_first_action(GListPtr input, const char *uuid, const char *task, node_t *on_node)
Definition: utils.c:1398
GListPtr master
Definition: internal.h:66
char * digest_secure_calc
Definition: internal.h:314
void pe_fence_node(pe_working_set_t *data_set, node_t *node, const char *reason)
Schedule a fence action for a node.
Definition: unpack.c:70
gboolean add_tag_ref(GHashTable *tags, const char *tag_name, const char *obj_ref)
Definition: utils.c:2309
action_t * custom_action(resource_t *rsc, char *key, const char *task, node_t *on_node, gboolean optional, gboolean foo, pe_working_set_t *data_set)
Definition: utils.c:441
const char * pe_node_attribute_raw(pe_node_t *node, const char *name)
Definition: common.c:462
enum rsc_role_e native_resource_state(const resource_t *rsc, gboolean current)
Definition: native.c:778
GSList * keys
Definition: internal.h:51
void group_print(resource_t *rsc, const char *pre_text, long options, void *print_data)
Definition: group.c:135
xmlNode * find_rsc_op_entry(resource_t *rsc, const char *key)
Definition: utils.c:1247
enum pe_ordering type
Definition: internal.h:37
gboolean native_active(resource_t *rsc, gboolean all)
Definition: native.c:312
GHashTable * node_hash_dup(GHashTable *hash)
xmlNode * params_all
Definition: internal.h:310
void pe__free_param_checks(pe_working_set_t *data_set)
Definition: remote.c:256
GListPtr active
Definition: internal.h:60
enum rsc_role_e clone_resource_state(const resource_t *rsc, gboolean current)
Definition: clone.c:605
void common_print(resource_t *rsc, const char *pre_text, const char *name, node_t *node, long options, void *print_data)
Definition: native.c:502
GHashTable * node_hash_from_list(GListPtr list)
Definition: utils.c:174
gboolean clone_active(resource_t *rsc, gboolean all)
Definition: clone.c:235
Cluster status and scheduling.
void add_hash_param(GHashTable *hash, const char *name, const char *value)
Definition: common.c:406
GListPtr demote
Definition: internal.h:64
void resource_location(resource_t *rsc, node_t *node, int score, const char *tag, pe_working_set_t *data_set)
Definition: utils.c:1565
resource_t * rh_rsc
Definition: internal.h:45
int pe_get_configured_timeout(resource_t *rsc, const char *action, pe_working_set_t *data_set)
Definition: utils.c:826
pe_action_t * pe__clear_failcount(pe_resource_t *rsc, pe_node_t *node, const char *reason, pe_working_set_t *data_set)
Schedule a controller operation to clear a fail count.
Definition: failcounts.c:360
void node_list_exclude(GHashTable *list, GListPtr list2, gboolean merge_scores)
Definition: utils.c:139
ticket_t * ticket_new(const char *ticket_id, pe_working_set_t *data_set)
Definition: utils.c:1857
gboolean group_active(resource_t *rsc, gboolean all)
Definition: group.c:90
char * clone_zero(const char *last_rsc_id)
Definition: unpack.c:1534
GListPtr inactive
Definition: internal.h:61
xmlNode * params_secure
Definition: internal.h:311
void dump_node_capacity(int level, const char *comment, node_t *node)
Definition: utils.c:353
int merge_weights(int w1, int w2)
Definition: common.c:369
char data[0]
Definition: internal.h:92
action_t * pre
Definition: internal.h:55
int pe_get_failcount(node_t *node, resource_t *rsc, time_t *last_failure, uint32_t flags, xmlNode *xml_op, pe_working_set_t *data_set)
Definition: failcounts.c:251
rsc_role_e
Definition: common.h:86
bool pe__is_universal_clone(pe_resource_t *rsc, pe_working_set_t *data_set)
Definition: clone.c:631
void native_free(resource_t *rsc)
Definition: native.c:771
void dump_node_scores_worker(int level, const char *file, const char *function, int line, resource_t *rsc, const char *comment, GHashTable *nodes)
Definition: utils.c:269
gboolean native_unpack(resource_t *rsc, pe_working_set_t *data_set)
Definition: native.c:143
void pe_free_action(action_t *action)
Definition: utils.c:1313
void clear_bit_recursive(resource_t *rsc, unsigned long long flag)
Definition: utils.c:2146
void destroy_ticket(gpointer data)
Definition: utils.c:1845
GListPtr promote
Definition: internal.h:65
GList * find_actions_exact(GList *input, const char *key, const pe_node_t *on_node)
Definition: utils.c:1468
pe_node_t * pe__find_active_requires(const pe_resource_t *rsc, unsigned int *count)
Definition: complex.c:922
struct notify_data_s notify_data_t
action_t * lh_action
Definition: internal.h:41
void print_resource(int log_level, const char *pre_text, resource_t *rsc, gboolean details)
Definition: utils.c:1297
GListPtr start
Definition: internal.h:62
gboolean order_actions(action_t *lh_action, action_t *rh_action, enum pe_ordering order)
Definition: utils.c:1776
op_digest_cache_t * rsc_action_digest_cmp(resource_t *rsc, xmlNode *xml_op, node_t *node, pe_working_set_t *data_set)
Definition: utils.c:2033
GList * pe__resource_actions(const pe_resource_t *rsc, const pe_node_t *node, const char *task, bool require_node)
Find all actions of given type for a resource.
Definition: utils.c:1517
const char * action
Definition: internal.h:53
pe_fc_flags_e
Definition: internal.h:127
resource_t * find_clone_instance(resource_t *rsc, const char *sub_id, pe_working_set_t *data_set)
Definition: clone.c:40
gboolean group_unpack(resource_t *rsc, pe_working_set_t *data_set)
Definition: group.c:20
gint sort_node_uname(gconstpointer a, gconstpointer b)
Definition: utils.c:217
const char * pe_base_name_end(const char *id)
Definition: unpack.c:1472
GList * GListPtr
Definition: crm.h:192
struct pe__location_constraint_s pe__location_t
bool is_set_recursive(resource_t *rsc, long long flag, bool any)
Definition: clone.c:336
char * digest_restart_calc
Definition: internal.h:315
void trigger_unfencing(resource_t *rsc, node_t *node, const char *reason, action_t *dependency, pe_working_set_t *data_set)
Definition: utils.c:2275
pe_ordering
Definition: pe_types.h:437
uint64_t flags
Definition: remote.c:148
action_tasks
Definition: common.h:57
rsc_digest_cmp_val
Definition: internal.h:296
enum crm_ais_msg_types type
Definition: internal.h:85
gboolean clone_unpack(resource_t *rsc, pe_working_set_t *data_set)
Definition: clone.c:111
gboolean pe__bundle_active(pe_resource_t *rsc, gboolean all)
Definition: bundle.c:1356
char * id
Definition: pe_types.h:284
const char * pe_node_attribute_calculated(const pe_node_t *node, const char *name, const resource_t *rsc)
Definition: common.c:423