pacemaker  1.1.18-7fdfbbe
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 (C) 2004 Andrew Beekhof <andrew@beekhof.net>
3  *
4  * This program is free software; you can redistribute it and/or
5  * modify it under the terms of the GNU Lesser General Public
6  * License as published by the Free Software Foundation; either
7  * version 2 of the License, or (at your option) any later version.
8  *
9  * This software is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12  * General Public License for more details.
13  *
14  * You should have received a copy of the GNU Lesser General Public
15  * License along with this library; if not, write to the Free Software
16  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
17  */
18 #ifndef PE_INTERNAL__H
19 # define PE_INTERNAL__H
20 # include <string.h>
21 # include <crm/pengine/status.h>
22 # include <crm/pengine/remote.h>
23 
24 # define pe_rsc_info(rsc, fmt, args...) crm_log_tag(LOG_INFO, rsc ? rsc->id : "<NULL>", fmt, ##args)
25 # define pe_rsc_debug(rsc, fmt, args...) crm_log_tag(LOG_DEBUG, rsc ? rsc->id : "<NULL>", fmt, ##args)
26 # define pe_rsc_trace(rsc, fmt, args...) crm_log_tag(LOG_TRACE, rsc ? rsc->id : "<NULL>", fmt, ##args)
27 
28 # define pe_err(fmt...) { was_processing_error = TRUE; crm_config_error = TRUE; crm_err(fmt); }
29 # define pe_warn(fmt...) { was_processing_warning = TRUE; crm_config_warning = TRUE; crm_warn(fmt); }
30 # define pe_proc_err(fmt...) { was_processing_error = TRUE; crm_err(fmt); }
31 # define pe_proc_warn(fmt...) { was_processing_warning = TRUE; crm_warn(fmt); }
32 # define pe_set_action_bit(action, bit) action->flags = crm_set_bit(__FUNCTION__, __LINE__, action->uuid, action->flags, bit)
33 # define pe_clear_action_bit(action, bit) action->flags = crm_clear_bit(__FUNCTION__, __LINE__, action->uuid, action->flags, bit)
34 
35 typedef struct notify_data_s {
36  GHashTable *keys;
37 
38  const char *action;
39 
44 
45  GListPtr active; /* notify_entry_t* */
46  GListPtr inactive; /* notify_entry_t* */
47  GListPtr start; /* notify_entry_t* */
48  GListPtr stop; /* notify_entry_t* */
49  GListPtr demote; /* notify_entry_t* */
50  GListPtr promote; /* notify_entry_t* */
51  GListPtr master; /* notify_entry_t* */
52  GListPtr slave; /* notify_entry_t* */
53  GHashTable *allowed_nodes;
54 
56 
57 bool pe_can_fence(pe_working_set_t *data_set, node_t *node);
58 
59 int merge_weights(int w1, int w2);
60 void add_hash_param(GHashTable * hash, const char *name, const char *value);
61 void append_hashtable(gpointer key, gpointer value, gpointer user_data);
62 
63 char *native_parameter(resource_t * rsc, node_t * node, gboolean create, const char *name,
64  pe_working_set_t * data_set);
65 node_t *native_location(resource_t * rsc, GListPtr * list, gboolean current);
66 
67 void pe_metadata(void);
68 void verify_pe_options(GHashTable * options);
69 
70 void common_update_score(resource_t * rsc, const char *id, int score);
71 void native_add_running(resource_t * rsc, node_t * node, pe_working_set_t * data_set);
72 node_t *rsc_known_on(resource_t * rsc, GListPtr * list);
73 
74 gboolean native_unpack(resource_t * rsc, pe_working_set_t * data_set);
75 gboolean group_unpack(resource_t * rsc, pe_working_set_t * data_set);
76 gboolean clone_unpack(resource_t * rsc, pe_working_set_t * data_set);
77 gboolean master_unpack(resource_t * rsc, pe_working_set_t * data_set);
78 gboolean container_unpack(resource_t * rsc, pe_working_set_t * data_set);
79 
80 resource_t *native_find_rsc(resource_t * rsc, const char *id, node_t * node, int flags);
81 
82 gboolean native_active(resource_t * rsc, gboolean all);
83 gboolean group_active(resource_t * rsc, gboolean all);
84 gboolean clone_active(resource_t * rsc, gboolean all);
85 gboolean master_active(resource_t * rsc, gboolean all);
86 gboolean container_active(resource_t * rsc, gboolean all);
87 
88 void native_print(resource_t * rsc, const char *pre_text, long options, void *print_data);
89 void group_print(resource_t * rsc, const char *pre_text, long options, void *print_data);
90 void clone_print(resource_t * rsc, const char *pre_text, long options, void *print_data);
91 void master_print(resource_t * rsc, const char *pre_text, long options, void *print_data);
92 void container_print(resource_t * rsc, const char *pre_text, long options, void *print_data);
93 
94 void native_free(resource_t * rsc);
95 void group_free(resource_t * rsc);
96 void clone_free(resource_t * rsc);
97 void master_free(resource_t * rsc);
98 void container_free(resource_t * rsc);
99 
100 enum rsc_role_e native_resource_state(const resource_t * rsc, gboolean current);
101 enum rsc_role_e group_resource_state(const resource_t * rsc, gboolean current);
102 enum rsc_role_e clone_resource_state(const resource_t * rsc, gboolean current);
103 enum rsc_role_e master_resource_state(const resource_t * rsc, gboolean current);
104 enum rsc_role_e container_resource_state(const resource_t * rsc, gboolean current);
105 
106 gboolean common_unpack(xmlNode * xml_obj, resource_t ** rsc, resource_t * parent,
107  pe_working_set_t * data_set);
108 void common_free(resource_t * rsc);
109 
111 
112 extern node_t *node_copy(const node_t *this_node);
113 extern time_t get_effective_time(pe_working_set_t * data_set);
114 
115 /* Failure handling utilities (from failcounts.c) */
116 
117 // bit flags for fail count handling options
120  pe_fc_effective = 0x01, // don't count expired failures
121  pe_fc_fillers = 0x02, // if container, include filler failures in count
122 };
123 
124 int pe_get_failcount(node_t *node, resource_t *rsc, time_t *last_failure,
125  uint32_t flags, xmlNode *xml_op,
126  pe_working_set_t *data_set);
127 
128 /* Binary like operators for lists of nodes */
129 extern void node_list_exclude(GHashTable * list, GListPtr list2, gboolean merge_scores);
130 extern GListPtr node_list_dup(GListPtr list, gboolean reset, gboolean filter);
131 extern GListPtr node_list_from_hash(GHashTable * hash, gboolean reset, gboolean filter);
132 
133 extern GHashTable *node_hash_from_list(GListPtr list);
134 static inline gpointer
135 pe_hash_table_lookup(GHashTable * hash, gconstpointer key)
136 {
137  if (hash) {
138  return g_hash_table_lookup(hash, key);
139  }
140  return NULL;
141 }
142 
143 extern action_t *get_pseudo_op(const char *name, pe_working_set_t * data_set);
144 extern gboolean order_actions(action_t * lh_action, action_t * rh_action, enum pe_ordering order);
145 
146 GHashTable *node_hash_dup(GHashTable * hash);
147 extern GListPtr node_list_and(GListPtr list1, GListPtr list2, gboolean filter);
148 
149 extern GListPtr node_list_xor(GListPtr list1, GListPtr list2, gboolean filter);
150 
151 extern GListPtr node_list_minus(GListPtr list1, GListPtr list2, gboolean filter);
152 
153 extern void pe_free_shallow(GListPtr alist);
154 extern void pe_free_shallow_adv(GListPtr alist, gboolean with_data);
155 
156 /* Printing functions for debug */
157 extern void print_node(const char *pre_text, node_t * node, gboolean details);
158 
159 extern void print_resource(int log_level, const char *pre_text, resource_t * rsc, gboolean details);
160 
161 extern void dump_node_scores_worker(int level, const char *file, const char *function, int line,
162  resource_t * rsc, const char *comment, GHashTable * nodes);
163 
164 extern void dump_node_capacity(int level, const char *comment, node_t * node);
165 extern void dump_rsc_utilization(int level, const char *comment, resource_t * rsc, node_t * node);
166 
167 # define dump_node_scores(level, rsc, text, nodes) do { \
168  dump_node_scores_worker(level, __FILE__, __FUNCTION__, __LINE__, rsc, text, nodes); \
169  } while(0)
170 
171 /* Sorting functions */
172 extern gint sort_rsc_priority(gconstpointer a, gconstpointer b);
173 extern gint sort_rsc_index(gconstpointer a, gconstpointer b);
174 
175 extern xmlNode *find_rsc_op_entry(resource_t * rsc, const char *key);
176 
177 extern action_t *custom_action(resource_t * rsc, char *key, const char *task, node_t * on_node,
178  gboolean optional, gboolean foo, pe_working_set_t * data_set);
179 
180 # define delete_key(rsc) generate_op_key(rsc->id, CRMD_ACTION_DELETE, 0)
181 # define delete_action(rsc, node, optional) custom_action( \
182  rsc, delete_key(rsc), CRMD_ACTION_DELETE, node, \
183  optional, TRUE, data_set);
184 
185 # define stopped_key(rsc) generate_op_key(rsc->id, CRMD_ACTION_STOPPED, 0)
186 # define stopped_action(rsc, node, optional) custom_action( \
187  rsc, stopped_key(rsc), CRMD_ACTION_STOPPED, node, \
188  optional, TRUE, data_set);
189 
190 # define stop_key(rsc) generate_op_key(rsc->id, CRMD_ACTION_STOP, 0)
191 # define stop_action(rsc, node, optional) custom_action( \
192  rsc, stop_key(rsc), CRMD_ACTION_STOP, node, \
193  optional, TRUE, data_set);
194 
195 # define reload_key(rsc) generate_op_key(rsc->id, CRMD_ACTION_RELOAD, 0)
196 # define start_key(rsc) generate_op_key(rsc->id, CRMD_ACTION_START, 0)
197 # define start_action(rsc, node, optional) custom_action( \
198  rsc, start_key(rsc), CRMD_ACTION_START, node, \
199  optional, TRUE, data_set)
200 
201 # define started_key(rsc) generate_op_key(rsc->id, CRMD_ACTION_STARTED, 0)
202 # define started_action(rsc, node, optional) custom_action( \
203  rsc, started_key(rsc), CRMD_ACTION_STARTED, node, \
204  optional, TRUE, data_set)
205 
206 # define promote_key(rsc) generate_op_key(rsc->id, CRMD_ACTION_PROMOTE, 0)
207 # define promote_action(rsc, node, optional) custom_action( \
208  rsc, promote_key(rsc), CRMD_ACTION_PROMOTE, node, \
209  optional, TRUE, data_set)
210 
211 # define promoted_key(rsc) generate_op_key(rsc->id, CRMD_ACTION_PROMOTED, 0)
212 # define promoted_action(rsc, node, optional) custom_action( \
213  rsc, promoted_key(rsc), CRMD_ACTION_PROMOTED, node, \
214  optional, TRUE, data_set)
215 
216 # define demote_key(rsc) generate_op_key(rsc->id, CRMD_ACTION_DEMOTE, 0)
217 # define demote_action(rsc, node, optional) custom_action( \
218  rsc, demote_key(rsc), CRMD_ACTION_DEMOTE, node, \
219  optional, TRUE, data_set)
220 
221 # define demoted_key(rsc) generate_op_key(rsc->id, CRMD_ACTION_DEMOTED, 0)
222 # define demoted_action(rsc, node, optional) custom_action( \
223  rsc, demoted_key(rsc), CRMD_ACTION_DEMOTED, node, \
224  optional, TRUE, data_set)
225 
226 extern int pe_get_configured_timeout(resource_t *rsc, const char *action,
227  pe_working_set_t *data_set);
228 
229 extern action_t *find_first_action(GListPtr input, const char *uuid, const char *task,
230  node_t * on_node);
231 extern enum action_tasks get_complex_task(resource_t * rsc, const char *name,
232  gboolean allow_non_atomic);
233 
234 extern GListPtr find_actions(GListPtr input, const char *key, const node_t *on_node);
235 extern GListPtr find_actions_exact(GListPtr input, const char *key, node_t * on_node);
236 extern GListPtr find_recurring_actions(GListPtr input, node_t * not_on_node);
237 
238 extern void pe_free_action(action_t * action);
239 
240 extern void resource_location(resource_t * rsc, node_t * node, int score, const char *tag,
241  pe_working_set_t * data_set);
242 
243 extern gint sort_op_by_callid(gconstpointer a, gconstpointer b);
244 extern gboolean get_target_role(resource_t * rsc, enum rsc_role_e *role);
245 
246 extern resource_t *find_clone_instance(resource_t * rsc, const char *sub_id,
247  pe_working_set_t * data_set);
248 
249 extern void destroy_ticket(gpointer data);
250 extern ticket_t *ticket_new(const char *ticket_id, pe_working_set_t * data_set);
251 
252 // Resources for manipulating resource names
253 const char *pe_base_name_end(const char *id);
254 char *clone_strip(const char *last_rsc_id);
255 char *clone_zero(const char *last_rsc_id);
256 
257 static inline bool
258 pe_base_name_eq(resource_t *rsc, const char *id)
259 {
260  if (id && rsc && rsc->id) {
261  // Number of characters in rsc->id before any clone suffix
262  size_t base_len = pe_base_name_end(rsc->id) - rsc->id + 1;
263 
264  return (strlen(id) == base_len) && !strncmp(id, rsc->id, base_len);
265  }
266  return FALSE;
267 }
268 
269 int get_target_rc(xmlNode * xml_op);
270 
271 gint sort_node_uname(gconstpointer a, gconstpointer b);
272 bool is_set_recursive(resource_t * rsc, long long flag, bool any);
273 
284 };
285 
286 typedef struct op_digest_cache_s {
288  xmlNode *params_all;
289  xmlNode *params_secure;
290  xmlNode *params_restart;
295 
296 op_digest_cache_t *rsc_action_digest_cmp(resource_t * rsc, xmlNode * xml_op, node_t * node,
297  pe_working_set_t * data_set);
298 
299 action_t *pe_fence_op(node_t * node, const char *op, bool optional, const char *reason, pe_working_set_t * data_set);
300 void trigger_unfencing(
301  resource_t * rsc, node_t *node, const char *reason, action_t *dependency, pe_working_set_t * data_set);
302 
303 void pe_action_set_reason(pe_action_t *action, const char *reason, bool overwrite);
304 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);
305 
306 #define pe_action_required(action, reason, text) pe_action_set_flag_reason(__FUNCTION__, __LINE__, action, reason, text, pe_action_optional, FALSE)
307 #define pe_action_implies(action, reason, flag) pe_action_set_flag_reason(__FUNCTION__, __LINE__, action, reason, NULL, flag, FALSE)
308 
309 void set_bit_recursive(resource_t * rsc, unsigned long long flag);
310 void clear_bit_recursive(resource_t * rsc, unsigned long long flag);
311 
312 gboolean add_tag_ref(GHashTable * tags, const char * tag_name, const char * obj_ref);
313 
314 void print_rscs_brief(GListPtr rsc_list, const char * pre_text, long options,
315  void * print_data, gboolean print_all);
316 void pe_fence_node(pe_working_set_t * data_set, node_t * node, const char *reason);
317 
318 node_t *pe_create_node(const char *id, const char *uname, const char *type,
319  const char *score, pe_working_set_t * data_set);
320 bool remote_id_conflict(const char *remote_name, pe_working_set_t *data);
321 void common_print(resource_t * rsc, const char *pre_text, const char *name, node_t *node, long options, void *print_data);
322 resource_t *find_container_child(const char *stem, resource_t * rsc, node_t *node);
324 const char *container_fix_remote_addr_in(resource_t *rsc, xmlNode *xml, const char *field);
325 const char *pe_node_attribute_calculated(pe_node_t *node, const char *name, resource_t *rsc);
326 const char *pe_node_attribute_raw(pe_node_t *node, const char *name);
327 
328 #endif
bool remote_id_conflict(const char *remote_name, pe_working_set_t *data)
Definition: unpack.c:418
void verify_pe_options(GHashTable *options)
Definition: common.c:184
void container_free(resource_t *rsc)
Definition: container.c:1399
void clone_print(resource_t *rsc, const char *pre_text, long options, void *print_data)
Definition: clone.c:383
action_t * pre_done
Definition: internal.h:42
void group_free(resource_t *rsc)
Definition: group.c:195
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:1690
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:43
GListPtr node_list_dup(GListPtr list, gboolean reset, gboolean filter)
Definition: utils.c:199
GHashTable * allowed_nodes
Definition: internal.h:53
action_t * post
Definition: internal.h:41
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:356
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:755
enum action_tasks get_complex_task(resource_t *rsc, const char *name, gboolean allow_non_atomic)
Definition: utils.c:1361
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:2139
GListPtr slave
Definition: internal.h:52
char * native_parameter(resource_t *rsc, node_t *node, gboolean create, const char *name, pe_working_set_t *data_set)
Definition: native.c:242
GListPtr find_actions_exact(GListPtr input, const char *key, node_t *on_node)
Definition: utils.c:1455
GHashTable * keys
Definition: internal.h:36
GListPtr find_actions(GListPtr input, const char *key, const node_t *on_node)
Definition: utils.c:1415
gboolean common_unpack(xmlNode *xml_obj, resource_t **rsc, resource_t *parent, pe_working_set_t *data_set)
Definition: complex.c:465
void common_update_score(resource_t *rsc, const char *id, int score)
Definition: complex.c:858
void common_free(resource_t *rsc)
Definition: complex.c:911
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:2291
void print_node(const char *pre_text, node_t *node, gboolean details)
Definition: utils.c:1240
gint sort_op_by_callid(gconstpointer a, gconstpointer b)
Definition: utils.c:1560
time_t get_effective_time(pe_working_set_t *data_set)
Definition: utils.c:1675
GListPtr node_list_and(GListPtr list1, GListPtr list2, gboolean filter)
gboolean master_active(resource_t *rsc, gboolean all)
xmlNode * params_restart
Definition: internal.h:290
void set_bit_recursive(resource_t *rsc, unsigned long long flag)
Definition: utils.c:2105
action_t * get_pseudo_op(const char *name, pe_working_set_t *data_set)
Definition: utils.c:1778
int get_target_rc(xmlNode *xml_op)
Definition: unpack.c:2972
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:727
void print_rscs_brief(GListPtr rsc_list, const char *pre_text, long options, void *print_data, gboolean print_all)
Definition: native.c:883
GListPtr find_recurring_actions(GListPtr input, node_t *not_on_node)
Definition: utils.c:1327
void clone_free(resource_t *rsc)
Definition: clone.c:585
enum rsc_role_e group_resource_state(const resource_t *rsc, gboolean current)
Definition: group.c:218
pe_action_flags
Definition: status.h:230
char * id
Definition: status.h:257
gboolean container_unpack(resource_t *rsc, pe_working_set_t *data_set)
Definition: container.c:829
char uname[MAX_NAME]
Definition: internal.h:53
resource_t * find_container_child(const char *stem, resource_t *rsc, node_t *node)
Definition: container.c:1168
void pe_action_set_reason(pe_action_t *action, const char *reason, bool overwrite)
Definition: utils.c:2351
void master_free(resource_t *rsc)
GListPtr stop
Definition: internal.h:48
void native_add_running(resource_t *rsc, node_t *node, pe_working_set_t *data_set)
Definition: native.c:32
void append_hashtable(gpointer key, gpointer value, gpointer user_data)
char * digest_all_calc
Definition: internal.h:291
char * clone_strip(const char *last_rsc_id)
Definition: unpack.c:1609
pe_working_set_t * pe_dataset
Definition: utils.c:31
enum rsc_digest_cmp_val rc
Definition: internal.h:287
action_t * find_first_action(GListPtr input, const char *uuid, const char *task, node_t *on_node)
Definition: utils.c:1385
GListPtr master
Definition: internal.h:51
char * digest_secure_calc
Definition: internal.h:292
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:791
gboolean add_tag_ref(GHashTable *tags, const char *tag_name, const char *obj_ref)
Definition: utils.c:2255
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:751
void group_print(resource_t *rsc, const char *pre_text, long options, void *print_data)
Definition: group.c:146
xmlNode * find_rsc_op_entry(resource_t *rsc, const char *key)
Definition: utils.c:1234
gboolean native_active(resource_t *rsc, gboolean all)
Definition: native.c:285
GHashTable * node_hash_dup(GHashTable *hash)
node_t * native_location(resource_t *rsc, GListPtr *list, gboolean current)
Definition: native.c:763
GListPtr node_list_from_hash(GHashTable *hash, gboolean reset, gboolean filter)
xmlNode * params_all
Definition: internal.h:288
GListPtr active
Definition: internal.h:45
enum rsc_role_e clone_resource_state(const resource_t *rsc, gboolean current)
Definition: clone.c:620
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:479
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:415
GHashTable * node_hash_from_list(GListPtr list)
Definition: utils.c:183
gboolean clone_active(resource_t *rsc, gboolean all)
Definition: clone.c:250
void add_hash_param(GHashTable *hash, const char *name, const char *value)
Definition: common.c:423
GListPtr demote
Definition: internal.h:49
void resource_location(resource_t *rsc, node_t *node, int score, const char *tag, pe_working_set_t *data_set)
Definition: utils.c:1516
int pe_get_configured_timeout(resource_t *rsc, const char *action, pe_working_set_t *data_set)
Definition: utils.c:845
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:1807
gboolean group_active(resource_t *rsc, gboolean all)
Definition: group.c:101
enum rsc_role_e container_resource_state(const resource_t *rsc, gboolean current)
Definition: container.c:1432
char * clone_zero(const char *last_rsc_id)
Definition: unpack.c:1631
GListPtr inactive
Definition: internal.h:46
xmlNode * params_secure
Definition: internal.h:289
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:40
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:1299
rsc_role_e
Definition: common.h:81
gboolean container_active(resource_t *rsc, gboolean all)
Definition: container.c:1129
void native_free(resource_t *rsc)
Definition: native.c:744
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:127
void pe_free_action(action_t *action)
Definition: utils.c:1300
void clear_bit_recursive(resource_t *rsc, unsigned long long flag)
Definition: utils.c:2092
void destroy_ticket(gpointer data)
Definition: utils.c:1795
void pe_free_shallow(GListPtr alist)
Definition: status.h:174
GListPtr promote
Definition: internal.h:50
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:1284
GListPtr start
Definition: internal.h:47
gboolean order_actions(action_t *lh_action, action_t *rh_action, enum pe_ordering order)
Definition: utils.c:1726
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:1980
const char * action
Definition: internal.h:38
pe_fc_flags_e
Definition: internal.h:118
resource_t * find_clone_instance(resource_t *rsc, const char *sub_id, pe_working_set_t *data_set)
Definition: clone.c:66
gboolean group_unpack(resource_t *rsc, pe_working_set_t *data_set)
Definition: group.c:31
gint sort_node_uname(gconstpointer a, gconstpointer b)
Definition: utils.c:225
const char * pe_base_name_end(const char *id)
Definition: unpack.c:1569
GList * GListPtr
Definition: crm.h:218
bool is_set_recursive(resource_t *rsc, long long flag, bool any)
Definition: clone.c:352
char * digest_restart_calc
Definition: internal.h:293
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:2221
resource_t * native_find_rsc(resource_t *rsc, const char *id, node_t *node, int flags)
Definition: native.c:188
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:274
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:153
gboolean master_unpack(resource_t *rsc, pe_working_set_t *data_set)
Definition: clone.c:135