pacemaker  1.1.19-c3c624ea3d
Scalable High-Availability cluster resource manager
internal.h
Go to the documentation of this file.
1 /*
2  * Copyright 2004-2018 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 notify_data_s {
26  GHashTable *keys;
27 
28  const char *action;
29 
34 
35  GListPtr active; /* notify_entry_t* */
36  GListPtr inactive; /* notify_entry_t* */
37  GListPtr start; /* notify_entry_t* */
38  GListPtr stop; /* notify_entry_t* */
39  GListPtr demote; /* notify_entry_t* */
40  GListPtr promote; /* notify_entry_t* */
41  GListPtr master; /* notify_entry_t* */
42  GListPtr slave; /* notify_entry_t* */
43  GHashTable *allowed_nodes;
44 
46 
47 bool pe_can_fence(pe_working_set_t *data_set, node_t *node);
48 
49 int merge_weights(int w1, int w2);
50 void add_hash_param(GHashTable * hash, const char *name, const char *value);
51 void append_hashtable(gpointer key, gpointer value, gpointer user_data);
52 
53 char *native_parameter(resource_t * rsc, node_t * node, gboolean create, const char *name,
54  pe_working_set_t * data_set);
55 node_t *native_location(resource_t * rsc, GListPtr * list, gboolean current);
56 
57 void pe_metadata(void);
58 void verify_pe_options(GHashTable * options);
59 
60 void common_update_score(resource_t * rsc, const char *id, int score);
61 void native_add_running(resource_t * rsc, node_t * node, pe_working_set_t * data_set);
62 node_t *rsc_known_on(resource_t * rsc, GListPtr * list);
63 
64 gboolean native_unpack(resource_t * rsc, pe_working_set_t * data_set);
65 gboolean group_unpack(resource_t * rsc, pe_working_set_t * data_set);
66 gboolean clone_unpack(resource_t * rsc, pe_working_set_t * data_set);
67 gboolean master_unpack(resource_t * rsc, pe_working_set_t * data_set);
68 gboolean container_unpack(resource_t * rsc, pe_working_set_t * data_set);
69 
70 resource_t *native_find_rsc(resource_t * rsc, const char *id, node_t * node, int flags);
71 
72 gboolean native_active(resource_t * rsc, gboolean all);
73 gboolean group_active(resource_t * rsc, gboolean all);
74 gboolean clone_active(resource_t * rsc, gboolean all);
75 gboolean master_active(resource_t * rsc, gboolean all);
76 gboolean container_active(resource_t * rsc, gboolean all);
77 
78 void native_print(resource_t * rsc, const char *pre_text, long options, void *print_data);
79 void group_print(resource_t * rsc, const char *pre_text, long options, void *print_data);
80 void clone_print(resource_t * rsc, const char *pre_text, long options, void *print_data);
81 void master_print(resource_t * rsc, const char *pre_text, long options, void *print_data);
82 void container_print(resource_t * rsc, const char *pre_text, long options, void *print_data);
83 
84 void native_free(resource_t * rsc);
85 void group_free(resource_t * rsc);
86 void clone_free(resource_t * rsc);
87 void master_free(resource_t * rsc);
88 void container_free(resource_t * rsc);
89 
90 enum rsc_role_e native_resource_state(const resource_t * rsc, gboolean current);
91 enum rsc_role_e group_resource_state(const resource_t * rsc, gboolean current);
92 enum rsc_role_e clone_resource_state(const resource_t * rsc, gboolean current);
93 enum rsc_role_e master_resource_state(const resource_t * rsc, gboolean current);
94 enum rsc_role_e container_resource_state(const resource_t * rsc, gboolean current);
95 
96 gboolean common_unpack(xmlNode * xml_obj, resource_t ** rsc, resource_t * parent,
97  pe_working_set_t * data_set);
98 void common_free(resource_t * rsc);
99 
101 
102 extern node_t *node_copy(const node_t *this_node);
103 extern time_t get_effective_time(pe_working_set_t * data_set);
104 
105 /* Failure handling utilities (from failcounts.c) */
106 
107 // bit flags for fail count handling options
110  pe_fc_effective = 0x01, // don't count expired failures
111  pe_fc_fillers = 0x02, // if container, include filler failures in count
112 };
113 
114 int pe_get_failcount(node_t *node, resource_t *rsc, time_t *last_failure,
115  uint32_t flags, xmlNode *xml_op,
116  pe_working_set_t *data_set);
117 
118 
119 /* Functions for finding/counting a resource's active nodes */
120 
122  unsigned int *count_all,
123  unsigned int *count_clean);
125  unsigned int *count);
126 
127 static inline pe_node_t *
128 pe__current_node(const resource_t *rsc)
129 {
130  return pe__find_active_on(rsc, NULL, NULL);
131 }
132 
133 
134 /* Binary like operators for lists of nodes */
135 extern void node_list_exclude(GHashTable * list, GListPtr list2, gboolean merge_scores);
136 extern GListPtr node_list_dup(GListPtr list, gboolean reset, gboolean filter);
137 extern GListPtr node_list_from_hash(GHashTable * hash, gboolean reset, gboolean filter);
138 
139 extern GHashTable *node_hash_from_list(GListPtr list);
140 static inline gpointer
141 pe_hash_table_lookup(GHashTable * hash, gconstpointer key)
142 {
143  if (hash) {
144  return g_hash_table_lookup(hash, key);
145  }
146  return NULL;
147 }
148 
149 extern action_t *get_pseudo_op(const char *name, pe_working_set_t * data_set);
150 extern gboolean order_actions(action_t * lh_action, action_t * rh_action, enum pe_ordering order);
151 
152 GHashTable *node_hash_dup(GHashTable * hash);
153 extern GListPtr node_list_and(GListPtr list1, GListPtr list2, gboolean filter);
154 
155 extern GListPtr node_list_xor(GListPtr list1, GListPtr list2, gboolean filter);
156 
157 extern GListPtr node_list_minus(GListPtr list1, GListPtr list2, gboolean filter);
158 
159 extern void pe_free_shallow(GListPtr alist);
160 extern void pe_free_shallow_adv(GListPtr alist, gboolean with_data);
161 
162 /* Printing functions for debug */
163 extern void print_node(const char *pre_text, node_t * node, gboolean details);
164 
165 extern void print_resource(int log_level, const char *pre_text, resource_t * rsc, gboolean details);
166 
167 extern void dump_node_scores_worker(int level, const char *file, const char *function, int line,
168  resource_t * rsc, const char *comment, GHashTable * nodes);
169 
170 extern void dump_node_capacity(int level, const char *comment, node_t * node);
171 extern void dump_rsc_utilization(int level, const char *comment, resource_t * rsc, node_t * node);
172 
173 # define dump_node_scores(level, rsc, text, nodes) do { \
174  dump_node_scores_worker(level, __FILE__, __FUNCTION__, __LINE__, rsc, text, nodes); \
175  } while(0)
176 
177 /* Sorting functions */
178 extern gint sort_rsc_priority(gconstpointer a, gconstpointer b);
179 extern gint sort_rsc_index(gconstpointer a, gconstpointer b);
180 
181 extern xmlNode *find_rsc_op_entry(resource_t * rsc, const char *key);
182 
183 extern action_t *custom_action(resource_t * rsc, char *key, const char *task, node_t * on_node,
184  gboolean optional, gboolean foo, pe_working_set_t * data_set);
185 
186 # define delete_key(rsc) generate_op_key(rsc->id, CRMD_ACTION_DELETE, 0)
187 # define delete_action(rsc, node, optional) custom_action( \
188  rsc, delete_key(rsc), CRMD_ACTION_DELETE, node, \
189  optional, TRUE, data_set);
190 
191 # define stopped_key(rsc) generate_op_key(rsc->id, CRMD_ACTION_STOPPED, 0)
192 # define stopped_action(rsc, node, optional) custom_action( \
193  rsc, stopped_key(rsc), CRMD_ACTION_STOPPED, node, \
194  optional, TRUE, data_set);
195 
196 # define stop_key(rsc) generate_op_key(rsc->id, CRMD_ACTION_STOP, 0)
197 # define stop_action(rsc, node, optional) custom_action( \
198  rsc, stop_key(rsc), CRMD_ACTION_STOP, node, \
199  optional, TRUE, data_set);
200 
201 # define reload_key(rsc) generate_op_key(rsc->id, CRMD_ACTION_RELOAD, 0)
202 # define start_key(rsc) generate_op_key(rsc->id, CRMD_ACTION_START, 0)
203 # define start_action(rsc, node, optional) custom_action( \
204  rsc, start_key(rsc), CRMD_ACTION_START, node, \
205  optional, TRUE, data_set)
206 
207 # define started_key(rsc) generate_op_key(rsc->id, CRMD_ACTION_STARTED, 0)
208 # define started_action(rsc, node, optional) custom_action( \
209  rsc, started_key(rsc), CRMD_ACTION_STARTED, node, \
210  optional, TRUE, data_set)
211 
212 # define promote_key(rsc) generate_op_key(rsc->id, CRMD_ACTION_PROMOTE, 0)
213 # define promote_action(rsc, node, optional) custom_action( \
214  rsc, promote_key(rsc), CRMD_ACTION_PROMOTE, node, \
215  optional, TRUE, data_set)
216 
217 # define promoted_key(rsc) generate_op_key(rsc->id, CRMD_ACTION_PROMOTED, 0)
218 # define promoted_action(rsc, node, optional) custom_action( \
219  rsc, promoted_key(rsc), CRMD_ACTION_PROMOTED, node, \
220  optional, TRUE, data_set)
221 
222 # define demote_key(rsc) generate_op_key(rsc->id, CRMD_ACTION_DEMOTE, 0)
223 # define demote_action(rsc, node, optional) custom_action( \
224  rsc, demote_key(rsc), CRMD_ACTION_DEMOTE, node, \
225  optional, TRUE, data_set)
226 
227 # define demoted_key(rsc) generate_op_key(rsc->id, CRMD_ACTION_DEMOTED, 0)
228 # define demoted_action(rsc, node, optional) custom_action( \
229  rsc, demoted_key(rsc), CRMD_ACTION_DEMOTED, node, \
230  optional, TRUE, data_set)
231 
232 extern int pe_get_configured_timeout(resource_t *rsc, const char *action,
233  pe_working_set_t *data_set);
234 
235 extern action_t *find_first_action(GListPtr input, const char *uuid, const char *task,
236  node_t * on_node);
237 extern enum action_tasks get_complex_task(resource_t * rsc, const char *name,
238  gboolean allow_non_atomic);
239 
240 extern GListPtr find_actions(GListPtr input, const char *key, const node_t *on_node);
241 extern GListPtr find_actions_exact(GListPtr input, const char *key, node_t * on_node);
242 extern GListPtr find_recurring_actions(GListPtr input, node_t * not_on_node);
243 
244 extern void pe_free_action(action_t * action);
245 
246 extern void resource_location(resource_t * rsc, node_t * node, int score, const char *tag,
247  pe_working_set_t * data_set);
248 
249 extern gint sort_op_by_callid(gconstpointer a, gconstpointer b);
250 extern gboolean get_target_role(resource_t * rsc, enum rsc_role_e *role);
251 
252 extern resource_t *find_clone_instance(resource_t * rsc, const char *sub_id,
253  pe_working_set_t * data_set);
254 
255 extern void destroy_ticket(gpointer data);
256 extern ticket_t *ticket_new(const char *ticket_id, pe_working_set_t * data_set);
257 
258 // Resources for manipulating resource names
259 const char *pe_base_name_end(const char *id);
260 char *clone_strip(const char *last_rsc_id);
261 char *clone_zero(const char *last_rsc_id);
262 
263 static inline bool
264 pe_base_name_eq(resource_t *rsc, const char *id)
265 {
266  if (id && rsc && rsc->id) {
267  // Number of characters in rsc->id before any clone suffix
268  size_t base_len = pe_base_name_end(rsc->id) - rsc->id + 1;
269 
270  return (strlen(id) == base_len) && !strncmp(id, rsc->id, base_len);
271  }
272  return FALSE;
273 }
274 
275 int get_target_rc(xmlNode * xml_op);
276 
277 gint sort_node_uname(gconstpointer a, gconstpointer b);
278 bool is_set_recursive(resource_t * rsc, long long flag, bool any);
279 
290 };
291 
292 typedef struct op_digest_cache_s {
294  xmlNode *params_all;
295  xmlNode *params_secure;
296  xmlNode *params_restart;
301 
302 op_digest_cache_t *rsc_action_digest_cmp(resource_t * rsc, xmlNode * xml_op, node_t * node,
303  pe_working_set_t * data_set);
304 
305 action_t *pe_fence_op(node_t * node, const char *op, bool optional, const char *reason, pe_working_set_t * data_set);
306 void trigger_unfencing(
307  resource_t * rsc, node_t *node, const char *reason, action_t *dependency, pe_working_set_t * data_set);
308 
309 void pe_action_set_reason(pe_action_t *action, const char *reason, bool overwrite);
310 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);
311 
312 #define pe_action_required(action, reason, text) pe_action_set_flag_reason(__FUNCTION__, __LINE__, action, reason, text, pe_action_optional, FALSE)
313 #define pe_action_implies(action, reason, flag) pe_action_set_flag_reason(__FUNCTION__, __LINE__, action, reason, NULL, flag, FALSE)
314 
315 void set_bit_recursive(resource_t * rsc, unsigned long long flag);
316 void clear_bit_recursive(resource_t * rsc, unsigned long long flag);
317 
318 gboolean add_tag_ref(GHashTable * tags, const char * tag_name, const char * obj_ref);
319 
320 void print_rscs_brief(GListPtr rsc_list, const char * pre_text, long options,
321  void * print_data, gboolean print_all);
322 void pe_fence_node(pe_working_set_t * data_set, node_t * node, const char *reason);
323 
324 node_t *pe_create_node(const char *id, const char *uname, const char *type,
325  const char *score, pe_working_set_t * data_set);
326 bool remote_id_conflict(const char *remote_name, pe_working_set_t *data);
327 void common_print(resource_t * rsc, const char *pre_text, const char *name, node_t *node, long options, void *print_data);
328 resource_t *find_container_child(const resource_t *bundle, const node_t *node);
330 const char *container_fix_remote_addr_in(resource_t *rsc, xmlNode *xml, const char *field);
331 const char *pe_node_attribute_calculated(pe_node_t *node, const char *name, resource_t *rsc);
332 const char *pe_node_attribute_raw(pe_node_t *node, const char *name);
333 
334 #endif
bool remote_id_conflict(const char *remote_name, pe_working_set_t *data)
Definition: unpack.c:424
void verify_pe_options(GHashTable *options)
Definition: common.c:184
void container_free(resource_t *rsc)
Definition: container.c:1397
void clone_print(resource_t *rsc, const char *pre_text, long options, void *print_data)
Definition: clone.c:372
action_t * pre_done
Definition: internal.h:32
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:343
gint sort_rsc_priority(gconstpointer a, gconstpointer b)
Definition: utils.c:392
gint sort_rsc_index(gconstpointer a, gconstpointer b)
Definition: utils.c:365
gboolean get_target_role(resource_t *rsc, enum rsc_role_e *role)
Definition: utils.c:1745
void pe_metadata(void)
Definition: common.c:175
node_t * node_copy(const node_t *this_node)
Definition: utils.c:127
action_t * post_done
Definition: internal.h:33
GListPtr node_list_dup(GListPtr list, gboolean reset, gboolean filter)
Definition: utils.c:199
GHashTable * allowed_nodes
Definition: internal.h:43
action_t * post
Definition: internal.h:31
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:362
bool pe_can_fence(pe_working_set_t *data_set, node_t *node)
Definition: utils.c:100
bool container_fix_remote_addr(resource_t *rsc)
Definition: container.c:757
enum action_tasks get_complex_task(resource_t *rsc, const char *name, gboolean allow_non_atomic)
Definition: utils.c:1416
struct op_digest_cache_s op_digest_cache_t
enum rsc_role_e master_resource_state(const resource_t *rsc, gboolean current)
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:2195
GListPtr slave
Definition: internal.h:42
char * native_parameter(resource_t *rsc, node_t *node, gboolean create, const char *name, pe_working_set_t *data_set)
Definition: native.c:248
GListPtr find_actions_exact(GListPtr input, const char *key, node_t *on_node)
Definition: utils.c:1510
GHashTable * keys
Definition: internal.h:26
GListPtr find_actions(GListPtr input, const char *key, const node_t *on_node)
Definition: utils.c:1470
gboolean common_unpack(xmlNode *xml_obj, resource_t **rsc, resource_t *parent, pe_working_set_t *data_set)
Definition: complex.c:454
void common_update_score(resource_t *rsc, const char *id, int score)
Definition: complex.c:855
void common_free(resource_t *rsc)
Definition: complex.c:908
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:2346
void print_node(const char *pre_text, node_t *node, gboolean details)
Definition: utils.c:1295
gint sort_op_by_callid(gconstpointer a, gconstpointer b)
Definition: utils.c:1615
time_t get_effective_time(pe_working_set_t *data_set)
Definition: utils.c:1730
GListPtr node_list_and(GListPtr list1, GListPtr list2, gboolean filter)
gboolean master_active(resource_t *rsc, gboolean all)
xmlNode * params_restart
Definition: internal.h:296
void set_bit_recursive(resource_t *rsc, unsigned long long flag)
Definition: utils.c:2161
action_t * get_pseudo_op(const char *name, pe_working_set_t *data_set)
Definition: utils.c:1833
int get_target_rc(xmlNode *xml_op)
Definition: unpack.c:3064
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:735
void print_rscs_brief(GListPtr rsc_list, const char *pre_text, long options, void *print_data, gboolean print_all)
Definition: native.c:889
GListPtr find_recurring_actions(GListPtr input, node_t *not_on_node)
Definition: utils.c:1382
void clone_free(resource_t *rsc)
Definition: clone.c:574
enum rsc_role_e group_resource_state(const resource_t *rsc, gboolean current)
Definition: group.c:205
pe_action_flags
Definition: status.h:234
char * id
Definition: status.h:261
resource_t * find_container_child(const resource_t *bundle, const node_t *node)
Definition: container.c:1179
gboolean container_unpack(resource_t *rsc, pe_working_set_t *data_set)
Definition: container.c:831
char uname[MAX_NAME]
Definition: internal.h:53
void pe_action_set_reason(pe_action_t *action, const char *reason, bool overwrite)
Definition: utils.c:2406
void master_free(resource_t *rsc)
GListPtr stop
Definition: internal.h:38
void native_add_running(resource_t *rsc, node_t *node, pe_working_set_t *data_set)
Definition: native.c:36
void append_hashtable(gpointer key, gpointer value, gpointer user_data)
char * digest_all_calc
Definition: internal.h:297
char * clone_strip(const char *last_rsc_id)
Definition: unpack.c:1615
pe_working_set_t * pe_dataset
Definition: utils.c:31
pe_node_t * pe__find_active_requires(const resource_t *rsc, unsigned int *count)
Definition: complex.c:1070
action_t * find_first_action(GListPtr input, const char *uuid, const char *task, node_t *on_node)
Definition: utils.c:1440
GListPtr master
Definition: internal.h:41
char * digest_secure_calc
Definition: internal.h:298
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:77
const char * container_fix_remote_addr_in(resource_t *rsc, xmlNode *xml, const char *field)
Definition: container.c:793
gboolean add_tag_ref(GHashTable *tags, const char *tag_name, const char *obj_ref)
Definition: utils.c:2310
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:419
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:478
enum rsc_role_e native_resource_state(const resource_t *rsc, gboolean current)
Definition: native.c:757
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:1289
gboolean native_active(resource_t *rsc, gboolean all)
Definition: native.c:293
GHashTable * node_hash_dup(GHashTable *hash)
node_t * native_location(resource_t *rsc, GListPtr *list, gboolean current)
Definition: native.c:769
GListPtr node_list_from_hash(GHashTable *hash, gboolean reset, gboolean filter)
xmlNode * params_all
Definition: internal.h:294
GListPtr active
Definition: internal.h:35
enum rsc_role_e clone_resource_state(const resource_t *rsc, gboolean current)
Definition: clone.c:608
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:487
const char * pe_node_attribute_calculated(pe_node_t *node, const char *name, resource_t *rsc)
Definition: common.c:440
pe_ordering
Definition: status.h:419
GHashTable * node_hash_from_list(GListPtr list)
Definition: utils.c:183
gboolean clone_active(resource_t *rsc, gboolean all)
Definition: clone.c:239
void add_hash_param(GHashTable *hash, const char *name, const char *value)
Definition: common.c:423
GListPtr demote
Definition: internal.h:39
void resource_location(resource_t *rsc, node_t *node, int score, const char *tag, pe_working_set_t *data_set)
Definition: utils.c:1571
int pe_get_configured_timeout(resource_t *rsc, const char *action, pe_working_set_t *data_set)
Definition: utils.c:832
void node_list_exclude(GHashTable *list, GListPtr list2, gboolean merge_scores)
Definition: utils.c:148
ticket_t * ticket_new(const char *ticket_id, pe_working_set_t *data_set)
Definition: utils.c:1862
gboolean group_active(resource_t *rsc, gboolean all)
Definition: group.c:90
enum rsc_role_e container_resource_state(const resource_t *rsc, gboolean current)
Definition: container.c:1430
char * clone_zero(const char *last_rsc_id)
Definition: unpack.c:1637
GListPtr inactive
Definition: internal.h:36
xmlNode * params_secure
Definition: internal.h:295
void dump_node_capacity(int level, const char *comment, node_t *node)
Definition: utils.c:322
int merge_weights(int w1, int w2)
Definition: common.c:386
#define uint32_t
Definition: stdint.in.h:158
char data[0]
Definition: internal.h:58
action_t * pre
Definition: internal.h:30
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:1297
rsc_role_e
Definition: common.h:81
gboolean container_active(resource_t *rsc, gboolean all)
Definition: container.c:1131
void native_free(resource_t *rsc)
Definition: native.c:750
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:234
gboolean native_unpack(resource_t *rsc, pe_working_set_t *data_set)
Definition: native.c:133
void pe_free_action(action_t *action)
Definition: utils.c:1355
void clear_bit_recursive(resource_t *rsc, unsigned long long flag)
Definition: utils.c:2148
void destroy_ticket(gpointer data)
Definition: utils.c:1850
pe_node_t * pe__find_active_on(const resource_t *rsc, unsigned int *count_all, unsigned int *count_clean)
Definition: complex.c:990
void pe_free_shallow(GListPtr alist)
Definition: status.h:178
GListPtr promote
Definition: internal.h:40
struct notify_data_s notify_data_t
void print_resource(int log_level, const char *pre_text, resource_t *rsc, gboolean details)
Definition: utils.c:1339
GListPtr start
Definition: internal.h:37
gboolean order_actions(action_t *lh_action, action_t *rh_action, enum pe_ordering order)
Definition: utils.c:1781
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:2035
const char * action
Definition: internal.h:28
pe_fc_flags_e
Definition: internal.h:108
resource_t * find_clone_instance(resource_t *rsc, const char *sub_id, pe_working_set_t *data_set)
Definition: clone.c:55
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:225
const char * pe_base_name_end(const char *id)
Definition: unpack.c:1575
GList * GListPtr
Definition: crm.h:210
bool is_set_recursive(resource_t *rsc, long long flag, bool any)
Definition: clone.c:341
char * digest_restart_calc
Definition: internal.h:299
node_t * rsc_known_on(resource_t *rsc, GListPtr *list)
void trigger_unfencing(resource_t *rsc, node_t *node, const char *reason, action_t *dependency, pe_working_set_t *data_set)
Definition: utils.c:2276
resource_t * native_find_rsc(resource_t *rsc, const char *id, node_t *node, int flags)
Definition: native.c:194
uint64_t flags
Definition: remote.c:156
void master_print(resource_t *rsc, const char *pre_text, long options, void *print_data)
action_tasks
Definition: common.h:52
rsc_digest_cmp_val
Definition: internal.h:280
enum crm_ais_msg_types type
Definition: internal.h:51
gboolean clone_unpack(resource_t *rsc, pe_working_set_t *data_set)
Definition: clone.c:142
gboolean master_unpack(resource_t *rsc, pe_working_set_t *data_set)
Definition: clone.c:124