pacemaker 2.1.6-6fdc9deea29
Scalable High-Availability cluster resource manager
Loading...
Searching...
No Matches
libpacemaker_private.h
Go to the documentation of this file.
1/*
2 * Copyright 2021-2023 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 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)(const pe_resource_t *rsc,
131 const pe_resource_t *orig_rsc,
132 GList *colocated_rscs);
133
152 const pe_resource_t *orig_rsc, GList **list);
153
173 const pe_resource_t *orig_rsc, GList **list);
174
192 void (*add_colocated_node_scores)(pe_resource_t *rsc, const char *log_id,
193 GHashTable **nodes, const char *attr,
194 float factor, uint32_t flags);
195
204
218 const pe_node_t *node);
219
244 const pe_node_t *node, uint32_t flags,
245 uint32_t filter, uint32_t type,
247
249
257
268 void (*add_graph_meta)(const pe_resource_t *rsc, xmlNode *xml);
269
285 void (*add_utilization)(const pe_resource_t *rsc,
286 const pe_resource_t *orig_rsc, GList *all_rscs,
287 GHashTable *utilization);
288
296};
297
298// Actions (pcmk_sched_actions.c)
299
300G_GNUC_INTERNAL
303
304G_GNUC_INTERNAL
306 const pe_node_t *node, uint32_t flags,
307 uint32_t filter, uint32_t type,
309
310G_GNUC_INTERNAL
311void pcmk__log_action(const char *pre_text, const pe_action_t *action,
312 bool details);
313
314G_GNUC_INTERNAL
316 guint interval_ms, const pe_node_t *node);
317
318G_GNUC_INTERNAL
320
321G_GNUC_INTERNAL
323
324G_GNUC_INTERNAL
326
327G_GNUC_INTERNAL
329
330G_GNUC_INTERNAL
332 const xmlNode *xml_op);
333
334G_GNUC_INTERNAL
336
337
338// Recurring actions (pcmk_sched_recurring.c)
339
340G_GNUC_INTERNAL
342
343G_GNUC_INTERNAL
344void pcmk__schedule_cancel(pe_resource_t *rsc, const char *call_id,
345 const char *task, guint interval_ms,
346 const pe_node_t *node, const char *reason);
347
348G_GNUC_INTERNAL
349void pcmk__reschedule_recurring(pe_resource_t *rsc, const char *task,
350 guint interval_ms, pe_node_t *node);
351
352G_GNUC_INTERNAL
354
355
356// Producing transition graphs (pcmk_graph_producer.c)
357
358G_GNUC_INTERNAL
359bool pcmk__graph_has_loop(const pe_action_t *init_action,
360 const pe_action_t *action,
362
363G_GNUC_INTERNAL
365
366G_GNUC_INTERNAL
368
369
370// Fencing (pcmk_sched_fencing.c)
371
372G_GNUC_INTERNAL
374
375G_GNUC_INTERNAL
376void pcmk__order_vs_unfence(const pe_resource_t *rsc, pe_node_t *node,
377 pe_action_t *action, enum pe_ordering order);
378
379G_GNUC_INTERNAL
380void pcmk__fence_guest(pe_node_t *node);
381
382G_GNUC_INTERNAL
383bool pcmk__node_unfenced(const pe_node_t *node);
384
385G_GNUC_INTERNAL
386void pcmk__order_restart_vs_unfence(gpointer data, gpointer user_data);
387
388
389// Injected scheduler inputs (pcmk_sched_injections.c)
390
392 const pcmk_injections_t *injections);
393
394
395// Constraints of any type (pcmk_sched_constraints.c)
396
397G_GNUC_INTERNAL
398pe_resource_t *pcmk__find_constraint_resource(GList *rsc_list, const char *id);
399
400G_GNUC_INTERNAL
401xmlNode *pcmk__expand_tags_in_sets(xmlNode *xml_obj,
403
404G_GNUC_INTERNAL
406 const char *id, pe_resource_t **rsc,
407 pe_tag_t **tag);
408
409G_GNUC_INTERNAL
410bool pcmk__tag_to_set(xmlNode *xml_obj, xmlNode **rsc_set, const char *attr,
411 bool convert_rsc, const pe_working_set_t *data_set);
412
413G_GNUC_INTERNAL
415
416
417// Location constraints
418
419G_GNUC_INTERNAL
420void pcmk__unpack_location(xmlNode *xml_obj, pe_working_set_t *data_set);
421
422G_GNUC_INTERNAL
424 int node_weight, const char *discover_mode,
425 pe_node_t *foo_node,
427
428G_GNUC_INTERNAL
430
431G_GNUC_INTERNAL
433
434
435// Colocation constraints (pcmk_sched_colocation.c)
436
442
443G_GNUC_INTERNAL
445 const pe_resource_t *primary,
446 const pcmk__colocation_t *colocation,
447 bool preview);
448
449G_GNUC_INTERNAL
451 const pe_resource_t *primary,
452 const pcmk__colocation_t *colocation);
453
454G_GNUC_INTERNAL
456 const pe_resource_t *primary,
457 const pcmk__colocation_t *colocation);
458
459G_GNUC_INTERNAL
460void pcmk__add_colocated_node_scores(pe_resource_t *rsc, const char *log_id,
461 GHashTable **nodes, const char *attr,
462 float factor, uint32_t flags);
463
464G_GNUC_INTERNAL
465void pcmk__add_dependent_scores(gpointer data, gpointer user_data);
466
467G_GNUC_INTERNAL
468void pcmk__unpack_colocation(xmlNode *xml_obj, pe_working_set_t *data_set);
469
470G_GNUC_INTERNAL
471void pcmk__add_this_with(GList **list, const pcmk__colocation_t *colocation);
472
473G_GNUC_INTERNAL
474void pcmk__add_this_with_list(GList **list, GList *addition);
475
476G_GNUC_INTERNAL
477void pcmk__add_with_this(GList **list, const pcmk__colocation_t *colocation);
478
479G_GNUC_INTERNAL
480void pcmk__add_with_this_list(GList **list, GList *addition);
481
482G_GNUC_INTERNAL
483void pcmk__new_colocation(const char *id, const char *node_attr, int score,
484 pe_resource_t *dependent, pe_resource_t *primary,
485 const char *dependent_role, const char *primary_role,
486 bool influence, pe_working_set_t *data_set);
487
488G_GNUC_INTERNAL
491
504static inline bool
505pcmk__colocation_has_influence(const pcmk__colocation_t *colocation,
506 const pe_resource_t *rsc)
507{
508 if (rsc == NULL) {
509 rsc = colocation->primary;
510 }
511
512 /* A bundle replica colocates its remote connection with its container,
513 * using a finite score so that the container can run on Pacemaker Remote
514 * nodes.
515 *
516 * Moving a connection is lightweight and does not interrupt the service,
517 * while moving a container is heavyweight and does interrupt the service,
518 * so don't move a clean, active container based solely on the preferences
519 * of its connection.
520 *
521 * This also avoids problematic scenarios where two containers want to
522 * perpetually swap places.
523 */
526 && pcmk__list_of_1(rsc->running_on)) {
527 return false;
528 }
529
530 /* The dependent in a colocation influences the primary's location
531 * if the influence option is true or the primary is not yet active.
532 */
533 return colocation->influence || (rsc->running_on == NULL);
534}
535
536
537// Ordering constraints (pcmk_sched_ordering.c)
538
539G_GNUC_INTERNAL
540void pcmk__new_ordering(pe_resource_t *first_rsc, char *first_task,
541 pe_action_t *first_action, pe_resource_t *then_rsc,
542 char *then_task, pe_action_t *then_action,
543 uint32_t flags, pe_working_set_t *data_set);
544
545G_GNUC_INTERNAL
546void pcmk__unpack_ordering(xmlNode *xml_obj, pe_working_set_t *data_set);
547
548G_GNUC_INTERNAL
550
551G_GNUC_INTERNAL
553 pe_action_t *shutdown_op);
554
555G_GNUC_INTERNAL
557
558G_GNUC_INTERNAL
559void pcmk__order_after_each(pe_action_t *after, GList *list);
560
561
572#define pcmk__order_resource_actions(first_rsc, first_task, \
573 then_rsc, then_task, flags) \
574 pcmk__new_ordering((first_rsc), \
575 pcmk__op_key((first_rsc)->id, (first_task), 0), \
576 NULL, \
577 (then_rsc), \
578 pcmk__op_key((then_rsc)->id, (then_task), 0), \
579 NULL, (flags), (first_rsc)->cluster)
580
581#define pcmk__order_starts(rsc1, rsc2, flags) \
582 pcmk__order_resource_actions((rsc1), CRMD_ACTION_START, \
583 (rsc2), CRMD_ACTION_START, (flags))
584
585#define pcmk__order_stops(rsc1, rsc2, flags) \
586 pcmk__order_resource_actions((rsc1), CRMD_ACTION_STOP, \
587 (rsc2), CRMD_ACTION_STOP, (flags))
588
589
590// Ticket constraints (pcmk_sched_tickets.c)
591
592G_GNUC_INTERNAL
593void pcmk__unpack_rsc_ticket(xmlNode *xml_obj, pe_working_set_t *data_set);
594
595
596// Promotable clone resources (pcmk_sched_promotable.c)
597
598G_GNUC_INTERNAL
600
601G_GNUC_INTERNAL
603
604G_GNUC_INTERNAL
606
607G_GNUC_INTERNAL
609
610G_GNUC_INTERNAL
612
613G_GNUC_INTERNAL
615
616G_GNUC_INTERNAL
618 pe_resource_t *dependent,
619 const pcmk__colocation_t *colocation);
620
621G_GNUC_INTERNAL
623 pe_resource_t *dependent,
624 const pcmk__colocation_t *colocation);
625
626
627// Pacemaker Remote nodes (pcmk_sched_remote.c)
628
629G_GNUC_INTERNAL
630bool pcmk__is_failed_remote_node(const pe_node_t *node);
631
632G_GNUC_INTERNAL
634
635G_GNUC_INTERNAL
637 const pe_node_t *node);
638
639G_GNUC_INTERNAL
641
642G_GNUC_INTERNAL
643void pcmk__substitute_remote_addr(pe_resource_t *rsc, GHashTable *params);
644
645G_GNUC_INTERNAL
646void pcmk__add_bundle_meta_to_xml(xmlNode *args_xml, const pe_action_t *action);
647
648
649// Primitives (pcmk_sched_primitive.c)
650
651G_GNUC_INTERNAL
653
654G_GNUC_INTERNAL
656
657G_GNUC_INTERNAL
659
660G_GNUC_INTERNAL
662 const pe_node_t *node);
663
664G_GNUC_INTERNAL
666 const pe_resource_t *primary,
667 const pcmk__colocation_t *colocation,
668 bool for_dependent);
669
670G_GNUC_INTERNAL
672 const pe_resource_t *orig_rsc,
673 GList **list);
674
675G_GNUC_INTERNAL
677 const pe_resource_t *orig_rsc,
678 GList **list);
679
680G_GNUC_INTERNAL
681void pcmk__schedule_cleanup(pe_resource_t *rsc, const pe_node_t *node,
682 bool optional);
683
684G_GNUC_INTERNAL
685void pcmk__primitive_add_graph_meta(const pe_resource_t *rsc, xmlNode *xml);
686
687G_GNUC_INTERNAL
689 const pe_resource_t *orig_rsc,
690 GList *all_rscs, GHashTable *utilization);
691
692G_GNUC_INTERNAL
694
695
696// Groups (pcmk_sched_group.c)
697
698G_GNUC_INTERNAL
700
701G_GNUC_INTERNAL
703
704G_GNUC_INTERNAL
706
707G_GNUC_INTERNAL
709 const pe_resource_t *primary,
710 const pcmk__colocation_t *colocation,
711 bool for_dependent);
712
713G_GNUC_INTERNAL
715 const pe_resource_t *orig_rsc, GList **list);
716
717G_GNUC_INTERNAL
719 const pe_resource_t *orig_rsc, GList **list);
720
721G_GNUC_INTERNAL
723 const char *log_id,
724 GHashTable **nodes, const char *attr,
725 float factor, uint32_t flags);
726
727G_GNUC_INTERNAL
729
730G_GNUC_INTERNAL
732 const pe_node_t *node);
733
734G_GNUC_INTERNAL
736 pe_action_t *then,
737 const pe_node_t *node,
738 uint32_t flags, uint32_t filter,
739 uint32_t type,
741
742G_GNUC_INTERNAL
744 const pe_resource_t *orig_rsc,
745 GList *colocated_rscs);
746
747G_GNUC_INTERNAL
749 const pe_resource_t *orig_rsc, GList *all_rscs,
750 GHashTable *utilization);
751
752G_GNUC_INTERNAL
754
755
756// Clones (pcmk_sched_clone.c)
757
758G_GNUC_INTERNAL
760
761G_GNUC_INTERNAL
763 const pe_resource_t *primary,
764 const pcmk__colocation_t *colocation,
765 bool for_dependent);
766
767G_GNUC_INTERNAL
769 const pe_resource_t *orig_rsc, GList **list);
770
771G_GNUC_INTERNAL
773 const pe_resource_t *orig_rsc, GList **list);
774
775// Bundles (pcmk_sched_bundle.c)
776
777G_GNUC_INTERNAL
779
780G_GNUC_INTERNAL
782 const pe_resource_t *primary,
783 const pcmk__colocation_t *colocation,
784 bool for_dependent);
785
786G_GNUC_INTERNAL
788 const pe_resource_t *orig_rsc, GList **list);
789
790G_GNUC_INTERNAL
792 const pe_resource_t *orig_rsc, GList **list);
793
794G_GNUC_INTERNAL
796
797
798// Clone instances or bundle replica containers (pcmk_sched_instances.c)
799
800G_GNUC_INTERNAL
801void pcmk__assign_instances(pe_resource_t *collective, GList *instances,
802 int max_total, int max_per_node);
803
804G_GNUC_INTERNAL
805void pcmk__create_instance_actions(pe_resource_t *rsc, GList *instances);
806
807G_GNUC_INTERNAL
808bool pcmk__instance_matches(const pe_resource_t *instance,
809 const pe_node_t *node, enum rsc_role_e role,
810 bool current);
811
812G_GNUC_INTERNAL
814 const pe_resource_t *rsc,
815 enum rsc_role_e role,
816 bool current);
817
818G_GNUC_INTERNAL
820 pe_action_t *then,
821 const pe_node_t *node,
822 uint32_t flags, uint32_t filter,
823 uint32_t type,
825
826G_GNUC_INTERNAL
828 const GList *instances,
829 const pe_node_t *node);
830
831G_GNUC_INTERNAL
832void pcmk__add_collective_constraints(GList **list,
833 const pe_resource_t *instance,
834 const pe_resource_t *collective,
835 bool with_this);
836
837
838// Injections (pcmk_injections.c)
839
840G_GNUC_INTERNAL
841xmlNode *pcmk__inject_node(cib_t *cib_conn, const char *node, const char *uuid);
842
843G_GNUC_INTERNAL
844xmlNode *pcmk__inject_node_state_change(cib_t *cib_conn, const char *node,
845 bool up);
846
847G_GNUC_INTERNAL
848xmlNode *pcmk__inject_resource_history(pcmk__output_t *out, xmlNode *cib_node,
849 const char *resource,
850 const char *lrm_name,
851 const char *rclass,
852 const char *rtype,
853 const char *rprovider);
854
855G_GNUC_INTERNAL
856void pcmk__inject_failcount(pcmk__output_t *out, xmlNode *cib_node,
857 const char *resource, const char *task,
858 guint interval_ms, int rc);
859
860G_GNUC_INTERNAL
861xmlNode *pcmk__inject_action_result(xmlNode *cib_resource,
862 lrmd_event_data_t *op, int target_rc);
863
864
865// Nodes (pcmk_sched_nodes.c)
866
867G_GNUC_INTERNAL
868bool pcmk__node_available(const pe_node_t *node, bool consider_score,
869 bool consider_guest);
870
871G_GNUC_INTERNAL
872bool pcmk__any_node_available(GHashTable *nodes);
873
874G_GNUC_INTERNAL
875GHashTable *pcmk__copy_node_table(GHashTable *nodes);
876
877G_GNUC_INTERNAL
878GList *pcmk__sort_nodes(GList *nodes, pe_node_t *active_node);
879
880G_GNUC_INTERNAL
882
883G_GNUC_INTERNAL
885 const pe_node_t *node);
886
887
888// Functions applying to more than one variant (pcmk_sched_resource.c)
889
890G_GNUC_INTERNAL
892
893G_GNUC_INTERNAL
895 const xmlNode *rsc_entry, bool active_on_node);
896
897G_GNUC_INTERNAL
898GList *pcmk__rscs_matching_id(const char *id, const pe_working_set_t *data_set);
899
900G_GNUC_INTERNAL
902 const pe_resource_t *orig_rsc,
903 GList *colocated_rscs);
904
905G_GNUC_INTERNAL
906void pcmk__noop_add_graph_meta(const pe_resource_t *rsc, xmlNode *xml);
907
908G_GNUC_INTERNAL
910
911G_GNUC_INTERNAL
913 bool force);
914
915G_GNUC_INTERNAL
916bool pcmk__assign_resource(pe_resource_t *rsc, pe_node_t *node, bool force);
917
918G_GNUC_INTERNAL
920
921G_GNUC_INTERNAL
922bool pcmk__threshold_reached(pe_resource_t *rsc, const pe_node_t *node,
923 pe_resource_t **failed);
924
925G_GNUC_INTERNAL
927
928G_GNUC_INTERNAL
929gint pcmk__cmp_instance(gconstpointer a, gconstpointer b);
930
931G_GNUC_INTERNAL
932gint pcmk__cmp_instance_number(gconstpointer a, gconstpointer b);
933
934
935// Functions related to probes (pcmk_sched_probes.c)
936
937G_GNUC_INTERNAL
939
940G_GNUC_INTERNAL
942
943G_GNUC_INTERNAL
944bool pcmk__probe_resource_list(GList *rscs, pe_node_t *node);
945
946G_GNUC_INTERNAL
948
949
950// Functions related to live migration (pcmk_sched_migration.c)
951
953 const pe_node_t *current);
954
955void pcmk__abort_dangling_migration(void *data, void *user_data);
956
957bool pcmk__rsc_can_migrate(const pe_resource_t *rsc, const pe_node_t *current);
958
960
961
962// Functions related to node utilization (pcmk_sched_utilization.c)
963
964G_GNUC_INTERNAL
966 const pe_node_t *node2);
967
968G_GNUC_INTERNAL
969void pcmk__consume_node_capacity(GHashTable *current_utilization,
970 const pe_resource_t *rsc);
971
972G_GNUC_INTERNAL
973void pcmk__release_node_capacity(GHashTable *current_utilization,
974 const pe_resource_t *rsc);
975
976G_GNUC_INTERNAL
978
979G_GNUC_INTERNAL
981 const GList *allowed_nodes);
982
983G_GNUC_INTERNAL
985
986#endif // PCMK__LIBPACEMAKER_PRIVATE__H
const char * name
Definition cib.c:24
uint64_t flags
Definition remote.c:3
#define pcmk_is_set(g, f)
Convenience alias for pcmk_all_flags_set(), to check single flag.
Definition util.h:121
rsc_role_e
Possible roles that a resource can be in.
Definition common.h:92
enum crm_ais_msg_types type
Definition cpg.c:3
char data[0]
Definition cpg.c:10
G_GNUC_INTERNAL bool pcmk__node_unfenced(const pe_node_t *node)
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)
G_GNUC_INTERNAL void pcmk__substitute_remote_addr(pe_resource_t *rsc, GHashTable *params)
G_GNUC_INTERNAL bool pcmk__valid_resource_or_tag(const pe_working_set_t *data_set, const char *id, pe_resource_t **rsc, pe_tag_t **tag)
void pcmk__abort_dangling_migration(void *data, void *user_data)
G_GNUC_INTERNAL bool pcmk__probe_rsc_on_node(pe_resource_t *rsc, pe_node_t *node)
G_GNUC_INTERNAL void pcmk__handle_rsc_config_changes(pe_working_set_t *data_set)
G_GNUC_INTERNAL void pcmk__create_utilization_constraints(pe_resource_t *rsc, const GList *allowed_nodes)
G_GNUC_INTERNAL void pcmk__bundle_with_colocations(const pe_resource_t *rsc, const pe_resource_t *orig_rsc, GList **list)
void pcmk__order_migration_equivalents(pe__ordering_t *order)
G_GNUC_INTERNAL void pcmk__fence_guest(pe_node_t *node)
pcmk__coloc_select
@ pcmk__coloc_select_active
@ pcmk__coloc_select_this_with
@ pcmk__coloc_select_nonnegative
@ pcmk__coloc_select_default
G_GNUC_INTERNAL void pcmk__log_action(const char *pre_text, const pe_action_t *action, bool details)
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)
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__set_instance_roles(pe_resource_t *rsc)
G_GNUC_INTERNAL void pcmk__output_resource_actions(pe_resource_t *rsc)
G_GNUC_INTERNAL void pcmk__add_with_this_list(GList **list, GList *addition)
G_GNUC_INTERNAL GList * pcmk__group_colocated_resources(const pe_resource_t *rsc, const pe_resource_t *orig_rsc, GList *colocated_rscs)
G_GNUC_INTERNAL void pcmk__clone_with_colocations(const pe_resource_t *rsc, const pe_resource_t *orig_rsc, GList **list)
G_GNUC_INTERNAL void pcmk__add_collective_constraints(GList **list, const pe_resource_t *instance, const pe_resource_t *collective, bool with_this)
G_GNUC_INTERNAL void pcmk__unassign_resource(pe_resource_t *rsc)
G_GNUC_INTERNAL void pcmk__primitive_internal_constraints(pe_resource_t *rsc)
G_GNUC_INTERNAL bool pcmk__instance_matches(const pe_resource_t *instance, const pe_node_t *node, enum rsc_role_e role, bool current)
G_GNUC_INTERNAL uint32_t pcmk__instance_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__set_allocation_methods(pe_working_set_t *data_set)
G_GNUC_INTERNAL GList * pcmk__rscs_matching_id(const char *id, const pe_working_set_t *data_set)
G_GNUC_INTERNAL bool pcmk__any_node_available(GHashTable *nodes)
G_GNUC_INTERNAL void pcmk__add_with_this(GList **list, const pcmk__colocation_t *colocation)
void pcmk__create_migration_actions(pe_resource_t *rsc, const pe_node_t *current)
G_GNUC_INTERNAL xmlNode * pcmk__expand_tags_in_sets(xmlNode *xml_obj, const pe_working_set_t *data_set)
G_GNUC_INTERNAL void pcmk__unpack_ordering(xmlNode *xml_obj, pe_working_set_t *data_set)
G_GNUC_INTERNAL bool pcmk__graph_has_loop(const pe_action_t *init_action, const pe_action_t *action, pe_action_wrapper_t *input)
G_GNUC_INTERNAL void pcmk__assign_instances(pe_resource_t *collective, GList *instances, int max_total, int max_per_node)
G_GNUC_INTERNAL void pcmk__create_internal_constraints(pe_working_set_t *data_set)
G_GNUC_INTERNAL void pcmk__require_promotion_tickets(pe_resource_t *rsc)
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 pe_node_t * pcmk__primitive_assign(pe_resource_t *rsc, const pe_node_t *prefer)
G_GNUC_INTERNAL void pcmk__disable_invalid_orderings(pe_working_set_t *data_set)
G_GNUC_INTERNAL void pcmk__group_internal_constraints(pe_resource_t *rsc)
G_GNUC_INTERNAL void pcmk__apply_node_health(pe_working_set_t *data_set)
G_GNUC_INTERNAL pe_node_t * pcmk__connection_host_for_action(const pe_action_t *action)
G_GNUC_INTERNAL void pcmk__schedule_cleanup(pe_resource_t *rsc, const pe_node_t *node, bool optional)
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 bool pcmk__action_locks_rsc_to_node(const pe_action_t *action)
G_GNUC_INTERNAL void pcmk__group_apply_location(pe_resource_t *rsc, pe__location_t *location)
G_GNUC_INTERNAL void pcmk__output_actions(pe_working_set_t *data_set)
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__group_add_colocated_node_scores(pe_resource_t *rsc, const char *log_id, GHashTable **nodes, const char *attr, float factor, uint32_t flags)
G_GNUC_INTERNAL void pcmk__group_add_utilization(const pe_resource_t *rsc, const pe_resource_t *orig_rsc, GList *all_rscs, GHashTable *utilization)
G_GNUC_INTERNAL void pcmk__update_action_for_orderings(pe_action_t *action, pe_working_set_t *data_set)
G_GNUC_INTERNAL GList * pcmk__colocated_resources(const pe_resource_t *rsc, const pe_resource_t *orig_rsc, GList *colocated_rscs)
G_GNUC_INTERNAL gint pcmk__cmp_instance_number(gconstpointer a, gconstpointer b)
G_GNUC_INTERNAL void pcmk__order_stops_before_shutdown(pe_node_t *node, pe_action_t *shutdown_op)
G_GNUC_INTERNAL void pcmk__group_create_actions(pe_resource_t *rsc)
G_GNUC_INTERNAL void pcmk__add_promotion_scores(pe_resource_t *rsc)
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 enum pe_action_flags pcmk__primitive_action_flags(pe_action_t *action, const pe_node_t *node)
G_GNUC_INTERNAL void pcmk__reschedule_recurring(pe_resource_t *rsc, const char *task, guint interval_ms, pe_node_t *node)
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_orderings(pe_working_set_t *data_set)
G_GNUC_INTERNAL void pcmk__add_bundle_meta_to_xml(xmlNode *args_xml, const pe_action_t *action)
Add special bundle meta-attributes to XML.
G_GNUC_INTERNAL void pcmk__order_promotable_instances(pe_resource_t *clone)
G_GNUC_INTERNAL pe_node_t * pcmk__clone_assign(pe_resource_t *rsc, const pe_node_t *prefer)
pcmk__coloc_affects
@ pcmk__coloc_affects_nothing
@ pcmk__coloc_affects_location
@ pcmk__coloc_affects_role
G_GNUC_INTERNAL void pcmk__consume_node_capacity(GHashTable *current_utilization, const pe_resource_t *rsc)
G_GNUC_INTERNAL void pcmk__primitive_with_colocations(const pe_resource_t *rsc, const pe_resource_t *orig_rsc, GList **list)
G_GNUC_INTERNAL void pcmk__primitive_create_actions(pe_resource_t *rsc)
G_GNUC_INTERNAL pe_resource_t * pcmk__find_constraint_resource(GList *rsc_list, const char *id)
G_GNUC_INTERNAL void pcmk__unpack_colocation(xmlNode *xml_obj, 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__output_bundle_actions(pe_resource_t *rsc)
G_GNUC_INTERNAL void pcmk__primitive_add_graph_meta(const pe_resource_t *rsc, xmlNode *xml)
G_GNUC_INTERNAL void pcmk__create_instance_actions(pe_resource_t *rsc, GList *instances)
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 gint pcmk__cmp_instance(gconstpointer a, gconstpointer b)
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__create_graph(pe_working_set_t *data_set)
G_GNUC_INTERNAL void pcmk__add_rsc_actions_to_graph(pe_resource_t *rsc)
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 const pe_resource_t * pcmk__get_rsc_in_container(const pe_resource_t *instance)
G_GNUC_INTERNAL int pcmk__compare_node_capacities(const pe_node_t *node1, const pe_node_t *node2)
G_GNUC_INTERNAL void pcmk__primitive_shutdown_lock(pe_resource_t *rsc)
G_GNUC_INTERNAL pe_node_t * pcmk__top_allowed_node(const pe_resource_t *rsc, const pe_node_t *node)
G_GNUC_INTERNAL bool pcmk__probe_resource_list(GList *rscs, pe_node_t *node)
G_GNUC_INTERNAL void pcmk__block_colocation_dependents(pe_action_t *action, pe_working_set_t *data_set)
G_GNUC_INTERNAL void pcmk__order_restart_vs_unfence(gpointer data, gpointer user_data)
G_GNUC_INTERNAL void pcmk__order_probes(pe_working_set_t *data_set)
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)
G_GNUC_INTERNAL xmlNode * pcmk__inject_node(cib_t *cib_conn, const char *node, const char *uuid)
G_GNUC_INTERNAL enum pe_action_flags pcmk__group_action_flags(pe_action_t *action, const pe_node_t *node)
G_GNUC_INTERNAL pe_resource_t * pcmk__find_compatible_instance(const pe_resource_t *match_rsc, const pe_resource_t *rsc, enum rsc_role_e role, bool current)
G_GNUC_INTERNAL void pcmk__order_remote_connection_actions(pe_working_set_t *data_set)
G_GNUC_INTERNAL void pcmk__with_group_colocations(const pe_resource_t *rsc, const pe_resource_t *orig_rsc, GList **list)
void pcmk__inject_scheduler_input(pe_working_set_t *data_set, cib_t *cib, const pcmk_injections_t *injections)
G_GNUC_INTERNAL bool pcmk__assign_resource(pe_resource_t *rsc, pe_node_t *node, bool force)
G_GNUC_INTERNAL enum pe_action_flags pcmk__collective_action_flags(pe_action_t *action, const GList *instances, const pe_node_t *node)
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 void pcmk__with_bundle_colocations(const pe_resource_t *rsc, const pe_resource_t *orig_rsc, GList **list)
G_GNUC_INTERNAL bool pcmk__finalize_assignment(pe_resource_t *rsc, pe_node_t *chosen, bool force)
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__add_dependent_scores(gpointer data, gpointer user_data)
G_GNUC_INTERNAL const pe_node_t * pcmk__ban_insufficient_capacity(pe_resource_t *rsc)
G_GNUC_INTERNAL void pcmk__group_with_colocations(const pe_resource_t *rsc, const pe_resource_t *orig_rsc, GList **list)
G_GNUC_INTERNAL void pcmk__order_vs_fence(pe_action_t *stonith_op, pe_working_set_t *data_set)
G_GNUC_INTERNAL bool pcmk__action_is_recurring(const pe_action_t *action)
G_GNUC_INTERNAL void pcmk__unpack_rsc_ticket(xmlNode *xml_obj, pe_working_set_t *data_set)
G_GNUC_INTERNAL bool pcmk__check_action_config(pe_resource_t *rsc, pe_node_t *node, const xmlNode *xml_op)
G_GNUC_INTERNAL xmlNode * pcmk__inject_node_state_change(cib_t *cib_conn, const char *node, bool up)
G_GNUC_INTERNAL pe_action_t * pcmk__new_shutdown_action(pe_node_t *node)
@ pcmk__updated_none
@ pcmk__updated_first
@ pcmk__updated_then
G_GNUC_INTERNAL void pcmk__deduplicate_action_inputs(pe_action_t *action)
G_GNUC_INTERNAL void pcmk__group_shutdown_lock(pe_resource_t *rsc)
G_GNUC_INTERNAL void pcmk__create_promotable_actions(pe_resource_t *clone)
G_GNUC_INTERNAL void pcmk__add_this_with(GList **list, const pcmk__colocation_t *colocation)
G_GNUC_INTERNAL void pcmk__release_node_capacity(GHashTable *current_utilization, const pe_resource_t *rsc)
G_GNUC_INTERNAL bool pcmk__tag_to_set(xmlNode *xml_obj, xmlNode **rsc_set, const char *attr, bool convert_rsc, const pe_working_set_t *data_set)
G_GNUC_INTERNAL void pcmk__sort_resources(pe_working_set_t *data_set)
G_GNUC_INTERNAL void pcmk__apply_locations(pe_working_set_t *data_set)
G_GNUC_INTERNAL void pcmk__noop_add_graph_meta(const pe_resource_t *rsc, xmlNode *xml)
G_GNUC_INTERNAL bool pcmk__is_failed_remote_node(const pe_node_t *node)
G_GNUC_INTERNAL void pcmk__promotable_restart_ordering(pe_resource_t *rsc)
G_GNUC_INTERNAL void pcmk__order_vs_unfence(const pe_resource_t *rsc, pe_node_t *node, pe_action_t *action, enum pe_ordering order)
G_GNUC_INTERNAL void pcmk__with_primitive_colocations(const pe_resource_t *rsc, const pe_resource_t *orig_rsc, GList **list)
G_GNUC_INTERNAL void pcmk__with_clone_colocations(const pe_resource_t *rsc, const pe_resource_t *orig_rsc, GList **list)
G_GNUC_INTERNAL void pcmk__add_this_with_list(GList **list, GList *addition)
G_GNUC_INTERNAL void pcmk__apply_location(pe_resource_t *rsc, pe__location_t *constraint)
G_GNUC_INTERNAL void pcmk__create_recurring_actions(pe_resource_t *rsc)
G_GNUC_INTERNAL void pcmk__unpack_location(xmlNode *xml_obj, pe_working_set_t *data_set)
bool pcmk__rsc_can_migrate(const pe_resource_t *rsc, const pe_node_t *current)
G_GNUC_INTERNAL xmlNode * pcmk__inject_action_result(xmlNode *cib_resource, lrmd_event_data_t *op, int target_rc)
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 pe_node_t * pcmk__group_assign(pe_resource_t *rsc, const pe_node_t *prefer)
G_GNUC_INTERNAL void pcmk__show_node_capacities(const char *desc, pe_working_set_t *data_set)
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)
G_GNUC_INTERNAL bool pcmk__threshold_reached(pe_resource_t *rsc, const pe_node_t *node, pe_resource_t **failed)
G_GNUC_INTERNAL void pcmk__apply_coloc_to_priority(pe_resource_t *dependent, const pe_resource_t *primary, const pcmk__colocation_t *colocation)
G_GNUC_INTERNAL bool pcmk__node_available(const pe_node_t *node, bool consider_score, bool consider_guest)
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)
G_GNUC_INTERNAL void pcmk__order_after_each(pe_action_t *after, GList *list)
G_GNUC_INTERNAL bool pcmk__rsc_corresponds_to_guest(const pe_resource_t *rsc, const pe_node_t *node)
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 GHashTable * pcmk__copy_node_table(GHashTable *nodes)
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__apply_coloc_to_weights(pe_resource_t *dependent, const pe_resource_t *primary, const pcmk__colocation_t *colocation)
G_GNUC_INTERNAL void pcmk__schedule_probes(pe_working_set_t *data_set)
pe_working_set_t * data_set
xmlNode * input
const char * action
Definition pcmk_fence.c:30
pe_node_t node1
pe_node_t node2
Data types for cluster status.
pe_ordering
Definition pe_types.h:506
#define pe_rsc_allow_remote_remotes
Definition pe_types.h:289
pe_action_flags
Definition pe_types.h:316
#define pe_rsc_failed
Definition pe_types.h:292
pe_resource_t * primary
pe_resource_t * dependent
This structure contains everything that makes up a single output formatter.
Synthetic cluster events that can be injected into the cluster for running simulations.
Definition pacemaker.h:50
GList * running_on
Definition pe_types.h:398
unsigned long long flags
Definition pe_types.h:373
void(* apply_location)(pe_resource_t *rsc, pe__location_t *location)
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)
void(* apply_coloc_score)(pe_resource_t *dependent, const pe_resource_t *primary, const pcmk__colocation_t *colocation, bool for_dependent)
bool(* create_probe)(pe_resource_t *rsc, pe_node_t *node)
void(* add_utilization)(const pe_resource_t *rsc, const pe_resource_t *orig_rsc, GList *all_rscs, GHashTable *utilization)
void(* create_actions)(pe_resource_t *rsc)
void(* output_actions)(pe_resource_t *rsc)
void(* add_colocated_node_scores)(pe_resource_t *rsc, const char *log_id, GHashTable **nodes, const char *attr, float factor, uint32_t flags)
enum pe_action_flags(* action_flags)(pe_action_t *action, const pe_node_t *node)
void(* shutdown_lock)(pe_resource_t *rsc)
void(* this_with_colocations)(const pe_resource_t *rsc, const pe_resource_t *orig_rsc, GList **list)
void(* add_actions_to_graph)(pe_resource_t *rsc)
void(* with_this_colocations)(const pe_resource_t *rsc, const pe_resource_t *orig_rsc, GList **list)
void(* internal_constraints)(pe_resource_t *rsc)
void(* add_graph_meta)(const pe_resource_t *rsc, xmlNode *xml)