pacemaker  2.0.2-debe490
Scalable High-Availability cluster resource manager
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
pcmk_sched_group.c
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 General Public License version 2
5  * or later (GPLv2+) WITHOUT ANY WARRANTY.
6  */
7 
8 #include <crm_internal.h>
9 
10 #include <crm/msg_xml.h>
11 
12 #include <pacemaker-internal.h>
13 
14 #define VARIANT_GROUP 1
15 #include <lib/pengine/variant.h>
16 
17 node_t *
18 group_color(resource_t * rsc, node_t * prefer, pe_working_set_t * data_set)
19 {
20  node_t *node = NULL;
21  node_t *group_node = NULL;
22  GListPtr gIter = NULL;
23  group_variant_data_t *group_data = NULL;
24 
25  get_group_variant_data(group_data, rsc);
26 
27  if (is_not_set(rsc->flags, pe_rsc_provisional)) {
28  return rsc->allocated_to;
29  }
30  pe_rsc_trace(rsc, "Processing %s", rsc->id);
31  if (is_set(rsc->flags, pe_rsc_allocating)) {
32  pe_rsc_debug(rsc, "Dependency loop detected involving %s", rsc->id);
33  return NULL;
34  }
35 
36  if (group_data->first_child == NULL) {
37  /* nothign to allocate */
39  return NULL;
40  }
41 
43  rsc->role = group_data->first_child->role;
44 
45  group_data->first_child->rsc_cons =
46  g_list_concat(group_data->first_child->rsc_cons, rsc->rsc_cons);
47  rsc->rsc_cons = NULL;
48 
49  group_data->last_child->rsc_cons_lhs =
50  g_list_concat(group_data->last_child->rsc_cons_lhs, rsc->rsc_cons_lhs);
51  rsc->rsc_cons_lhs = NULL;
52 
53  dump_node_scores(show_scores ? 0 : scores_log_level, rsc, __FUNCTION__,
54  rsc->allowed_nodes);
55 
56  gIter = rsc->children;
57  for (; gIter != NULL; gIter = gIter->next) {
58  resource_t *child_rsc = (resource_t *) gIter->data;
59 
60  node = child_rsc->cmds->allocate(child_rsc, prefer, data_set);
61  if (group_node == NULL) {
62  group_node = node;
63  }
64  }
65 
66  rsc->next_role = group_data->first_child->next_role;
69 
70  if (group_data->colocated) {
71  return group_node;
72  }
73  return NULL;
74 }
75 
76 void group_update_pseudo_status(resource_t * parent, resource_t * child);
77 
78 void
80 {
81  action_t *op = NULL;
82  const char *value = NULL;
83  GListPtr gIter = rsc->children;
84 
85  pe_rsc_trace(rsc, "Creating actions for %s", rsc->id);
86 
87  for (; gIter != NULL; gIter = gIter->next) {
88  resource_t *child_rsc = (resource_t *) gIter->data;
89 
90  child_rsc->cmds->create_actions(child_rsc, data_set);
91  group_update_pseudo_status(rsc, child_rsc);
92  }
93 
94  op = start_action(rsc, NULL, TRUE /* !group_data->child_starting */ );
96 
97  op = custom_action(rsc, started_key(rsc),
98  RSC_STARTED, NULL, TRUE /* !group_data->child_starting */ , TRUE, data_set);
100 
101  op = stop_action(rsc, NULL, TRUE /* !group_data->child_stopping */ );
103 
104  op = custom_action(rsc, stopped_key(rsc),
105  RSC_STOPPED, NULL, TRUE /* !group_data->child_stopping */ , TRUE, data_set);
107 
108  value = g_hash_table_lookup(rsc->meta, XML_RSC_ATTR_PROMOTABLE);
109  if (crm_is_true(value)) {
110  op = custom_action(rsc, demote_key(rsc), RSC_DEMOTE, NULL, TRUE, TRUE, data_set);
113  op = custom_action(rsc, demoted_key(rsc), RSC_DEMOTED, NULL, TRUE, TRUE, data_set);
116 
117  op = custom_action(rsc, promote_key(rsc), RSC_PROMOTE, NULL, TRUE, TRUE, data_set);
120  op = custom_action(rsc, promoted_key(rsc), RSC_PROMOTED, NULL, TRUE, TRUE, data_set);
123  }
124 }
125 
126 void
128 {
129  GListPtr gIter = child->actions;
130  group_variant_data_t *group_data = NULL;
131 
132  get_group_variant_data(group_data, parent);
133 
134  if (group_data->ordered == FALSE) {
135  /* If this group is not ordered, then leave the meta-actions as optional */
136  return;
137  }
138 
139  if (group_data->child_stopping && group_data->child_starting) {
140  return;
141  }
142 
143  for (; gIter != NULL; gIter = gIter->next) {
144  action_t *action = (action_t *) gIter->data;
145 
146  if (is_set(action->flags, pe_action_optional)) {
147  continue;
148  }
149  if (safe_str_eq(RSC_STOP, action->task) && is_set(action->flags, pe_action_runnable)) {
150  group_data->child_stopping = TRUE;
151  pe_rsc_trace(action->rsc, "Based on %s the group is stopping", action->uuid);
152 
153  } else if (safe_str_eq(RSC_START, action->task)
154  && is_set(action->flags, pe_action_runnable)) {
155  group_data->child_starting = TRUE;
156  pe_rsc_trace(action->rsc, "Based on %s the group is starting", action->uuid);
157  }
158  }
159 }
160 
161 void
163 {
164  GListPtr gIter = rsc->children;
165  resource_t *last_rsc = NULL;
166  resource_t *last_active = NULL;
167  resource_t *top = uber_parent(rsc);
168  group_variant_data_t *group_data = NULL;
169 
170  get_group_variant_data(group_data, rsc);
171 
172  new_rsc_order(rsc, RSC_STOPPED, rsc, RSC_START, pe_order_optional, data_set);
175 
176  for (; gIter != NULL; gIter = gIter->next) {
177  resource_t *child_rsc = (resource_t *) gIter->data;
178  int stop = pe_order_none;
179  int stopped = pe_order_implies_then_printed;
181  int started =
183 
184  child_rsc->cmds->internal_constraints(child_rsc, data_set);
185 
186  if (last_rsc == NULL) {
187  if (group_data->ordered) {
188  stop |= pe_order_optional;
189  stopped = pe_order_implies_then;
190  }
191 
192  } else if (group_data->colocated) {
193  rsc_colocation_new("group:internal_colocation", NULL, INFINITY,
194  child_rsc, last_rsc, NULL, NULL, data_set);
195  }
196 
197  if (is_set(top->flags, pe_rsc_promotable)) {
198  new_rsc_order(rsc, RSC_DEMOTE, child_rsc, RSC_DEMOTE,
199  stop | pe_order_implies_first_printed, data_set);
200 
201  new_rsc_order(child_rsc, RSC_DEMOTE, rsc, RSC_DEMOTED, stopped, data_set);
202 
203  new_rsc_order(child_rsc, RSC_PROMOTE, rsc, RSC_PROMOTED, started, data_set);
204 
205  new_rsc_order(rsc, RSC_PROMOTE, child_rsc, RSC_PROMOTE,
207 
208  }
209 
211  order_stop_stop(rsc, child_rsc, stop | pe_order_implies_first_printed);
212 
213  new_rsc_order(child_rsc, RSC_STOP, rsc, RSC_STOPPED, stopped, data_set);
214 
215  new_rsc_order(child_rsc, RSC_START, rsc, RSC_STARTED, started, data_set);
216 
217  if (group_data->ordered == FALSE) {
218  order_start_start(rsc, child_rsc, start | pe_order_implies_first_printed);
219  if (is_set(top->flags, pe_rsc_promotable)) {
220  new_rsc_order(rsc, RSC_PROMOTE, child_rsc, RSC_PROMOTE,
221  start | pe_order_implies_first_printed, data_set);
222  }
223 
224  } else if (last_rsc != NULL) {
225  child_rsc->restart_type = pe_restart_restart;
226 
227  order_start_start(last_rsc, child_rsc, start);
228  order_stop_stop(child_rsc, last_rsc, pe_order_optional | pe_order_restart);
229 
230  if (is_set(top->flags, pe_rsc_promotable)) {
231  new_rsc_order(last_rsc, RSC_PROMOTE, child_rsc, RSC_PROMOTE, start, data_set);
232  new_rsc_order(child_rsc, RSC_DEMOTE, last_rsc, RSC_DEMOTE, pe_order_optional,
233  data_set);
234  }
235 
236  } else {
237  /* If anyone in the group is starting, then
238  * pe_order_implies_then will cause _everyone_ in the group
239  * to be sent a start action
240  * But this is safe since starting something that is already
241  * started is required to be "safe"
242  */
243  int flags = pe_order_none;
244 
245  order_start_start(rsc, child_rsc, flags);
246  if (is_set(top->flags, pe_rsc_promotable)) {
247  new_rsc_order(rsc, RSC_PROMOTE, child_rsc, RSC_PROMOTE, flags, data_set);
248  }
249 
250  }
251 
252  /* Look for partially active groups
253  * Make sure they still shut down in sequence
254  */
255  if (child_rsc->running_on) {
256  if (group_data->ordered
257  && last_rsc
258  && last_rsc->running_on == NULL && last_active && last_active->running_on) {
259  order_stop_stop(child_rsc, last_active, pe_order_optional);
260  }
261  last_active = child_rsc;
262  }
263 
264  last_rsc = child_rsc;
265  }
266 
267  if (group_data->ordered && last_rsc != NULL) {
268  int stop_stop_flags = pe_order_implies_then;
269  int stop_stopped_flags = pe_order_optional;
270 
271  order_stop_stop(rsc, last_rsc, stop_stop_flags);
272  new_rsc_order(last_rsc, RSC_STOP, rsc, RSC_STOPPED, stop_stopped_flags, data_set);
273 
274  if (is_set(top->flags, pe_rsc_promotable)) {
275  new_rsc_order(rsc, RSC_DEMOTE, last_rsc, RSC_DEMOTE, stop_stop_flags, data_set);
276  new_rsc_order(last_rsc, RSC_DEMOTE, rsc, RSC_DEMOTED, stop_stopped_flags, data_set);
277  }
278  }
279 }
280 
281 void
283  rsc_colocation_t *constraint,
284  pe_working_set_t *data_set)
285 {
286  GListPtr gIter = NULL;
287  group_variant_data_t *group_data = NULL;
288 
289  if (rsc_lh == NULL) {
290  pe_err("rsc_lh was NULL for %s", constraint->id);
291  return;
292 
293  } else if (rsc_rh == NULL) {
294  pe_err("rsc_rh was NULL for %s", constraint->id);
295  return;
296  }
297 
298  gIter = rsc_lh->children;
299  pe_rsc_trace(rsc_lh, "Processing constraints from %s", rsc_lh->id);
300 
301  get_group_variant_data(group_data, rsc_lh);
302 
303  if (group_data->colocated) {
304  group_data->first_child->cmds->rsc_colocation_lh(group_data->first_child,
305  rsc_rh, constraint,
306  data_set);
307  return;
308 
309  } else if (constraint->score >= INFINITY) {
310  crm_config_err("%s: Cannot perform mandatory colocation"
311  " between non-colocated group and %s", rsc_lh->id, rsc_rh->id);
312  return;
313  }
314 
315  for (; gIter != NULL; gIter = gIter->next) {
316  resource_t *child_rsc = (resource_t *) gIter->data;
317 
318  child_rsc->cmds->rsc_colocation_lh(child_rsc, rsc_rh, constraint,
319  data_set);
320  }
321 }
322 
323 void
325  rsc_colocation_t *constraint,
326  pe_working_set_t *data_set)
327 {
328  GListPtr gIter = rsc_rh->children;
329  group_variant_data_t *group_data = NULL;
330 
331  get_group_variant_data(group_data, rsc_rh);
332  CRM_CHECK(rsc_lh->variant == pe_native, return);
333 
334  pe_rsc_trace(rsc_rh, "Processing RH of constraint %s", constraint->id);
335  print_resource(LOG_TRACE, "LHS", rsc_lh, TRUE);
336 
337  if (is_set(rsc_rh->flags, pe_rsc_provisional)) {
338  return;
339 
340  } else if (group_data->colocated && group_data->first_child) {
341  if (constraint->score >= INFINITY) {
342  /* Ensure RHS is _fully_ up before can start LHS */
343  group_data->last_child->cmds->rsc_colocation_rh(rsc_lh,
344  group_data->last_child,
345  constraint,
346  data_set);
347  } else {
348  /* A partially active RHS is fine */
349  group_data->first_child->cmds->rsc_colocation_rh(rsc_lh,
350  group_data->first_child,
351  constraint,
352  data_set);
353  }
354 
355  return;
356 
357  } else if (constraint->score >= INFINITY) {
358  crm_config_err("%s: Cannot perform mandatory colocation with"
359  " non-colocated group: %s", rsc_lh->id, rsc_rh->id);
360  return;
361  }
362 
363  for (; gIter != NULL; gIter = gIter->next) {
364  resource_t *child_rsc = (resource_t *) gIter->data;
365 
366  child_rsc->cmds->rsc_colocation_rh(rsc_lh, child_rsc, constraint,
367  data_set);
368  }
369 }
370 
371 enum pe_action_flags
373 {
374  GListPtr gIter = NULL;
376 
377  for (gIter = action->rsc->children; gIter != NULL; gIter = gIter->next) {
378  resource_t *child = (resource_t *) gIter->data;
379  enum action_tasks task = get_complex_task(child, action->task, TRUE);
380  const char *task_s = task2text(task);
381  action_t *child_action = find_first_action(child->actions, NULL, task_s, node);
382 
383  if (child_action) {
384  enum pe_action_flags child_flags = child->cmds->action_flags(child_action, node);
385 
386  if (is_set(flags, pe_action_optional)
387  && is_set(child_flags, pe_action_optional) == FALSE) {
388  pe_rsc_trace(action->rsc, "%s is mandatory because of %s", action->uuid,
389  child_action->uuid);
392  }
393  if (safe_str_neq(task_s, action->task)
394  && is_set(flags, pe_action_runnable)
395  && is_set(child_flags, pe_action_runnable) == FALSE) {
396  pe_rsc_trace(action->rsc, "%s is not runnable because of %s", action->uuid,
397  child_action->uuid);
400  }
401 
402  } else if (task != stop_rsc && task != action_demote) {
403  pe_rsc_trace(action->rsc, "%s is not runnable because of %s (not found in %s)",
404  action->uuid, task_s, child->id);
406  }
407  }
408 
409  return flags;
410 }
411 
412 enum pe_graph_flags
414  enum pe_action_flags flags, enum pe_action_flags filter,
415  enum pe_ordering type, pe_working_set_t *data_set)
416 {
417  GListPtr gIter = then->rsc->children;
418  enum pe_graph_flags changed = pe_graph_none;
419 
420  CRM_ASSERT(then->rsc != NULL);
421  changed |= native_update_actions(first, then, node, flags, filter, type,
422  data_set);
423 
424  for (; gIter != NULL; gIter = gIter->next) {
425  resource_t *child = (resource_t *) gIter->data;
426  action_t *child_action = find_first_action(child->actions, NULL, then->task, node);
427 
428  if (child_action) {
429  changed |= child->cmds->update_actions(first, child_action, node,
430  flags, filter, type,
431  data_set);
432  }
433  }
434 
435  return changed;
436 }
437 
438 void
440 {
441  GListPtr gIter = rsc->children;
442  GListPtr saved = constraint->node_list_rh;
443  GListPtr zero = node_list_dup(constraint->node_list_rh, TRUE, FALSE);
444  gboolean reset_scores = TRUE;
445  group_variant_data_t *group_data = NULL;
446 
447  get_group_variant_data(group_data, rsc);
448 
449  pe_rsc_debug(rsc, "Processing rsc_location %s for %s", constraint->id, rsc->id);
450 
451  native_rsc_location(rsc, constraint);
452 
453  for (; gIter != NULL; gIter = gIter->next) {
454  resource_t *child_rsc = (resource_t *) gIter->data;
455 
456  child_rsc->cmds->rsc_location(child_rsc, constraint);
457  if (group_data->colocated && reset_scores) {
458  reset_scores = FALSE;
459  constraint->node_list_rh = zero;
460  }
461  }
462 
463  constraint->node_list_rh = saved;
464  g_list_free_full(zero, free);
465 }
466 
467 void
469 {
470  CRM_CHECK(rsc != NULL, return);
471 
472  pe_rsc_trace(rsc, "Processing actions from %s", rsc->id);
473  native_expand(rsc, data_set);
474 
475  for (GListPtr gIter = rsc->children; gIter != NULL; gIter = gIter->next) {
476  resource_t *child_rsc = (resource_t *) gIter->data;
477 
478  child_rsc->cmds->expand(child_rsc, data_set);
479  }
480 }
481 
482 GHashTable *
483 group_merge_weights(resource_t * rsc, const char *rhs, GHashTable * nodes, const char *attr,
484  float factor, enum pe_weights flags)
485 {
486  GListPtr gIter = rsc->rsc_cons_lhs;
487  group_variant_data_t *group_data = NULL;
488 
489  get_group_variant_data(group_data, rsc);
490 
491  if (is_set(rsc->flags, pe_rsc_merging)) {
492  pe_rsc_info(rsc, "Breaking dependency loop with %s at %s", rsc->id, rhs);
493  return nodes;
494  }
495 
497 
498  nodes =
499  group_data->first_child->cmds->merge_weights(group_data->first_child, rhs, nodes, attr,
500  factor, flags);
501 
502  for (; gIter != NULL; gIter = gIter->next) {
503  rsc_colocation_t *constraint = (rsc_colocation_t *) gIter->data;
504 
505  nodes = native_merge_weights(constraint->rsc_lh, rsc->id, nodes,
506  constraint->node_attribute,
507  (float)constraint->score / INFINITY, flags);
508  }
509 
511  return nodes;
512 }
513 
514 void
515 group_append_meta(resource_t * rsc, xmlNode * xml)
516 {
517 }
#define LOG_TRACE
Definition: logging.h:26
#define CRM_CHECK(expr, failure_action)
Definition: logging.h:156
node_t * group_color(resource_t *rsc, node_t *preferred, pe_working_set_t *data_set)
void group_internal_constraints(resource_t *rsc, pe_working_set_t *data_set)
const char * task2text(enum action_tasks task)
Definition: common.c:276
#define RSC_STOP
Definition: crm.h:177
enum pe_action_flags(* action_flags)(action_t *, node_t *)
void native_expand(resource_t *rsc, pe_working_set_t *data_set)
#define pe_rsc_debug(rsc, fmt, args...)
Definition: internal.h:17
gboolean safe_str_neq(const char *a, const char *b)
Definition: strings.c:157
#define INFINITY
Definition: crm.h:73
#define demoted_key(rsc)
Definition: internal.h:240
void group_update_pseudo_status(resource_t *parent, resource_t *child)
GListPtr node_list_dup(GListPtr list, gboolean reset, gboolean filter)
Definition: utils.c:191
#define stop_action(rsc, node, optional)
Definition: internal.h:210
void group_expand(resource_t *rsc, pe_working_set_t *data_set)
void(* expand)(resource_t *, pe_working_set_t *)
enum rsc_role_e role
Definition: pe_types.h:333
#define stopped_key(rsc)
Definition: internal.h:204
resource_alloc_functions_t * cmds
Definition: pe_types.h:296
#define crm_config_err(fmt...)
Definition: crm_internal.h:179
enum action_tasks get_complex_task(resource_t *rsc, const char *name, gboolean allow_non_atomic)
Definition: utils.c:1374
pe_resource_t * rsc
Definition: pe_types.h:365
enum rsc_role_e next_role
Definition: pe_types.h:334
GHashTable * meta
Definition: pe_types.h:336
void(* rsc_colocation_lh)(pe_resource_t *, pe_resource_t *, rsc_colocation_t *, pe_working_set_t *)
enum pe_graph_flags(* update_actions)(pe_action_t *, pe_action_t *, pe_node_t *, enum pe_action_flags, enum pe_action_flags, enum pe_ordering, pe_working_set_t *data_set)
void group_rsc_location(pe_resource_t *rsc, pe__location_t *constraint)
void(* create_actions)(resource_t *, pe_working_set_t *)
enum pe_graph_flags native_update_actions(pe_action_t *first, pe_action_t *then, pe_node_t *node, enum pe_action_flags flags, enum pe_action_flags filter, enum pe_ordering type, pe_working_set_t *data_set)
#define demote_key(rsc)
Definition: internal.h:235
#define clear_bit(word, bit)
Definition: crm_internal.h:168
void native_rsc_location(pe_resource_t *rsc, pe__location_t *constraint)
GListPtr rsc_cons
Definition: pe_types.h:320
gboolean show_scores
#define RSC_START
Definition: crm.h:174
pe_node_t * allocated_to
Definition: pe_types.h:326
void(* rsc_colocation_rh)(pe_resource_t *, pe_resource_t *, rsc_colocation_t *, pe_working_set_t *)
void group_rsc_colocation_lh(pe_resource_t *lh_rsc, pe_resource_t *rh_rsc, rsc_colocation_t *constraint, pe_working_set_t *data_set)
#define pe_rsc_provisional
Definition: pe_types.h:227
#define XML_RSC_ATTR_PROMOTABLE
Definition: msg_xml.h:190
gboolean rsc_colocation_new(const char *id, const char *node_attr, int score, resource_t *rsc_lh, resource_t *rsc_rh, const char *state_lh, const char *state_rh, pe_working_set_t *data_set)
GHashTable * group_merge_weights(resource_t *rsc, const char *rhs, GHashTable *nodes, const char *attr, float factor, enum pe_weights flags)
#define pe_rsc_merging
Definition: pe_types.h:229
#define set_bit(word, bit)
Definition: crm_internal.h:167
pe_action_flags
Definition: pe_types.h:258
#define order_stop_stop(rsc1, rsc2, type)
pe_resource_t * uber_parent(pe_resource_t *rsc)
Definition: complex.c:746
const char * node_attribute
enum pe_graph_flags group_update_actions(pe_action_t *first, pe_action_t *then, pe_node_t *node, enum pe_action_flags flags, enum pe_action_flags filter, enum pe_ordering type, pe_working_set_t *data_set)
char * task
Definition: pe_types.h:369
void group_rsc_colocation_rh(pe_resource_t *lh_rsc, pe_resource_t *rh_rsc, rsc_colocation_t *constraint, pe_working_set_t *data_set)
action_t * find_first_action(GListPtr input, const char *uuid, const char *task, node_t *on_node)
Definition: utils.c:1398
#define promote_key(rsc)
Definition: internal.h:225
GListPtr running_on
Definition: pe_types.h:329
unsigned long long flags
Definition: pe_types.h:311
#define pe_rsc_promotable
Definition: pe_types.h:225
enum pe_restart restart_type
Definition: pe_types.h:301
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
#define started_key(rsc)
Definition: internal.h:220
pe_graph_flags
Definition: pe_types.h:250
GListPtr rsc_cons_lhs
Definition: pe_types.h:319
char * uuid
Definition: pe_types.h:370
#define pe_rsc_allocating
Definition: pe_types.h:228
enum pe_obj_types variant
Definition: pe_types.h:293
#define RSC_DEMOTED
Definition: crm.h:183
GListPtr actions
Definition: pe_types.h:322
void(* rsc_location)(pe_resource_t *, pe__location_t *)
enum pe_action_flags group_action_flags(action_t *action, node_t *node)
int scores_log_level
#define promoted_key(rsc)
Definition: internal.h:230
#define RSC_STARTED
Definition: crm.h:175
resource_t * rsc_lh
GListPtr children
Definition: pe_types.h:340
void(* internal_constraints)(resource_t *, pe_working_set_t *)
#define start_action(rsc, node, optional)
Definition: internal.h:216
#define CRM_ASSERT(expr)
Definition: results.h:42
#define RSC_PROMOTE
Definition: crm.h:180
void group_create_actions(resource_t *rsc, pe_working_set_t *data_set)
#define pe_clear_action_bit(action, bit)
Definition: internal.h:25
pe_weights
GHashTable * native_merge_weights(resource_t *rsc, const char *rhs, GHashTable *nodes, const char *attr, float factor, enum pe_weights flags)
enum pe_action_flags flags
Definition: pe_types.h:374
void group_append_meta(resource_t *rsc, xmlNode *xml)
#define order_start_start(rsc1, rsc2, type)
#define RSC_STOPPED
Definition: crm.h:178
const char * id
#define RSC_PROMOTED
Definition: crm.h:181
gboolean crm_is_true(const char *s)
Definition: strings.c:172
#define pe_rsc_trace(rsc, fmt, args...)
Definition: internal.h:18
#define pe_err(fmt...)
Definition: internal.h:20
#define dump_node_scores(level, rsc, text, nodes)
Definition: internal.h:186
void print_resource(int log_level, const char *pre_text, resource_t *rsc, gboolean details)
Definition: utils.c:1297
#define safe_str_eq(a, b)
Definition: util.h:59
node_t *(* allocate)(resource_t *, node_t *, pe_working_set_t *)
GList * GListPtr
Definition: crm.h:192
pe_ordering
Definition: pe_types.h:437
uint64_t flags
Definition: remote.c:148
action_tasks
Definition: common.h:57
enum crm_ais_msg_types type
Definition: internal.h:85
#define RSC_DEMOTE
Definition: crm.h:182
#define pe_rsc_info(rsc, fmt, args...)
Definition: internal.h:16
char * id
Definition: pe_types.h:284
GHashTable * allowed_nodes
Definition: pe_types.h:331
int new_rsc_order(resource_t *lh_rsc, const char *lh_task, resource_t *rh_rsc, const char *rh_task, enum pe_ordering type, pe_working_set_t *data_set)