pacemaker  2.1.5-b7adf64e51
Scalable High-Availability cluster resource manager
libpacemaker_private.h
Go to the documentation of this file.
1 /*
2  * Copyright 2021-2022 the Pacemaker project contributors
3  *
4  * The version control history for this file may have further details.
5  *
6  * This source code is licensed under the GNU Lesser General Public License
7  * version 2.1 or later (LGPLv2.1+) WITHOUT ANY WARRANTY.
8  */
9 
10 #ifndef PCMK__LIBPACEMAKER_PRIVATE__H
11 # define PCMK__LIBPACEMAKER_PRIVATE__H
12 
13 /* This header is for the sole use of libpacemaker, so that functions can be
14  * declared with G_GNUC_INTERNAL for efficiency.
15  */
16 
17 #include <crm/pengine/pe_types.h> // pe_action_t, pe_node_t, pe_working_set_t
18 
19 // Flags to modify the behavior of pcmk__add_colocated_node_scores()
21  // With no other flags, apply all "with this" colocations
23 
24  // Apply "this with" colocations instead of "with this" colocations
26 
27  // Apply only colocations with non-negative scores
29 
30  // Apply only colocations with at least one matching node
32 };
33 
34 // Flags the update_ordered_actions() method can return
36  pcmk__updated_none = 0, // Nothing changed
37  pcmk__updated_first = (1 << 0), // First action was updated
38  pcmk__updated_then = (1 << 1), // Then action was updated
39 };
40 
41 #define pcmk__set_updated_flags(au_flags, action, flags_to_set) do { \
42  au_flags = pcmk__set_flags_as(__func__, __LINE__, \
43  LOG_TRACE, "Action update", \
44  (action)->uuid, au_flags, \
45  (flags_to_set), #flags_to_set); \
46  } while (0)
47 
48 #define pcmk__clear_updated_flags(au_flags, action, flags_to_clear) do { \
49  au_flags = pcmk__clear_flags_as(__func__, __LINE__, \
50  LOG_TRACE, "Action update", \
51  (action)->uuid, au_flags, \
52  (flags_to_clear), #flags_to_clear); \
53  } while (0)
54 
55 // Resource allocation methods
66  pe_node_t *(*assign)(pe_resource_t *rsc, const pe_node_t *prefer);
67 
75 
85  bool (*create_probe)(pe_resource_t *rsc, pe_node_t *node);
86 
94 
108  void (*apply_coloc_score) (pe_resource_t *dependent,
109  const pe_resource_t *primary,
110  const pcmk__colocation_t *colocation,
111  bool for_dependent);
112 
130  GList *(*colocated_resources)(pe_resource_t *rsc, pe_resource_t *orig_rsc,
131  GList *colocated_rscs);
132 
140  void (*apply_location)(pe_resource_t *rsc, pe__location_t *location);
141 
155  const pe_node_t *node);
156 
179  uint32_t (*update_ordered_actions)(pe_action_t *first, pe_action_t *then,
180  const pe_node_t *node, uint32_t flags,
181  uint32_t filter, uint32_t type,
183 
185 
193 
204  void (*add_graph_meta)(pe_resource_t *rsc, xmlNode *xml);
205 
221  void (*add_utilization)(const pe_resource_t *rsc,
222  const pe_resource_t *orig_rsc, GList *all_rscs,
223  GHashTable *utilization);
224 
232 };
233 
234 // Actions (pcmk_sched_actions.c)
235 
236 G_GNUC_INTERNAL
239 
240 G_GNUC_INTERNAL
242  const pe_node_t *node, uint32_t flags,
243  uint32_t filter, uint32_t type,
245 
246 G_GNUC_INTERNAL
247 void pcmk__log_action(const char *pre_text, pe_action_t *action, bool details);
248 
249 G_GNUC_INTERNAL
251  guint interval_ms, const pe_node_t *node);
252 
253 G_GNUC_INTERNAL
255 
256 G_GNUC_INTERNAL
258 
259 G_GNUC_INTERNAL
261 
262 G_GNUC_INTERNAL
264 
265 G_GNUC_INTERNAL
267  xmlNode *xml_op);
268 
269 G_GNUC_INTERNAL
271 
272 
273 // Recurring actions (pcmk_sched_recurring.c)
274 
275 G_GNUC_INTERNAL
277 
278 G_GNUC_INTERNAL
279 void pcmk__schedule_cancel(pe_resource_t *rsc, const char *call_id,
280  const char *task, guint interval_ms,
281  const pe_node_t *node, const char *reason);
282 
283 G_GNUC_INTERNAL
284 void pcmk__reschedule_recurring(pe_resource_t *rsc, const char *task,
285  guint interval_ms, pe_node_t *node);
286 
287 G_GNUC_INTERNAL
289 
290 
291 // Producing transition graphs (pcmk_graph_producer.c)
292 
293 G_GNUC_INTERNAL
296 
297 G_GNUC_INTERNAL
299 
300 G_GNUC_INTERNAL
302 
303 
304 // Fencing (pcmk_sched_fencing.c)
305 
306 G_GNUC_INTERNAL
308 
309 G_GNUC_INTERNAL
311  pe_action_t *action, enum pe_ordering order);
312 
313 G_GNUC_INTERNAL
314 void pcmk__fence_guest(pe_node_t *node);
315 
316 G_GNUC_INTERNAL
317 bool pcmk__node_unfenced(pe_node_t *node);
318 
319 G_GNUC_INTERNAL
320 void pcmk__order_restart_vs_unfence(gpointer data, gpointer user_data);
321 
322 
323 // Injected scheduler inputs (pcmk_sched_injections.c)
324 
326  pcmk_injections_t *injections);
327 
328 
329 // Constraints of any type (pcmk_sched_constraints.c)
330 
331 G_GNUC_INTERNAL
332 pe_resource_t *pcmk__find_constraint_resource(GList *rsc_list, const char *id);
333 
334 G_GNUC_INTERNAL
335 xmlNode *pcmk__expand_tags_in_sets(xmlNode *xml_obj,
337 
338 G_GNUC_INTERNAL
340  pe_resource_t **rsc, pe_tag_t **tag);
341 
342 G_GNUC_INTERNAL
343 bool pcmk__tag_to_set(xmlNode *xml_obj, xmlNode **rsc_set, const char *attr,
344  bool convert_rsc, pe_working_set_t *data_set);
345 
346 G_GNUC_INTERNAL
348 
349 
350 // Location constraints
351 
352 G_GNUC_INTERNAL
353 void pcmk__unpack_location(xmlNode *xml_obj, pe_working_set_t *data_set);
354 
355 G_GNUC_INTERNAL
356 pe__location_t *pcmk__new_location(const char *id, pe_resource_t *rsc,
357  int node_weight, const char *discover_mode,
358  pe_node_t *foo_node,
360 
361 G_GNUC_INTERNAL
363 
364 G_GNUC_INTERNAL
365 void pcmk__apply_location(pe_resource_t *rsc, pe__location_t *constraint);
366 
367 
368 // Colocation constraints (pcmk_sched_colocation.c)
369 
374 };
375 
376 G_GNUC_INTERNAL
378  const pe_resource_t *primary,
379  const pcmk__colocation_t *colocation,
380  bool preview);
381 
382 G_GNUC_INTERNAL
384  const pe_resource_t *primary,
385  const pcmk__colocation_t *colocation);
386 
387 G_GNUC_INTERNAL
389  const pe_resource_t *primary,
390  const pcmk__colocation_t *colocation);
391 
392 G_GNUC_INTERNAL
393 void pcmk__add_colocated_node_scores(pe_resource_t *rsc, const char *log_id,
394  GHashTable **nodes, const char *attr,
395  float factor, uint32_t flags);
396 
397 G_GNUC_INTERNAL
398 void pcmk__unpack_colocation(xmlNode *xml_obj, pe_working_set_t *data_set);
399 
400 G_GNUC_INTERNAL
402 
403 G_GNUC_INTERNAL
405 
406 G_GNUC_INTERNAL
407 void pcmk__new_colocation(const char *id, const char *node_attr, int score,
408  pe_resource_t *dependent, pe_resource_t *primary,
409  const char *dependent_role, const char *primary_role,
410  bool influence, pe_working_set_t *data_set);
411 
412 G_GNUC_INTERNAL
415 
428 static inline bool
429 pcmk__colocation_has_influence(const pcmk__colocation_t *colocation,
430  const pe_resource_t *rsc)
431 {
432  if (rsc == NULL) {
433  rsc = colocation->primary;
434  }
435 
436  /* A bundle replica colocates its remote connection with its container,
437  * using a finite score so that the container can run on Pacemaker Remote
438  * nodes.
439  *
440  * Moving a connection is lightweight and does not interrupt the service,
441  * while moving a container is heavyweight and does interrupt the service,
442  * so don't move a clean, active container based solely on the preferences
443  * of its connection.
444  *
445  * This also avoids problematic scenarios where two containers want to
446  * perpetually swap places.
447  */
449  && !pcmk_is_set(rsc->flags, pe_rsc_failed)
450  && pcmk__list_of_1(rsc->running_on)) {
451  return false;
452  }
453 
454  /* The dependent in a colocation influences the primary's location
455  * if the influence option is true or the primary is not yet active.
456  */
457  return colocation->influence || (rsc->running_on == NULL);
458 }
459 
460 
461 // Ordering constraints (pcmk_sched_ordering.c)
462 
463 G_GNUC_INTERNAL
464 void pcmk__new_ordering(pe_resource_t *first_rsc, char *first_task,
465  pe_action_t *first_action, pe_resource_t *then_rsc,
466  char *then_task, pe_action_t *then_action,
467  uint32_t flags, pe_working_set_t *data_set);
468 
469 G_GNUC_INTERNAL
470 void pcmk__unpack_ordering(xmlNode *xml_obj, pe_working_set_t *data_set);
471 
472 G_GNUC_INTERNAL
474 
475 G_GNUC_INTERNAL
477  pe_action_t *shutdown_op);
478 
479 G_GNUC_INTERNAL
481 
482 G_GNUC_INTERNAL
483 void pcmk__order_after_each(pe_action_t *after, GList *list);
484 
485 
497 #define pcmk__order_resource_actions(first_rsc, first_task, \
498  then_rsc, then_task, flags) \
499  pcmk__new_ordering((first_rsc), \
500  pcmk__op_key((first_rsc)->id, (first_task), 0), \
501  NULL, \
502  (then_rsc), \
503  pcmk__op_key((then_rsc)->id, (then_task), 0), \
504  NULL, (flags), (first_rsc)->cluster)
505 
506 #define pcmk__order_starts(rsc1, rsc2, flags) \
507  pcmk__order_resource_actions((rsc1), CRMD_ACTION_START, \
508  (rsc2), CRMD_ACTION_START, (flags))
509 
510 #define pcmk__order_stops(rsc1, rsc2, flags) \
511  pcmk__order_resource_actions((rsc1), CRMD_ACTION_STOP, \
512  (rsc2), CRMD_ACTION_STOP, (flags))
513 
514 
515 // Ticket constraints (pcmk_sched_tickets.c)
516 
517 G_GNUC_INTERNAL
518 void pcmk__unpack_rsc_ticket(xmlNode *xml_obj, pe_working_set_t *data_set);
519 
520 
521 // Promotable clone resources (pcmk_sched_promotable.c)
522 
523 G_GNUC_INTERNAL
525 
526 G_GNUC_INTERNAL
528 
529 G_GNUC_INTERNAL
531 
532 G_GNUC_INTERNAL
534 
535 G_GNUC_INTERNAL
537 
538 G_GNUC_INTERNAL
540 
541 G_GNUC_INTERNAL
543  pe_resource_t *dependent,
544  const pcmk__colocation_t *colocation);
545 
546 G_GNUC_INTERNAL
548  pe_resource_t *dependent,
549  const pcmk__colocation_t *colocation);
550 
551 
552 // Pacemaker Remote nodes (pcmk_sched_remote.c)
553 
554 G_GNUC_INTERNAL
556 
557 G_GNUC_INTERNAL
559 
560 G_GNUC_INTERNAL
562 
563 G_GNUC_INTERNAL
565 
566 G_GNUC_INTERNAL
567 void pcmk__substitute_remote_addr(pe_resource_t *rsc, GHashTable *params);
568 
569 G_GNUC_INTERNAL
570 void pcmk__add_bundle_meta_to_xml(xmlNode *args_xml, pe_action_t *action);
571 
572 
573 // Primitives (pcmk_sched_primitive.c)
574 
575 G_GNUC_INTERNAL
577 
578 G_GNUC_INTERNAL
580 
581 G_GNUC_INTERNAL
583 
584 G_GNUC_INTERNAL
586  const pe_node_t *node);
587 
588 G_GNUC_INTERNAL
590  const pe_resource_t *primary,
591  const pcmk__colocation_t *colocation,
592  bool for_dependent);
593 
594 G_GNUC_INTERNAL
595 void pcmk__schedule_cleanup(pe_resource_t *rsc, const pe_node_t *node,
596  bool optional);
597 
598 G_GNUC_INTERNAL
599 void pcmk__primitive_add_graph_meta(pe_resource_t *rsc, xmlNode *xml);
600 
601 G_GNUC_INTERNAL
603  const pe_resource_t *orig_rsc,
604  GList *all_rscs, GHashTable *utilization);
605 
606 G_GNUC_INTERNAL
608 
609 
610 // Groups (pcmk_sched_group.c)
611 
612 G_GNUC_INTERNAL
614 
615 G_GNUC_INTERNAL
617 
618 G_GNUC_INTERNAL
620 
621 G_GNUC_INTERNAL
623  const pe_resource_t *primary,
624  const pcmk__colocation_t *colocation,
625  bool for_dependent);
626 
627 G_GNUC_INTERNAL
629 
630 G_GNUC_INTERNAL
632  const pe_node_t *node);
633 
634 G_GNUC_INTERNAL
636  pe_action_t *then,
637  const pe_node_t *node,
638  uint32_t flags, uint32_t filter,
639  uint32_t type,
641 
642 G_GNUC_INTERNAL
644  pe_resource_t *orig_rsc,
645  GList *colocated_rscs);
646 
647 G_GNUC_INTERNAL
649  const pe_resource_t *orig_rsc, GList *all_rscs,
650  GHashTable *utilization);
651 
652 G_GNUC_INTERNAL
654 
655 
656 // Clones (pcmk_sched_clone.c)
657 
658 G_GNUC_INTERNAL
660  const pe_resource_t *primary,
661  const pcmk__colocation_t *colocation,
662  bool for_dependent);
663 
664 // Bundles (pcmk_sched_bundle.c)
665 
666 G_GNUC_INTERNAL
668  const pe_resource_t *primary,
669  const pcmk__colocation_t *colocation,
670  bool for_dependent);
671 
672 G_GNUC_INTERNAL
674 
675 
676 // Injections (pcmk_injections.c)
677 
678 G_GNUC_INTERNAL
679 xmlNode *pcmk__inject_node(cib_t *cib_conn, const char *node, const char *uuid);
680 
681 G_GNUC_INTERNAL
682 xmlNode *pcmk__inject_node_state_change(cib_t *cib_conn, const char *node,
683  bool up);
684 
685 G_GNUC_INTERNAL
686 xmlNode *pcmk__inject_resource_history(pcmk__output_t *out, xmlNode *cib_node,
687  const char *resource,
688  const char *lrm_name,
689  const char *rclass,
690  const char *rtype,
691  const char *rprovider);
692 
693 G_GNUC_INTERNAL
694 void pcmk__inject_failcount(pcmk__output_t *out, xmlNode *cib_node,
695  const char *resource, const char *task,
696  guint interval_ms, int rc);
697 
698 G_GNUC_INTERNAL
699 xmlNode *pcmk__inject_action_result(xmlNode *cib_resource,
700  lrmd_event_data_t *op, int target_rc);
701 
702 
703 // Nodes (pcmk_sched_nodes.c)
704 
705 G_GNUC_INTERNAL
706 bool pcmk__node_available(const pe_node_t *node, bool consider_score,
707  bool consider_guest);
708 
709 G_GNUC_INTERNAL
710 bool pcmk__any_node_available(GHashTable *nodes);
711 
712 G_GNUC_INTERNAL
713 GHashTable *pcmk__copy_node_table(GHashTable *nodes);
714 
715 G_GNUC_INTERNAL
716 GList *pcmk__sort_nodes(GList *nodes, pe_node_t *active_node);
717 
718 G_GNUC_INTERNAL
720 
721 G_GNUC_INTERNAL
723  const pe_node_t *node);
724 
725 
726 // Functions applying to more than one variant (pcmk_sched_resource.c)
727 
728 G_GNUC_INTERNAL
730 
731 G_GNUC_INTERNAL
733  const xmlNode *rsc_entry, bool active_on_node);
734 
735 G_GNUC_INTERNAL
736 GList *pcmk__rscs_matching_id(const char *id, pe_working_set_t *data_set);
737 
738 G_GNUC_INTERNAL
740  GList *colocated_rscs);
741 
742 G_GNUC_INTERNAL
743 void pcmk__noop_add_graph_meta(pe_resource_t *rsc, xmlNode *xml);
744 
745 G_GNUC_INTERNAL
747 
748 G_GNUC_INTERNAL
750  bool force);
751 
752 G_GNUC_INTERNAL
753 bool pcmk__assign_resource(pe_resource_t *rsc, pe_node_t *node, bool force);
754 
755 G_GNUC_INTERNAL
757 
758 G_GNUC_INTERNAL
760  pe_resource_t **failed);
761 
762 G_GNUC_INTERNAL
764 
765 G_GNUC_INTERNAL
766 gint pcmk__cmp_instance(gconstpointer a, gconstpointer b);
767 
768 G_GNUC_INTERNAL
769 gint pcmk__cmp_instance_number(gconstpointer a, gconstpointer b);
770 
771 
772 // Functions related to probes (pcmk_sched_probes.c)
773 
774 G_GNUC_INTERNAL
776 
777 G_GNUC_INTERNAL
779 
780 G_GNUC_INTERNAL
781 bool pcmk__probe_resource_list(GList *rscs, pe_node_t *node);
782 
783 G_GNUC_INTERNAL
785 
786 
787 // Functions related to live migration (pcmk_sched_migration.c)
788 
790  const pe_node_t *current);
791 
792 void pcmk__abort_dangling_migration(void *data, void *user_data);
793 
794 bool pcmk__rsc_can_migrate(const pe_resource_t *rsc, const pe_node_t *current);
795 
797 
798 
799 // Functions related to node utilization (pcmk_sched_utilization.c)
800 
801 G_GNUC_INTERNAL
803  const pe_node_t *node2);
804 
805 G_GNUC_INTERNAL
806 void pcmk__consume_node_capacity(GHashTable *current_utilization,
807  pe_resource_t *rsc);
808 
809 G_GNUC_INTERNAL
810 void pcmk__release_node_capacity(GHashTable *current_utilization,
811  const pe_resource_t *rsc);
812 
813 G_GNUC_INTERNAL
815 
816 G_GNUC_INTERNAL
818  GList *allowed_nodes);
819 
820 G_GNUC_INTERNAL
821 void pcmk__show_node_capacities(const char *desc, pe_working_set_t *data_set);
822 
823 #endif // PCMK__LIBPACEMAKER_PRIVATE__H
G_GNUC_INTERNAL bool pcmk__action_locks_rsc_to_node(const pe_action_t *action)
G_GNUC_INTERNAL void pcmk__primitive_add_graph_meta(pe_resource_t *rsc, xmlNode *xml)
G_GNUC_INTERNAL pe_node_t * pcmk__primitive_assign(pe_resource_t *rsc, const pe_node_t *prefer)
G_GNUC_INTERNAL void pcmk__release_node_capacity(GHashTable *current_utilization, const pe_resource_t *rsc)
G_GNUC_INTERNAL void pcmk__add_rsc_actions_to_graph(pe_resource_t *rsc)
char data[0]
Definition: cpg.c:55
G_GNUC_INTERNAL void pcmk__schedule_cleanup(pe_resource_t *rsc, const pe_node_t *node, bool optional)
G_GNUC_INTERNAL uint32_t pcmk__update_ordered_actions(pe_action_t *first, pe_action_t *then, const pe_node_t *node, uint32_t flags, uint32_t filter, uint32_t type, pe_working_set_t *data_set)
void pcmk__inject_scheduler_input(pe_working_set_t *data_set, cib_t *cib, pcmk_injections_t *injections)
G_GNUC_INTERNAL void pcmk__primitive_apply_coloc_score(pe_resource_t *dependent, const pe_resource_t *primary, const pcmk__colocation_t *colocation, bool for_dependent)
G_GNUC_INTERNAL void pcmk__deduplicate_action_inputs(pe_action_t *action)
pcmk__coloc_affects
G_GNUC_INTERNAL bool pcmk__node_unfenced(pe_node_t *node)
G_GNUC_INTERNAL GList * pcmk__colocated_resources(pe_resource_t *rsc, pe_resource_t *orig_rsc, GList *colocated_rscs)
G_GNUC_INTERNAL void pcmk__show_node_capacities(const char *desc, pe_working_set_t *data_set)
const char * name
Definition: cib.c:24
void(* internal_constraints)(pe_resource_t *rsc)
G_GNUC_INTERNAL bool pcmk__any_node_available(GHashTable *nodes)
G_GNUC_INTERNAL bool pcmk__rsc_corresponds_to_guest(pe_resource_t *rsc, pe_node_t *node)
G_GNUC_INTERNAL void pcmk__set_allocation_methods(pe_working_set_t *data_set)
G_GNUC_INTERNAL xmlNode * pcmk__inject_node_state_change(cib_t *cib_conn, const char *node, bool up)
G_GNUC_INTERNAL bool pcmk__threshold_reached(pe_resource_t *rsc, pe_node_t *node, pe_resource_t **failed)
G_GNUC_INTERNAL bool pcmk__is_failed_remote_node(pe_node_t *node)
G_GNUC_INTERNAL void pcmk__inject_failcount(pcmk__output_t *out, xmlNode *cib_node, const char *resource, const char *task, guint interval_ms, int rc)
G_GNUC_INTERNAL void pcmk__set_instance_roles(pe_resource_t *rsc)
G_GNUC_INTERNAL enum pe_action_flags pcmk__group_action_flags(pe_action_t *action, const pe_node_t *node)
pe_resource_t * dependent
G_GNUC_INTERNAL xmlNode * pcmk__inject_node(cib_t *cib_conn, const char *node, const char *uuid)
G_GNUC_INTERNAL void pcmk__apply_node_health(pe_working_set_t *data_set)
G_GNUC_INTERNAL GList * pcmk__sort_nodes(GList *nodes, pe_node_t *active_node)
G_GNUC_INTERNAL void pcmk__disable_invalid_orderings(pe_working_set_t *data_set)
G_GNUC_INTERNAL void pcmk__group_apply_coloc_score(pe_resource_t *dependent, const pe_resource_t *primary, const pcmk__colocation_t *colocation, bool for_dependent)
bool pcmk__rsc_can_migrate(const pe_resource_t *rsc, const pe_node_t *current)
G_GNUC_INTERNAL void pcmk__order_vs_unfence(pe_resource_t *rsc, pe_node_t *node, pe_action_t *action, enum pe_ordering order)
G_GNUC_INTERNAL bool pcmk__check_action_config(pe_resource_t *rsc, pe_node_t *node, xmlNode *xml_op)
enum crm_ais_msg_types type
Definition: cpg.c:48
G_GNUC_INTERNAL void pcmk__order_probes(pe_working_set_t *data_set)
G_GNUC_INTERNAL uint32_t pcmk__group_update_ordered_actions(pe_action_t *first, pe_action_t *then, const pe_node_t *node, uint32_t flags, uint32_t filter, uint32_t type, pe_working_set_t *data_set)
G_GNUC_INTERNAL void pcmk__add_with_this(pe_resource_t *rsc, pcmk__colocation_t *colocation)
G_GNUC_INTERNAL void pcmk__add_colocated_node_scores(pe_resource_t *rsc, const char *log_id, GHashTable **nodes, const char *attr, float factor, uint32_t flags)
#define pe_rsc_allow_remote_remotes
Definition: pe_types.h:273
G_GNUC_INTERNAL void pcmk__order_vs_fence(pe_action_t *stonith_op, pe_working_set_t *data_set)
void(* add_actions_to_graph)(pe_resource_t *rsc)
G_GNUC_INTERNAL GList * pcmk__rscs_matching_id(const char *id, pe_working_set_t *data_set)
G_GNUC_INTERNAL void pcmk__apply_coloc_to_priority(pe_resource_t *dependent, const pe_resource_t *primary, const pcmk__colocation_t *colocation)
const char * action
Definition: pcmk_fence.c:30
G_GNUC_INTERNAL void pcmk__substitute_remote_addr(pe_resource_t *rsc, GHashTable *params)
G_GNUC_INTERNAL void pcmk__new_colocation(const char *id, const char *node_attr, int score, pe_resource_t *dependent, pe_resource_t *primary, const char *dependent_role, const char *primary_role, bool influence, pe_working_set_t *data_set)
enum pe_action_flags(* action_flags)(pe_action_t *action, const pe_node_t *node)
G_GNUC_INTERNAL void pcmk__create_utilization_constraints(pe_resource_t *rsc, GList *allowed_nodes)
G_GNUC_INTERNAL xmlNode * pcmk__expand_tags_in_sets(xmlNode *xml_obj, pe_working_set_t *data_set)
G_GNUC_INTERNAL pe_node_t * pcmk__connection_host_for_action(pe_action_t *action)
G_GNUC_INTERNAL void pcmk__apply_locations(pe_working_set_t *data_set)
G_GNUC_INTERNAL pe_action_t * pcmk__new_cancel_action(pe_resource_t *rsc, const char *name, guint interval_ms, const pe_node_t *node)
G_GNUC_INTERNAL void pcmk__schedule_probes(pe_working_set_t *data_set)
pe_action_flags
Definition: pe_types.h:298
G_GNUC_INTERNAL const pe_node_t * pcmk__ban_insufficient_capacity(pe_resource_t *rsc)
#define pe_rsc_failed
Definition: pe_types.h:276
G_GNUC_INTERNAL bool pcmk__node_available(const pe_node_t *node, bool consider_score, bool consider_guest)
pe_resource_t * primary
G_GNUC_INTERNAL void pcmk__order_promotable_instances(pe_resource_t *clone)
G_GNUC_INTERNAL void pcmk__order_remote_connection_actions(pe_working_set_t *data_set)
G_GNUC_INTERNAL GList * pcmk__group_colocated_resources(pe_resource_t *rsc, pe_resource_t *orig_rsc, GList *colocated_rscs)
G_GNUC_INTERNAL pe_node_t * pcmk__group_assign(pe_resource_t *rsc, const pe_node_t *prefer)
G_GNUC_INTERNAL bool pcmk__probe_resource_list(GList *rscs, pe_node_t *node)
#define pcmk_is_set(g, f)
Convenience alias for pcmk_all_flags_set(), to check single flag.
Definition: util.h:121
G_GNUC_INTERNAL void pcmk__log_action(const char *pre_text, pe_action_t *action, bool details)
G_GNUC_INTERNAL bool pcmk__finalize_assignment(pe_resource_t *rsc, pe_node_t *chosen, bool force)
G_GNUC_INTERNAL gint pcmk__cmp_instance(gconstpointer a, gconstpointer b)
unsigned long long flags
Definition: pe_types.h:355
pe_working_set_t * data_set
void(* output_actions)(pe_resource_t *rsc)
void(* create_actions)(pe_resource_t *rsc)
G_GNUC_INTERNAL void pcmk__new_ordering(pe_resource_t *first_rsc, char *first_task, pe_action_t *first_action, pe_resource_t *then_rsc, char *then_task, pe_action_t *then_action, uint32_t flags, pe_working_set_t *data_set)
G_GNUC_INTERNAL void pcmk__create_internal_constraints(pe_working_set_t *data_set)
G_GNUC_INTERNAL void pcmk__order_after_each(pe_action_t *after, GList *list)
pe_node_t node1
G_GNUC_INTERNAL void pcmk__output_actions(pe_working_set_t *data_set)
G_GNUC_INTERNAL bool pcmk__probe_rsc_on_node(pe_resource_t *rsc, pe_node_t *node)
G_GNUC_INTERNAL gint pcmk__cmp_instance_number(gconstpointer a, gconstpointer b)
G_GNUC_INTERNAL bool pcmk__graph_has_loop(pe_action_t *init_action, pe_action_t *action, pe_action_wrapper_t *input)
void(* add_utilization)(const pe_resource_t *rsc, const pe_resource_t *orig_rsc, GList *all_rscs, GHashTable *utilization)
G_GNUC_INTERNAL bool pcmk__action_is_recurring(const pe_action_t *action)
G_GNUC_INTERNAL pe_resource_t * pcmk__find_constraint_resource(GList *rsc_list, const char *id)
pe_node_t node2
G_GNUC_INTERNAL void pcmk__unassign_resource(pe_resource_t *rsc)
G_GNUC_INTERNAL void pcmk__order_restart_vs_unfence(gpointer data, gpointer user_data)
void pcmk__create_migration_actions(pe_resource_t *rsc, const pe_node_t *current)
G_GNUC_INTERNAL void pcmk__reschedule_recurring(pe_resource_t *rsc, const char *task, guint interval_ms, pe_node_t *node)
G_GNUC_INTERNAL void pcmk__order_stops_before_shutdown(pe_node_t *node, pe_action_t *shutdown_op)
void(* apply_coloc_score)(pe_resource_t *dependent, const pe_resource_t *primary, const pcmk__colocation_t *colocation, bool for_dependent)
G_GNUC_INTERNAL void pcmk__output_bundle_actions(pe_resource_t *rsc)
G_GNUC_INTERNAL void pcmk__fence_guest(pe_node_t *node)
G_GNUC_INTERNAL void pcmk__primitive_internal_constraints(pe_resource_t *rsc)
G_GNUC_INTERNAL void pcmk__clone_apply_coloc_score(pe_resource_t *dependent, const pe_resource_t *primary, const pcmk__colocation_t *colocation, bool for_dependent)
G_GNUC_INTERNAL void pcmk__update_dependent_with_promotable(const pe_resource_t *primary, pe_resource_t *dependent, const pcmk__colocation_t *colocation)
Update dependent for a colocation with a promotable clone.
G_GNUC_INTERNAL void pcmk__apply_location(pe_resource_t *rsc, pe__location_t *constraint)
G_GNUC_INTERNAL pe__location_t * pcmk__new_location(const char *id, pe_resource_t *rsc, int node_weight, const char *discover_mode, pe_node_t *foo_node, pe_working_set_t *data_set)
G_GNUC_INTERNAL void pcmk__group_shutdown_lock(pe_resource_t *rsc)
bool(* create_probe)(pe_resource_t *rsc, pe_node_t *node)
G_GNUC_INTERNAL void pcmk__require_promotion_tickets(pe_resource_t *rsc)
G_GNUC_INTERNAL void pcmk__update_action_for_orderings(pe_action_t *action, pe_working_set_t *data_set)
G_GNUC_INTERNAL void pcmk__add_bundle_meta_to_xml(xmlNode *args_xml, pe_action_t *action)
Add special bundle meta-attributes to XML.
G_GNUC_INTERNAL bool pcmk__rsc_agent_changed(pe_resource_t *rsc, pe_node_t *node, const xmlNode *rsc_entry, bool active_on_node)
G_GNUC_INTERNAL void pcmk__handle_rsc_config_changes(pe_working_set_t *data_set)
G_GNUC_INTERNAL GHashTable * pcmk__copy_node_table(GHashTable *nodes)
G_GNUC_INTERNAL void pcmk__create_recurring_actions(pe_resource_t *rsc)
G_GNUC_INTERNAL pe_action_t * pcmk__new_shutdown_action(pe_node_t *node)
G_GNUC_INTERNAL void pcmk__group_internal_constraints(pe_resource_t *rsc)
G_GNUC_INTERNAL void pcmk__group_create_actions(pe_resource_t *rsc)
G_GNUC_INTERNAL int pcmk__compare_node_capacities(const pe_node_t *node1, const pe_node_t *node2)
G_GNUC_INTERNAL pe_node_t * pcmk__top_allowed_node(const pe_resource_t *rsc, const pe_node_t *node)
G_GNUC_INTERNAL void pcmk__primitive_shutdown_lock(pe_resource_t *rsc)
xmlNode * input
G_GNUC_INTERNAL void pcmk__unpack_ordering(xmlNode *xml_obj, pe_working_set_t *data_set)
G_GNUC_INTERNAL void pcmk__create_promotable_actions(pe_resource_t *clone)
Synthetic cluster events that can be injected into the cluster for running simulations.
Definition: pacemaker.h:50
G_GNUC_INTERNAL void pcmk__update_promotable_dependent_priority(const pe_resource_t *primary, pe_resource_t *dependent, const pcmk__colocation_t *colocation)
G_GNUC_INTERNAL bool pcmk__assign_resource(pe_resource_t *rsc, pe_node_t *node, bool force)
G_GNUC_INTERNAL void pcmk__consume_node_capacity(GHashTable *current_utilization, pe_resource_t *rsc)
This structure contains everything that makes up a single output formatter.
G_GNUC_INTERNAL void pcmk__create_graph(pe_working_set_t *data_set)
pcmk__coloc_select
G_GNUC_INTERNAL void pcmk__primitive_add_utilization(const pe_resource_t *rsc, const pe_resource_t *orig_rsc, GList *all_rscs, GHashTable *utilization)
G_GNUC_INTERNAL void pcmk__promotable_restart_ordering(pe_resource_t *rsc)
G_GNUC_INTERNAL void pcmk__add_promotion_scores(pe_resource_t *rsc)
G_GNUC_INTERNAL void pcmk__output_resource_actions(pe_resource_t *rsc)
G_GNUC_INTERNAL void pcmk__schedule_cancel(pe_resource_t *rsc, const char *call_id, const char *task, guint interval_ms, const pe_node_t *node, const char *reason)
G_GNUC_INTERNAL void pcmk__bundle_apply_coloc_score(pe_resource_t *dependent, const pe_resource_t *primary, const pcmk__colocation_t *colocation, bool for_dependent)
G_GNUC_INTERNAL void pcmk__group_add_utilization(const pe_resource_t *rsc, const pe_resource_t *orig_rsc, GList *all_rscs, GHashTable *utilization)
GList * running_on
Definition: pe_types.h:373
G_GNUC_INTERNAL void pcmk__sort_resources(pe_working_set_t *data_set)
G_GNUC_INTERNAL void pcmk__add_this_with(pe_resource_t *rsc, pcmk__colocation_t *colocation)
G_GNUC_INTERNAL void pcmk__group_apply_location(pe_resource_t *rsc, pe__location_t *location)
G_GNUC_INTERNAL void pcmk__unpack_colocation(xmlNode *xml_obj, pe_working_set_t *data_set)
G_GNUC_INTERNAL void pcmk__noop_add_graph_meta(pe_resource_t *rsc, xmlNode *xml)
G_GNUC_INTERNAL xmlNode * pcmk__inject_action_result(xmlNode *cib_resource, lrmd_event_data_t *op, int target_rc)
G_GNUC_INTERNAL void pcmk__unpack_location(xmlNode *xml_obj, pe_working_set_t *data_set)
G_GNUC_INTERNAL xmlNode * pcmk__inject_resource_history(pcmk__output_t *out, xmlNode *cib_node, const char *resource, const char *lrm_name, const char *rclass, const char *rtype, const char *rprovider)
Data types for cluster status.
void(* shutdown_lock)(pe_resource_t *rsc)
G_GNUC_INTERNAL void pcmk__unpack_rsc_ticket(xmlNode *xml_obj, pe_working_set_t *data_set)
void(* apply_location)(pe_resource_t *rsc, pe__location_t *location)
G_GNUC_INTERNAL void pcmk__primitive_create_actions(pe_resource_t *rsc)
uint32_t(* update_ordered_actions)(pe_action_t *first, pe_action_t *then, const pe_node_t *node, uint32_t flags, uint32_t filter, uint32_t type, pe_working_set_t *data_set)
G_GNUC_INTERNAL void pcmk__block_colocation_dependents(pe_action_t *action, pe_working_set_t *data_set)
G_GNUC_INTERNAL enum pcmk__coloc_affects pcmk__colocation_affects(const pe_resource_t *dependent, const pe_resource_t *primary, const pcmk__colocation_t *colocation, bool preview)
G_GNUC_INTERNAL void pcmk__apply_coloc_to_weights(pe_resource_t *dependent, const pe_resource_t *primary, const pcmk__colocation_t *colocation)
G_GNUC_INTERNAL void pcmk__apply_orderings(pe_working_set_t *data_set)
void pcmk__abort_dangling_migration(void *data, void *user_data)
pe_ordering
Definition: pe_types.h:479
void pcmk__order_migration_equivalents(pe__ordering_t *order)
G_GNUC_INTERNAL bool pcmk__valid_resource_or_tag(pe_working_set_t *data_set, const char *id, pe_resource_t **rsc, pe_tag_t **tag)
uint64_t flags
Definition: remote.c:215
void(* add_graph_meta)(pe_resource_t *rsc, xmlNode *xml)
G_GNUC_INTERNAL enum pe_action_flags pcmk__primitive_action_flags(pe_action_t *action, const pe_node_t *node)
G_GNUC_INTERNAL bool pcmk__tag_to_set(xmlNode *xml_obj, xmlNode **rsc_set, const char *attr, bool convert_rsc, pe_working_set_t *data_set)