pacemaker  1.1.24-3850484742
Scalable High-Availability cluster resource manager
internal.h
Go to the documentation of this file.
1 /*
2  * Copyright 2004-2019 Andrew Beekhof <andrew@beekhof.net>
3  *
4  * This source code is licensed under the GNU Lesser General Public License
5  * version 2.1 or later (LGPLv2.1+) WITHOUT ANY WARRANTY.
6  */
7 
8 #ifndef PE_INTERNAL__H
9 # define PE_INTERNAL__H
10 # include <string.h>
11 # include <crm/pengine/status.h>
12 # include <crm/pengine/remote.h>
13 
14 # define pe_rsc_info(rsc, fmt, args...) crm_log_tag(LOG_INFO, rsc ? rsc->id : "<NULL>", fmt, ##args)
15 # define pe_rsc_debug(rsc, fmt, args...) crm_log_tag(LOG_DEBUG, rsc ? rsc->id : "<NULL>", fmt, ##args)
16 # define pe_rsc_trace(rsc, fmt, args...) crm_log_tag(LOG_TRACE, rsc ? rsc->id : "<NULL>", fmt, ##args)
17 
18 # define pe_err(fmt...) { was_processing_error = TRUE; crm_config_error = TRUE; crm_err(fmt); }
19 # define pe_warn(fmt...) { was_processing_warning = TRUE; crm_config_warning = TRUE; crm_warn(fmt); }
20 # define pe_proc_err(fmt...) { was_processing_error = TRUE; crm_err(fmt); }
21 # define pe_proc_warn(fmt...) { was_processing_warning = TRUE; crm_warn(fmt); }
22 # define pe_set_action_bit(action, bit) action->flags = crm_set_bit(__FUNCTION__, __LINE__, action->uuid, action->flags, bit)
23 # define pe_clear_action_bit(action, bit) action->flags = crm_clear_bit(__FUNCTION__, __LINE__, action->uuid, action->flags, bit)
24 
25 typedef struct pe__location_constraint_s {
26  char *id; // Constraint XML ID
27  pe_resource_t *rsc_lh; // Resource being located
28  enum rsc_role_e role_filter; // Role to locate
29  enum pe_discover_e discover_mode; // Resource discovery
30  GListPtr node_list_rh; // List of pe_node_t*
32 
33 typedef struct pe__order_constraint_s {
34  int id;
36 
37  void *lh_opaque;
41 
42  void *rh_opaque;
47 
48 typedef struct notify_data_s {
49  GSList *keys; // Environment variable name/value pairs
50 
51  const char *action;
52 
57 
58  GListPtr active; /* notify_entry_t* */
59  GListPtr inactive; /* notify_entry_t* */
60  GListPtr start; /* notify_entry_t* */
61  GListPtr stop; /* notify_entry_t* */
62  GListPtr demote; /* notify_entry_t* */
63  GListPtr promote; /* notify_entry_t* */
64  GListPtr master; /* notify_entry_t* */
65  GListPtr slave; /* notify_entry_t* */
66  GHashTable *allowed_nodes;
67 
69 
70 bool pe_can_fence(pe_working_set_t *data_set, node_t *node);
71 
72 int merge_weights(int w1, int w2);
73 void add_hash_param(GHashTable * hash, const char *name, const char *value);
74 void append_hashtable(gpointer key, gpointer value, gpointer user_data);
75 
76 char *native_parameter(resource_t * rsc, node_t * node, gboolean create, const char *name,
77  pe_working_set_t * data_set);
78 pe_node_t *native_location(const pe_resource_t *rsc, GList **list, int current);
79 
80 void pe_metadata(void);
81 void verify_pe_options(GHashTable * options);
82 
83 void common_update_score(resource_t * rsc, const char *id, int score);
84 void native_add_running(resource_t * rsc, node_t * node, pe_working_set_t * data_set);
85 
86 gboolean native_unpack(resource_t * rsc, pe_working_set_t * data_set);
87 gboolean group_unpack(resource_t * rsc, pe_working_set_t * data_set);
88 gboolean clone_unpack(resource_t * rsc, pe_working_set_t * data_set);
89 gboolean master_unpack(resource_t * rsc, pe_working_set_t * data_set);
90 gboolean container_unpack(resource_t * rsc, pe_working_set_t * data_set);
91 
92 resource_t *native_find_rsc(resource_t * rsc, const char *id, node_t * node, int flags);
93 
94 gboolean native_active(resource_t * rsc, gboolean all);
95 gboolean group_active(resource_t * rsc, gboolean all);
96 gboolean clone_active(resource_t * rsc, gboolean all);
97 gboolean master_active(resource_t * rsc, gboolean all);
98 gboolean container_active(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 master_print(resource_t * rsc, const char *pre_text, long options, void *print_data);
104 void container_print(resource_t * rsc, const char *pre_text, long options, 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 master_free(resource_t * rsc);
110 void container_free(resource_t * rsc);
111 
112 enum rsc_role_e native_resource_state(const resource_t * rsc, gboolean current);
113 enum rsc_role_e group_resource_state(const resource_t * rsc, gboolean current);
114 enum rsc_role_e clone_resource_state(const resource_t * rsc, gboolean current);
115 enum rsc_role_e master_resource_state(const resource_t * rsc, gboolean current);
116 enum rsc_role_e container_resource_state(const resource_t * rsc, gboolean current);
117 
120 
121 gboolean common_unpack(xmlNode * xml_obj, resource_t ** rsc, resource_t * parent,
122  pe_working_set_t * data_set);
123 void common_free(resource_t * rsc);
124 
126 
127 extern node_t *node_copy(const node_t *this_node);
128 extern time_t get_effective_time(pe_working_set_t * data_set);
129 
130 /* Failure handling utilities (from failcounts.c) */
131 
132 // bit flags for fail count handling options
135  pe_fc_effective = 0x01, // don't count expired failures
136  pe_fc_fillers = 0x02, // if container, include filler failures in count
137 };
138 
139 int pe_get_failcount(node_t *node, resource_t *rsc, time_t *last_failure,
140  uint32_t flags, xmlNode *xml_op,
141  pe_working_set_t *data_set);
142 
144  const char *reason,
145  pe_working_set_t *data_set);
146 
147 /* Functions for finding/counting a resource's active nodes */
148 
150  unsigned int *count_all,
151  unsigned int *count_clean);
153  unsigned int *count);
154 
155 static inline pe_node_t *
156 pe__current_node(const resource_t *rsc)
157 {
158  return pe__find_active_on(rsc, NULL, NULL);
159 }
160 
161 
162 /* Binary like operators for lists of nodes */
163 extern void node_list_exclude(GHashTable * list, GListPtr list2, gboolean merge_scores);
164 extern GListPtr node_list_dup(GListPtr list, gboolean reset, gboolean filter);
165 extern GListPtr node_list_from_hash(GHashTable * hash, gboolean reset, gboolean filter);
166 
167 extern GHashTable *node_hash_from_list(GListPtr list);
168 static inline gpointer
169 pe_hash_table_lookup(GHashTable * hash, gconstpointer key)
170 {
171  if (hash) {
172  return g_hash_table_lookup(hash, key);
173  }
174  return NULL;
175 }
176 
177 extern action_t *get_pseudo_op(const char *name, pe_working_set_t * data_set);
178 extern gboolean order_actions(action_t * lh_action, action_t * rh_action, enum pe_ordering order);
179 
180 GHashTable *node_hash_dup(GHashTable * hash);
181 extern GListPtr node_list_and(GListPtr list1, GListPtr list2, gboolean filter);
182 
183 extern GListPtr node_list_xor(GListPtr list1, GListPtr list2, gboolean filter);
184 
185 extern GListPtr node_list_minus(GListPtr list1, GListPtr list2, gboolean filter);
186 
187 extern void pe_free_shallow(GListPtr alist);
188 extern void pe_free_shallow_adv(GListPtr alist, gboolean with_data);
189 
190 /* Printing functions for debug */
191 extern void print_node(const char *pre_text, node_t * node, gboolean details);
192 
193 extern void dump_node_capacity(int level, const char *comment, node_t * node);
194 extern void dump_rsc_utilization(int level, const char *comment, resource_t * rsc, node_t * node);
195 
196 void pe__show_node_weights_as(const char *file, const char *function,
197  int line, bool to_log, pe_resource_t *rsc,
198  const char *comment, GHashTable *nodes);
199 
200 #define pe__show_node_weights(level, rsc, text, nodes) \
201  pe__show_node_weights_as(__FILE__, __FUNCTION__, __LINE__, \
202  (level), (rsc), (text), (nodes))
203 
204 /* Sorting functions */
205 extern gint sort_rsc_priority(gconstpointer a, gconstpointer b);
206 extern gint sort_rsc_index(gconstpointer a, gconstpointer b);
207 
208 extern xmlNode *find_rsc_op_entry(resource_t * rsc, const char *key);
209 
210 extern action_t *custom_action(resource_t * rsc, char *key, const char *task, node_t * on_node,
211  gboolean optional, gboolean foo, pe_working_set_t * data_set);
212 
213 # define delete_key(rsc) generate_op_key(rsc->id, CRMD_ACTION_DELETE, 0)
214 # define delete_action(rsc, node, optional) custom_action( \
215  rsc, delete_key(rsc), CRMD_ACTION_DELETE, node, \
216  optional, TRUE, data_set);
217 
218 # define stopped_key(rsc) generate_op_key(rsc->id, CRMD_ACTION_STOPPED, 0)
219 # define stopped_action(rsc, node, optional) custom_action( \
220  rsc, stopped_key(rsc), CRMD_ACTION_STOPPED, node, \
221  optional, TRUE, data_set);
222 
223 # define stop_key(rsc) generate_op_key(rsc->id, CRMD_ACTION_STOP, 0)
224 # define stop_action(rsc, node, optional) custom_action( \
225  rsc, stop_key(rsc), CRMD_ACTION_STOP, node, \
226  optional, TRUE, data_set);
227 
228 # define reload_key(rsc) generate_op_key(rsc->id, CRMD_ACTION_RELOAD, 0)
229 # define start_key(rsc) generate_op_key(rsc->id, CRMD_ACTION_START, 0)
230 # define start_action(rsc, node, optional) custom_action( \
231  rsc, start_key(rsc), CRMD_ACTION_START, node, \
232  optional, TRUE, data_set)
233 
234 # define started_key(rsc) generate_op_key(rsc->id, CRMD_ACTION_STARTED, 0)
235 # define started_action(rsc, node, optional) custom_action( \
236  rsc, started_key(rsc), CRMD_ACTION_STARTED, node, \
237  optional, TRUE, data_set)
238 
239 # define promote_key(rsc) generate_op_key(rsc->id, CRMD_ACTION_PROMOTE, 0)
240 # define promote_action(rsc, node, optional) custom_action( \
241  rsc, promote_key(rsc), CRMD_ACTION_PROMOTE, node, \
242  optional, TRUE, data_set)
243 
244 # define promoted_key(rsc) generate_op_key(rsc->id, CRMD_ACTION_PROMOTED, 0)
245 # define promoted_action(rsc, node, optional) custom_action( \
246  rsc, promoted_key(rsc), CRMD_ACTION_PROMOTED, node, \
247  optional, TRUE, data_set)
248 
249 # define demote_key(rsc) generate_op_key(rsc->id, CRMD_ACTION_DEMOTE, 0)
250 # define demote_action(rsc, node, optional) custom_action( \
251  rsc, demote_key(rsc), CRMD_ACTION_DEMOTE, node, \
252  optional, TRUE, data_set)
253 
254 # define demoted_key(rsc) generate_op_key(rsc->id, CRMD_ACTION_DEMOTED, 0)
255 # define demoted_action(rsc, node, optional) custom_action( \
256  rsc, demoted_key(rsc), CRMD_ACTION_DEMOTED, node, \
257  optional, TRUE, data_set)
258 
259 extern int pe_get_configured_timeout(resource_t *rsc, const char *action,
260  pe_working_set_t *data_set);
261 
262 extern action_t *find_first_action(GListPtr input, const char *uuid, const char *task,
263  node_t * on_node);
264 extern enum action_tasks get_complex_task(resource_t * rsc, const char *name,
265  gboolean allow_non_atomic);
266 
267 extern GListPtr find_actions(GListPtr input, const char *key, const node_t *on_node);
268 extern GListPtr find_actions_exact(GListPtr input, const char *key, node_t * on_node);
269 extern GListPtr find_recurring_actions(GListPtr input, node_t * not_on_node);
270 
271 extern void pe_free_action(action_t * action);
272 
273 extern void resource_location(resource_t * rsc, node_t * node, int score, const char *tag,
274  pe_working_set_t * data_set);
275 
276 extern gint sort_op_by_callid(gconstpointer a, gconstpointer b);
277 extern gboolean get_target_role(resource_t * rsc, enum rsc_role_e *role);
278 
279 extern resource_t *find_clone_instance(resource_t * rsc, const char *sub_id,
280  pe_working_set_t * data_set);
281 
282 extern void destroy_ticket(gpointer data);
283 extern ticket_t *ticket_new(const char *ticket_id, pe_working_set_t * data_set);
284 
285 // Resources for manipulating resource names
286 const char *pe_base_name_end(const char *id);
287 char *clone_strip(const char *last_rsc_id);
288 char *clone_zero(const char *last_rsc_id);
289 
290 static inline bool
291 pe_base_name_eq(resource_t *rsc, const char *id)
292 {
293  if (id && rsc && rsc->id) {
294  // Number of characters in rsc->id before any clone suffix
295  size_t base_len = pe_base_name_end(rsc->id) - rsc->id + 1;
296 
297  return (strlen(id) == base_len) && !strncmp(id, rsc->id, base_len);
298  }
299  return FALSE;
300 }
301 
302 int get_target_rc(xmlNode * xml_op);
303 
304 gint sort_node_uname(gconstpointer a, gconstpointer b);
305 bool is_set_recursive(resource_t * rsc, long long flag, bool any);
306 
317 };
318 
319 typedef struct op_digest_cache_s {
321  xmlNode *params_all;
322  xmlNode *params_secure;
323  xmlNode *params_restart;
328 
329 op_digest_cache_t *rsc_action_digest_cmp(resource_t * rsc, xmlNode * xml_op, node_t * node,
330  pe_working_set_t * data_set);
331 
332 pe_action_t *pe_fence_op(pe_node_t * node, const char *op, bool optional, const char *reason, bool priority_delay, pe_working_set_t * data_set);
333 void trigger_unfencing(
334  resource_t * rsc, node_t *node, const char *reason, action_t *dependency, pe_working_set_t * data_set);
335 
336 void pe_action_set_reason(pe_action_t *action, const char *reason, bool overwrite);
337 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);
338 
339 #define pe_action_required(action, reason, text) pe_action_set_flag_reason(__FUNCTION__, __LINE__, action, reason, text, pe_action_optional, FALSE)
340 #define pe_action_implies(action, reason, flag) pe_action_set_flag_reason(__FUNCTION__, __LINE__, action, reason, NULL, flag, FALSE)
341 
342 void set_bit_recursive(resource_t * rsc, unsigned long long flag);
343 void clear_bit_recursive(resource_t * rsc, unsigned long long flag);
344 
345 gboolean add_tag_ref(GHashTable * tags, const char * tag_name, const char * obj_ref);
346 
347 void print_rscs_brief(GListPtr rsc_list, const char * pre_text, long options,
348  void * print_data, gboolean print_all);
349 void pe_fence_node(pe_working_set_t * data_set, pe_node_t * node, const char *reason, bool priority_delay);
350 
351 node_t *pe_create_node(const char *id, const char *uname, const char *type,
352  const char *score, pe_working_set_t * data_set);
353 bool remote_id_conflict(const char *remote_name, pe_working_set_t *data);
354 void common_print(resource_t * rsc, const char *pre_text, const char *name, node_t *node, long options, void *print_data);
355 resource_t *find_container_child(const resource_t *bundle, const node_t *node);
357 const char *container_fix_remote_addr_in(resource_t *rsc, xmlNode *xml, const char *field);
358 const char *pe_node_attribute_calculated(pe_node_t *node, const char *name, resource_t *rsc);
359 const char *pe_node_attribute_raw(pe_node_t *node, const char *name);
360 void pe__add_param_check(xmlNode *rsc_op, pe_resource_t *rsc, pe_node_t *node,
361  enum pe_check_parameters, pe_working_set_t *data_set);
363  void (*cb)(pe_resource_t*, pe_node_t*, xmlNode*,
364  enum pe_check_parameters,
365  pe_working_set_t*));
367 
370 
371 #endif
bool remote_id_conflict(const char *remote_name, pe_working_set_t *data)
Definition: unpack.c:437
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:243
void verify_pe_options(GHashTable *options)
Definition: common.c:209
enum rsc_role_e role_filter
Definition: internal.h:28
void container_free(resource_t *rsc)
Definition: container.c:1393
resource_t * lh_rsc
Definition: internal.h:38
void clone_print(resource_t *rsc, const char *pre_text, long options, void *print_data)
Definition: clone.c:361
action_t * pre_done
Definition: internal.h:55
void group_free(resource_t *rsc)
Definition: group.c:187
void dump_rsc_utilization(int level, const char *comment, resource_t *rsc, node_t *node)
Definition: utils.c:401
gint sort_rsc_priority(gconstpointer a, gconstpointer b)
Definition: utils.c:450
gint sort_rsc_index(gconstpointer a, gconstpointer b)
Definition: utils.c:423
gboolean get_target_role(resource_t *rsc, enum rsc_role_e *role)
Definition: utils.c:1802
action_t * rh_action
Definition: internal.h:44
pe_discover_e
Definition: status.h:446
void pe_metadata(void)
Definition: common.c:200
node_t * node_copy(const node_t *this_node)
Definition: utils.c:141
action_t * post_done
Definition: internal.h:56
GListPtr node_list_dup(GListPtr list, gboolean reset, gboolean filter)
Definition: utils.c:213
GHashTable * allowed_nodes
Definition: internal.h:66
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:217
action_t * post
Definition: internal.h:54
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:375
bool pe_can_fence(pe_working_set_t *data_set, node_t *node)
Definition: utils.c:98
bool container_fix_remote_addr(resource_t *rsc)
Definition: container.c:753
enum action_tasks get_complex_task(resource_t *rsc, const char *name, gboolean allow_non_atomic)
Definition: utils.c:1465
struct op_digest_cache_s op_digest_cache_t
void pe__count_common(pe_resource_t *rsc)
Definition: complex.c:1089
enum rsc_role_e master_resource_state(const resource_t *rsc, gboolean current)
GListPtr slave
Definition: internal.h:65
char * native_parameter(resource_t *rsc, node_t *node, gboolean create, const char *name, pe_working_set_t *data_set)
Definition: native.c:315
GListPtr find_actions_exact(GListPtr input, const char *key, node_t *on_node)
Definition: utils.c:1559
pe_node_t * native_location(const pe_resource_t *rsc, GList **list, int current)
Definition: native.c:849
GListPtr find_actions(GListPtr input, const char *key, const node_t *on_node)
Definition: utils.c:1519
gboolean common_unpack(xmlNode *xml_obj, resource_t **rsc, resource_t *parent, pe_working_set_t *data_set)
Definition: complex.c:463
void common_update_score(resource_t *rsc, const char *id, int score)
Definition: complex.c:865
void common_free(resource_t *rsc)
Definition: complex.c:918
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:2588
void print_node(const char *pre_text, node_t *node, gboolean details)
Definition: utils.c:1357
gint sort_op_by_callid(gconstpointer a, gconstpointer b)
Definition: utils.c:1672
time_t get_effective_time(pe_working_set_t *data_set)
Definition: utils.c:1787
GListPtr node_list_and(GListPtr list1, GListPtr list2, gboolean filter)
gboolean master_active(resource_t *rsc, gboolean all)
xmlNode * params_restart
Definition: internal.h:323
void set_bit_recursive(resource_t *rsc, unsigned long long flag)
Definition: utils.c:2313
pe_resource_t * rsc_lh
Definition: internal.h:27
action_t * get_pseudo_op(const char *name, pe_working_set_t *data_set)
Definition: utils.c:1890
int get_target_rc(xmlNode *xml_op)
Definition: unpack.c:3201
GListPtr node_list_xor(GListPtr list1, GListPtr list2, gboolean filter)
void native_print(resource_t *rsc, const char *pre_text, long options, void *print_data)
Definition: native.c:799
void print_rscs_brief(GListPtr rsc_list, const char *pre_text, long options, void *print_data, gboolean print_all)
Definition: native.c:976
GListPtr find_recurring_actions(GListPtr input, node_t *not_on_node)
Definition: utils.c:1431
void clone_free(resource_t *rsc)
Definition: clone.c:569
enum rsc_role_e group_resource_state(const resource_t *rsc, gboolean current)
Definition: group.c:208
pe_action_flags
Definition: status.h:265
char * id
Definition: status.h:292
resource_t * find_container_child(const resource_t *bundle, const node_t *node)
Definition: container.c:1175
gboolean container_unpack(resource_t *rsc, pe_working_set_t *data_set)
Definition: container.c:827
char uname[MAX_NAME]
Definition: internal.h:81
enum pe_discover_e discover_mode
Definition: internal.h:29
void pe_action_set_reason(pe_action_t *action, const char *reason, bool overwrite)
Definition: utils.c:2648
void master_free(resource_t *rsc)
struct pe__order_constraint_s pe__ordering_t
GListPtr stop
Definition: internal.h:61
void native_add_running(resource_t *rsc, node_t *node, pe_working_set_t *data_set)
Definition: native.c:82
void append_hashtable(gpointer key, gpointer value, gpointer user_data)
char * digest_all_calc
Definition: internal.h:324
char * clone_strip(const char *last_rsc_id)
Definition: unpack.c:1662
pe_working_set_t * pe_dataset
Definition: utils.c:32
void pe_fence_node(pe_working_set_t *data_set, pe_node_t *node, const char *reason, bool priority_delay)
Schedule a fence action for a node.
Definition: unpack.c:79
pe_node_t * pe__find_active_requires(const resource_t *rsc, unsigned int *count)
Definition: complex.c:1080
action_t * find_first_action(GListPtr input, const char *uuid, const char *task, node_t *on_node)
Definition: utils.c:1489
GListPtr master
Definition: internal.h:64
char * digest_secure_calc
Definition: internal.h:325
bool pe__shutdown_requested(pe_node_t *node)
Definition: utils.c:2682
const char * container_fix_remote_addr_in(resource_t *rsc, xmlNode *xml, const char *field)
Definition: container.c:788
gboolean add_tag_ref(GHashTable *tags, const char *tag_name, const char *obj_ref)
Definition: utils.c:2552
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:477
void pe_free_shallow_adv(GListPtr alist, gboolean with_data)
const char * pe_node_attribute_raw(pe_node_t *node, const char *name)
Definition: common.c:497
enum rsc_role_e native_resource_state(const resource_t *rsc, gboolean current)
Definition: native.c:827
GSList * keys
Definition: internal.h:49
void group_print(resource_t *rsc, const char *pre_text, long options, void *print_data)
Definition: group.c:138
xmlNode * find_rsc_op_entry(resource_t *rsc, const char *key)
Definition: utils.c:1351
gboolean native_active(resource_t *rsc, gboolean all)
Definition: native.c:360
GHashTable * node_hash_dup(GHashTable *hash)
GListPtr node_list_from_hash(GHashTable *hash, gboolean reset, gboolean filter)
xmlNode * params_all
Definition: internal.h:321
void pe__free_param_checks(pe_working_set_t *data_set)
Definition: remote.c:258
GListPtr active
Definition: internal.h:58
enum rsc_role_e clone_resource_state(const resource_t *rsc, gboolean current)
Definition: clone.c:603
GListPtr node_list_minus(GListPtr list1, GListPtr list2, gboolean filter)
void common_print(resource_t *rsc, const char *pre_text, const char *name, node_t *node, long options, void *print_data)
Definition: native.c:554
const char * pe_node_attribute_calculated(pe_node_t *node, const char *name, resource_t *rsc)
Definition: common.c:459
pe_ordering
Definition: status.h:453
GHashTable * node_hash_from_list(GListPtr list)
Definition: utils.c:197
gboolean clone_active(resource_t *rsc, gboolean all)
Definition: clone.c:228
Cluster status and scheduling.
void add_hash_param(GHashTable *hash, const char *name, const char *value)
Definition: common.c:442
GListPtr demote
Definition: internal.h:62
void resource_location(resource_t *rsc, node_t *node, int score, const char *tag, pe_working_set_t *data_set)
Definition: utils.c:1628
resource_t * rh_rsc
Definition: internal.h:43
int pe_get_configured_timeout(resource_t *rsc, const char *action, pe_working_set_t *data_set)
Definition: utils.c:880
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:346
void node_list_exclude(GHashTable *list, GListPtr list2, gboolean merge_scores)
Definition: utils.c:162
ticket_t * ticket_new(const char *ticket_id, pe_working_set_t *data_set)
Definition: utils.c:1919
gboolean group_active(resource_t *rsc, gboolean all)
Definition: group.c:93
enum rsc_role_e container_resource_state(const resource_t *rsc, gboolean current)
Definition: container.c:1426
char * clone_zero(const char *last_rsc_id)
Definition: unpack.c:1684
GListPtr inactive
Definition: internal.h:59
xmlNode * params_secure
Definition: internal.h:322
void dump_node_capacity(int level, const char *comment, node_t *node)
Definition: utils.c:380
int merge_weights(int w1, int w2)
Definition: common.c:405
#define uint32_t
Definition: stdint.in.h:158
char data[0]
Definition: internal.h:86
action_t * pre
Definition: internal.h:53
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:237
void container_print(resource_t *rsc, const char *pre_text, long options, void *print_data)
Definition: container.c:1293
rsc_role_e
Definition: common.h:81
gboolean container_active(resource_t *rsc, gboolean all)
Definition: container.c:1127
void native_free(resource_t *rsc)
Definition: native.c:820
gboolean native_unpack(resource_t *rsc, pe_working_set_t *data_set)
Definition: native.c:190
void pe_free_action(action_t *action)
Definition: utils.c:1404
void clear_bit_recursive(resource_t *rsc, unsigned long long flag)
Definition: utils.c:2300
void destroy_ticket(gpointer data)
Definition: utils.c:1907
pe_node_t * pe__find_active_on(const resource_t *rsc, unsigned int *count_all, unsigned int *count_clean)
Definition: complex.c:1000
void pe_free_shallow(GListPtr alist)
Definition: status.h:209
void pe__show_node_weights_as(const char *file, const char *function, int line, bool to_log, pe_resource_t *rsc, const char *comment, GHashTable *nodes)
Definition: utils.c:331
GListPtr promote
Definition: internal.h:63
struct notify_data_s notify_data_t
bool pe__resource_is_disabled(pe_resource_t *rsc)
Definition: utils.c:2690
action_t * lh_action
Definition: internal.h:39
GListPtr start
Definition: internal.h:60
gboolean order_actions(action_t *lh_action, action_t *rh_action, enum pe_ordering order)
Definition: utils.c:1838
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:2108
const char * action
Definition: internal.h:51
pe_fc_flags_e
Definition: internal.h:133
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:22
gint sort_node_uname(gconstpointer a, gconstpointer b)
Definition: utils.c:239
const char * pe_base_name_end(const char *id)
Definition: unpack.c:1622
GList * GListPtr
Definition: crm.h:210
struct pe__location_constraint_s pe__location_t
bool is_set_recursive(resource_t *rsc, long long flag, bool any)
Definition: clone.c:330
char * digest_restart_calc
Definition: internal.h:326
void trigger_unfencing(resource_t *rsc, node_t *node, const char *reason, action_t *dependency, pe_working_set_t *data_set)
Definition: utils.c:2518
void pe__count_bundle(pe_resource_t *rsc)
Definition: container.c:1453
resource_t * native_find_rsc(resource_t *rsc, const char *id, node_t *node, int flags)
Definition: native.c:261
uint64_t flags
Definition: remote.c:156
pe_check_parameters
Definition: status.h:159
void master_print(resource_t *rsc, const char *pre_text, long options, void *print_data)
action_tasks
Definition: common.h:52
pe_action_t * pe_fence_op(pe_node_t *node, const char *op, bool optional, const char *reason, bool priority_delay, pe_working_set_t *data_set)
Definition: utils.c:2413
rsc_digest_cmp_val
Definition: internal.h:307
enum crm_ais_msg_types type
Definition: internal.h:79
gboolean clone_unpack(resource_t *rsc, pe_working_set_t *data_set)
Definition: clone.c:128
gboolean master_unpack(resource_t *rsc, pe_working_set_t *data_set)
Definition: clone.c:110