pacemaker 2.1.5-a3f44794f94
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
141
155 const pe_node_t *node);
156
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
236G_GNUC_INTERNAL
239
240G_GNUC_INTERNAL
242 const pe_node_t *node, uint32_t flags,
243 uint32_t filter, uint32_t type,
245
246G_GNUC_INTERNAL
247void pcmk__log_action(const char *pre_text, pe_action_t *action, bool details);
248
249G_GNUC_INTERNAL
251 guint interval_ms, const pe_node_t *node);
252
253G_GNUC_INTERNAL
255
256G_GNUC_INTERNAL
258
259G_GNUC_INTERNAL
261
262G_GNUC_INTERNAL
264
265G_GNUC_INTERNAL
267 xmlNode *xml_op);
268
269G_GNUC_INTERNAL
271
272
273// Recurring actions (pcmk_sched_recurring.c)
274
275G_GNUC_INTERNAL
277
278G_GNUC_INTERNAL
279void 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
283G_GNUC_INTERNAL
284void pcmk__reschedule_recurring(pe_resource_t *rsc, const char *task,
285 guint interval_ms, pe_node_t *node);
286
287G_GNUC_INTERNAL
289
290
291// Producing transition graphs (pcmk_graph_producer.c)
292
293G_GNUC_INTERNAL
296
297G_GNUC_INTERNAL
299
300G_GNUC_INTERNAL
302
303
304// Fencing (pcmk_sched_fencing.c)
305
306G_GNUC_INTERNAL
308
309G_GNUC_INTERNAL
311 pe_action_t *action, enum pe_ordering order);
312
313G_GNUC_INTERNAL
314void pcmk__fence_guest(pe_node_t *node);
315
316G_GNUC_INTERNAL
318
319G_GNUC_INTERNAL
320void 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
331G_GNUC_INTERNAL
332pe_resource_t *pcmk__find_constraint_resource(GList *rsc_list, const char *id);
333
334G_GNUC_INTERNAL
335xmlNode *pcmk__expand_tags_in_sets(xmlNode *xml_obj,
337
338G_GNUC_INTERNAL
340 pe_resource_t **rsc, pe_tag_t **tag);
341
342G_GNUC_INTERNAL
343bool pcmk__tag_to_set(xmlNode *xml_obj, xmlNode **rsc_set, const char *attr,
344 bool convert_rsc, pe_working_set_t *data_set);
345
346G_GNUC_INTERNAL
348
349
350// Location constraints
351
352G_GNUC_INTERNAL
353void pcmk__unpack_location(xmlNode *xml_obj, pe_working_set_t *data_set);
354
355G_GNUC_INTERNAL
357 int node_weight, const char *discover_mode,
358 pe_node_t *foo_node,
360
361G_GNUC_INTERNAL
363
364G_GNUC_INTERNAL
366
367
368// Colocation constraints (pcmk_sched_colocation.c)
369
374};
375
376G_GNUC_INTERNAL
378 const pe_resource_t *primary,
379 const pcmk__colocation_t *colocation,
380 bool preview);
381
382G_GNUC_INTERNAL
384 const pe_resource_t *primary,
385 const pcmk__colocation_t *colocation);
386
387G_GNUC_INTERNAL
389 const pe_resource_t *primary,
390 const pcmk__colocation_t *colocation);
391
392G_GNUC_INTERNAL
393void 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
397G_GNUC_INTERNAL
398void pcmk__unpack_colocation(xmlNode *xml_obj, pe_working_set_t *data_set);
399
400G_GNUC_INTERNAL
402
403G_GNUC_INTERNAL
405
406G_GNUC_INTERNAL
407void 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
412G_GNUC_INTERNAL
415
428static inline bool
429pcmk__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 */
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
463G_GNUC_INTERNAL
464void 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
469G_GNUC_INTERNAL
470void pcmk__unpack_ordering(xmlNode *xml_obj, pe_working_set_t *data_set);
471
472G_GNUC_INTERNAL
474
475G_GNUC_INTERNAL
477 pe_action_t *shutdown_op);
478
479G_GNUC_INTERNAL
481
482G_GNUC_INTERNAL
483void 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
517G_GNUC_INTERNAL
518void pcmk__unpack_rsc_ticket(xmlNode *xml_obj, pe_working_set_t *data_set);
519
520
521// Promotable clone resources (pcmk_sched_promotable.c)
522
523G_GNUC_INTERNAL
525
526G_GNUC_INTERNAL
528
529G_GNUC_INTERNAL
531
532G_GNUC_INTERNAL
534
535G_GNUC_INTERNAL
537
538G_GNUC_INTERNAL
540
541G_GNUC_INTERNAL
543 pe_resource_t *dependent,
544 const pcmk__colocation_t *colocation);
545
546G_GNUC_INTERNAL
548 pe_resource_t *dependent,
549 const pcmk__colocation_t *colocation);
550
551
552// Pacemaker Remote nodes (pcmk_sched_remote.c)
553
554G_GNUC_INTERNAL
556
557G_GNUC_INTERNAL
559
560G_GNUC_INTERNAL
562
563G_GNUC_INTERNAL
565
566G_GNUC_INTERNAL
567void pcmk__substitute_remote_addr(pe_resource_t *rsc, GHashTable *params);
568
569G_GNUC_INTERNAL
570void pcmk__add_bundle_meta_to_xml(xmlNode *args_xml, pe_action_t *action);
571
572
573// Primitives (pcmk_sched_primitive.c)
574
575G_GNUC_INTERNAL
577
578G_GNUC_INTERNAL
580
581G_GNUC_INTERNAL
583
584G_GNUC_INTERNAL
586 const pe_node_t *node);
587
588G_GNUC_INTERNAL
590 const pe_resource_t *primary,
591 const pcmk__colocation_t *colocation,
592 bool for_dependent);
593
594G_GNUC_INTERNAL
595void pcmk__schedule_cleanup(pe_resource_t *rsc, const pe_node_t *node,
596 bool optional);
597
598G_GNUC_INTERNAL
599void pcmk__primitive_add_graph_meta(pe_resource_t *rsc, xmlNode *xml);
600
601G_GNUC_INTERNAL
603 const pe_resource_t *orig_rsc,
604 GList *all_rscs, GHashTable *utilization);
605
606G_GNUC_INTERNAL
608
609
610// Groups (pcmk_sched_group.c)
611
612G_GNUC_INTERNAL
614
615G_GNUC_INTERNAL
617
618G_GNUC_INTERNAL
620
621G_GNUC_INTERNAL
623 const pe_resource_t *primary,
624 const pcmk__colocation_t *colocation,
625 bool for_dependent);
626
627G_GNUC_INTERNAL
629
630G_GNUC_INTERNAL
632 const pe_node_t *node);
633
634G_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
642G_GNUC_INTERNAL
644 pe_resource_t *orig_rsc,
645 GList *colocated_rscs);
646
647G_GNUC_INTERNAL
649 const pe_resource_t *orig_rsc, GList *all_rscs,
650 GHashTable *utilization);
651
652G_GNUC_INTERNAL
654
655
656// Clones (pcmk_sched_clone.c)
657
658G_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
666G_GNUC_INTERNAL
668 const pe_resource_t *primary,
669 const pcmk__colocation_t *colocation,
670 bool for_dependent);
671
672G_GNUC_INTERNAL
674
675
676// Injections (pcmk_injections.c)
677
678G_GNUC_INTERNAL
679xmlNode *pcmk__inject_node(cib_t *cib_conn, const char *node, const char *uuid);
680
681G_GNUC_INTERNAL
682xmlNode *pcmk__inject_node_state_change(cib_t *cib_conn, const char *node,
683 bool up);
684
685G_GNUC_INTERNAL
686xmlNode *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
693G_GNUC_INTERNAL
694void pcmk__inject_failcount(pcmk__output_t *out, xmlNode *cib_node,
695 const char *resource, const char *task,
696 guint interval_ms, int rc);
697
698G_GNUC_INTERNAL
699xmlNode *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
705G_GNUC_INTERNAL
706bool pcmk__node_available(const pe_node_t *node, bool consider_score,
707 bool consider_guest);
708
709G_GNUC_INTERNAL
710bool pcmk__any_node_available(GHashTable *nodes);
711
712G_GNUC_INTERNAL
713GHashTable *pcmk__copy_node_table(GHashTable *nodes);
714
715G_GNUC_INTERNAL
716GList *pcmk__sort_nodes(GList *nodes, pe_node_t *active_node);
717
718G_GNUC_INTERNAL
720
721G_GNUC_INTERNAL
723 const pe_node_t *node);
724
725
726// Functions applying to more than one variant (pcmk_sched_resource.c)
727
728G_GNUC_INTERNAL
730
731G_GNUC_INTERNAL
733 const xmlNode *rsc_entry, bool active_on_node);
734
735G_GNUC_INTERNAL
736GList *pcmk__rscs_matching_id(const char *id, pe_working_set_t *data_set);
737
738G_GNUC_INTERNAL
740 GList *colocated_rscs);
741
742G_GNUC_INTERNAL
743void pcmk__noop_add_graph_meta(pe_resource_t *rsc, xmlNode *xml);
744
745G_GNUC_INTERNAL
747
748G_GNUC_INTERNAL
750 bool force);
751
752G_GNUC_INTERNAL
753bool pcmk__assign_resource(pe_resource_t *rsc, pe_node_t *node, bool force);
754
755G_GNUC_INTERNAL
757
758G_GNUC_INTERNAL
760 pe_resource_t **failed);
761
762G_GNUC_INTERNAL
764
765G_GNUC_INTERNAL
766gint pcmk__cmp_instance(gconstpointer a, gconstpointer b);
767
768G_GNUC_INTERNAL
769gint pcmk__cmp_instance_number(gconstpointer a, gconstpointer b);
770
771
772// Functions related to probes (pcmk_sched_probes.c)
773
774G_GNUC_INTERNAL
776
777G_GNUC_INTERNAL
779
780G_GNUC_INTERNAL
781bool pcmk__probe_resource_list(GList *rscs, pe_node_t *node);
782
783G_GNUC_INTERNAL
785
786
787// Functions related to live migration (pcmk_sched_migration.c)
788
790 const pe_node_t *current);
791
792void pcmk__abort_dangling_migration(void *data, void *user_data);
793
794bool 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
801G_GNUC_INTERNAL
803 const pe_node_t *node2);
804
805G_GNUC_INTERNAL
806void pcmk__consume_node_capacity(GHashTable *current_utilization,
807 pe_resource_t *rsc);
808
809G_GNUC_INTERNAL
810void pcmk__release_node_capacity(GHashTable *current_utilization,
811 const pe_resource_t *rsc);
812
813G_GNUC_INTERNAL
815
816G_GNUC_INTERNAL
818 GList *allowed_nodes);
819
820G_GNUC_INTERNAL
822
823#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
enum crm_ais_msg_types type
Definition: cpg.c:3
char data[0]
Definition: cpg.c:10
G_GNUC_INTERNAL GList * pcmk__group_colocated_resources(pe_resource_t *rsc, pe_resource_t *orig_rsc, GList *colocated_rscs)
G_GNUC_INTERNAL xmlNode * pcmk__expand_tags_in_sets(xmlNode *xml_obj, 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)
G_GNUC_INTERNAL void pcmk__substitute_remote_addr(pe_resource_t *rsc, GHashTable *params)
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)
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__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 pe_node_t * pcmk__connection_host_for_action(pe_action_t *action)
G_GNUC_INTERNAL bool pcmk__check_action_config(pe_resource_t *rsc, pe_node_t *node, xmlNode *xml_op)
G_GNUC_INTERNAL void pcmk__log_action(const char *pre_text, pe_action_t *action, bool details)
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__unassign_resource(pe_resource_t *rsc)
G_GNUC_INTERNAL void pcmk__primitive_internal_constraints(pe_resource_t *rsc)
G_GNUC_INTERNAL void pcmk__set_allocation_methods(pe_working_set_t *data_set)
G_GNUC_INTERNAL bool pcmk__any_node_available(GHashTable *nodes)
void pcmk__create_migration_actions(pe_resource_t *rsc, const pe_node_t *current)
G_GNUC_INTERNAL void pcmk__unpack_ordering(xmlNode *xml_obj, pe_working_set_t *data_set)
G_GNUC_INTERNAL bool pcmk__rsc_corresponds_to_guest(pe_resource_t *rsc, pe_node_t *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__noop_add_graph_meta(pe_resource_t *rsc, xmlNode *xml)
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 bool pcmk__valid_resource_or_tag(pe_working_set_t *data_set, const char *id, pe_resource_t **rsc, pe_tag_t **tag)
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__create_utilization_constraints(pe_resource_t *rsc, GList *allowed_nodes)
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 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 bool pcmk__graph_has_loop(pe_action_t *init_action, pe_action_t *action, pe_action_wrapper_t *input)
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__order_promotable_instances(pe_resource_t *clone)
pcmk__coloc_affects
@ pcmk__coloc_affects_nothing
@ pcmk__coloc_affects_location
@ pcmk__coloc_affects_role
G_GNUC_INTERNAL void pcmk__add_this_with(pe_resource_t *rsc, pcmk__colocation_t *colocation)
G_GNUC_INTERNAL void pcmk__primitive_create_actions(pe_resource_t *rsc)
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 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 GList * pcmk__colocated_resources(pe_resource_t *rsc, pe_resource_t *orig_rsc, GList *colocated_rscs)
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 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__tag_to_set(xmlNode *xml_obj, xmlNode **rsc_set, const char *attr, bool convert_rsc, pe_working_set_t *data_set)
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__primitive_add_graph_meta(pe_resource_t *rsc, xmlNode *xml)
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)
void pcmk__inject_scheduler_input(pe_working_set_t *data_set, cib_t *cib, pcmk_injections_t *injections)
G_GNUC_INTERNAL void pcmk__order_remote_connection_actions(pe_working_set_t *data_set)
G_GNUC_INTERNAL bool pcmk__assign_resource(pe_resource_t *rsc, pe_node_t *node, bool force)
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__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 const pe_node_t * pcmk__ban_insufficient_capacity(pe_resource_t *rsc)
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 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 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 bool pcmk__is_failed_remote_node(pe_node_t *node)
G_GNUC_INTERNAL void pcmk__create_promotable_actions(pe_resource_t *clone)
G_GNUC_INTERNAL void pcmk__release_node_capacity(GHashTable *current_utilization, const pe_resource_t *rsc)
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 bool pcmk__threshold_reached(pe_resource_t *rsc, pe_node_t *node, pe_resource_t **failed)
G_GNUC_INTERNAL void pcmk__promotable_restart_ordering(pe_resource_t *rsc)
G_GNUC_INTERNAL bool pcmk__node_unfenced(pe_node_t *node)
G_GNUC_INTERNAL void pcmk__apply_location(pe_resource_t *rsc, pe__location_t *constraint)
G_GNUC_INTERNAL GList * pcmk__rscs_matching_id(const char *id, pe_working_set_t *data_set)
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 void pcmk__add_with_this(pe_resource_t *rsc, pcmk__colocation_t *colocation)
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 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 void pcmk__consume_node_capacity(GHashTable *current_utilization, 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 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:479
#define pe_rsc_allow_remote_remotes
Definition: pe_types.h:273
pe_action_flags
Definition: pe_types.h:298
#define pe_rsc_failed
Definition: pe_types.h:276
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:373
unsigned long long flags
Definition: pe_types.h:355
void(* apply_location)(pe_resource_t *rsc, pe__location_t *location)
void(* add_graph_meta)(pe_resource_t *rsc, xmlNode *xml)
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)
enum pe_action_flags(* action_flags)(pe_action_t *action, const pe_node_t *node)
void(* shutdown_lock)(pe_resource_t *rsc)
void(* add_actions_to_graph)(pe_resource_t *rsc)
void(* internal_constraints)(pe_resource_t *rsc)