This source file includes following definitions.
- pcmk__colocation_has_influence
1
2
3
4
5
6
7
8
9
10 #ifndef PCMK__LIBPACEMAKER_PRIVATE__H
11 # define PCMK__LIBPACEMAKER_PRIVATE__H
12
13
14
15
16
17 #include <crm/pengine/pe_types.h>
18
19
20 enum pcmk__coloc_select {
21
22 pcmk__coloc_select_default = 0,
23
24
25 pcmk__coloc_select_this_with = (1 << 0),
26
27
28 pcmk__coloc_select_nonnegative = (1 << 1),
29
30
31 pcmk__coloc_select_active = (1 << 2),
32 };
33
34
35 enum pcmk__updated {
36 pcmk__updated_none = 0,
37 pcmk__updated_first = (1 << 0),
38 pcmk__updated_then = (1 << 1),
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
56 struct resource_alloc_functions_s {
57
58
59
60
61
62
63
64
65
66 pe_node_t *(*assign)(pe_resource_t *rsc, const pe_node_t *prefer);
67
68
69
70
71
72
73
74 void (*create_actions)(pe_resource_t *rsc);
75
76
77
78
79
80
81
82
83
84
85 bool (*create_probe)(pe_resource_t *rsc, pe_node_t *node);
86
87
88
89
90
91
92
93 void (*internal_constraints)(pe_resource_t *rsc);
94
95
96
97
98
99
100
101
102
103
104
105
106
107
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
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130 GList *(*colocated_resources)(const pe_resource_t *rsc,
131 const pe_resource_t *orig_rsc,
132 GList *colocated_rscs);
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151 void (*with_this_colocations)(const pe_resource_t *rsc,
152 const pe_resource_t *orig_rsc, GList **list);
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172 void (*this_with_colocations)(const pe_resource_t *rsc,
173 const pe_resource_t *orig_rsc, GList **list);
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
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
196
197
198
199
200
201
202
203 void (*apply_location)(pe_resource_t *rsc, pe__location_t *location);
204
205
206
207
208
209
210
211
212
213
214
215
216
217 enum pe_action_flags (*action_flags)(pe_action_t *action,
218 const pe_node_t *node);
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243 uint32_t (*update_ordered_actions)(pe_action_t *first, pe_action_t *then,
244 const pe_node_t *node, uint32_t flags,
245 uint32_t filter, uint32_t type,
246 pe_working_set_t *data_set);
247
248 void (*output_actions)(pe_resource_t *rsc);
249
250
251
252
253
254
255
256 void (*add_actions_to_graph)(pe_resource_t *rsc);
257
258
259
260
261
262
263
264
265
266
267
268 void (*add_graph_meta)(const pe_resource_t *rsc, xmlNode *xml);
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285 void (*add_utilization)(const pe_resource_t *rsc,
286 const pe_resource_t *orig_rsc, GList *all_rscs,
287 GHashTable *utilization);
288
289
290
291
292
293
294
295 void (*shutdown_lock)(pe_resource_t *rsc);
296 };
297
298
299
300 G_GNUC_INTERNAL
301 void pcmk__update_action_for_orderings(pe_action_t *action,
302 pe_working_set_t *data_set);
303
304 G_GNUC_INTERNAL
305 uint32_t pcmk__update_ordered_actions(pe_action_t *first, pe_action_t *then,
306 const pe_node_t *node, uint32_t flags,
307 uint32_t filter, uint32_t type,
308 pe_working_set_t *data_set);
309
310 G_GNUC_INTERNAL
311 void pcmk__log_action(const char *pre_text, const pe_action_t *action,
312 bool details);
313
314 G_GNUC_INTERNAL
315 pe_action_t *pcmk__new_cancel_action(pe_resource_t *rsc, const char *name,
316 guint interval_ms, const pe_node_t *node);
317
318 G_GNUC_INTERNAL
319 pe_action_t *pcmk__new_shutdown_action(pe_node_t *node);
320
321 G_GNUC_INTERNAL
322 bool pcmk__action_locks_rsc_to_node(const pe_action_t *action);
323
324 G_GNUC_INTERNAL
325 void pcmk__deduplicate_action_inputs(pe_action_t *action);
326
327 G_GNUC_INTERNAL
328 void pcmk__output_actions(pe_working_set_t *data_set);
329
330 G_GNUC_INTERNAL
331 bool pcmk__check_action_config(pe_resource_t *rsc, pe_node_t *node,
332 const xmlNode *xml_op);
333
334 G_GNUC_INTERNAL
335 void pcmk__handle_rsc_config_changes(pe_working_set_t *data_set);
336
337
338
339
340 G_GNUC_INTERNAL
341 void pcmk__create_recurring_actions(pe_resource_t *rsc);
342
343 G_GNUC_INTERNAL
344 void 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
348 G_GNUC_INTERNAL
349 void pcmk__reschedule_recurring(pe_resource_t *rsc, const char *task,
350 guint interval_ms, pe_node_t *node);
351
352 G_GNUC_INTERNAL
353 bool pcmk__action_is_recurring(const pe_action_t *action);
354
355
356
357
358 G_GNUC_INTERNAL
359 bool pcmk__graph_has_loop(const pe_action_t *init_action,
360 const pe_action_t *action,
361 pe_action_wrapper_t *input);
362
363 G_GNUC_INTERNAL
364 void pcmk__add_rsc_actions_to_graph(pe_resource_t *rsc);
365
366 G_GNUC_INTERNAL
367 void pcmk__create_graph(pe_working_set_t *data_set);
368
369
370
371
372 G_GNUC_INTERNAL
373 void pcmk__order_vs_fence(pe_action_t *stonith_op, pe_working_set_t *data_set);
374
375 G_GNUC_INTERNAL
376 void pcmk__order_vs_unfence(const pe_resource_t *rsc, pe_node_t *node,
377 pe_action_t *action, enum pe_ordering order);
378
379 G_GNUC_INTERNAL
380 void pcmk__fence_guest(pe_node_t *node);
381
382 G_GNUC_INTERNAL
383 bool pcmk__node_unfenced(const pe_node_t *node);
384
385 G_GNUC_INTERNAL
386 void pcmk__order_restart_vs_unfence(gpointer data, gpointer user_data);
387
388
389
390
391 void pcmk__inject_scheduler_input(pe_working_set_t *data_set, cib_t *cib,
392 const pcmk_injections_t *injections);
393
394
395
396
397 G_GNUC_INTERNAL
398 pe_resource_t *pcmk__find_constraint_resource(GList *rsc_list, const char *id);
399
400 G_GNUC_INTERNAL
401 xmlNode *pcmk__expand_tags_in_sets(xmlNode *xml_obj,
402 const pe_working_set_t *data_set);
403
404 G_GNUC_INTERNAL
405 bool pcmk__valid_resource_or_tag(const pe_working_set_t *data_set,
406 const char *id, pe_resource_t **rsc,
407 pe_tag_t **tag);
408
409 G_GNUC_INTERNAL
410 bool 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
413 G_GNUC_INTERNAL
414 void pcmk__create_internal_constraints(pe_working_set_t *data_set);
415
416
417
418
419 G_GNUC_INTERNAL
420 void pcmk__unpack_location(xmlNode *xml_obj, pe_working_set_t *data_set);
421
422 G_GNUC_INTERNAL
423 pe__location_t *pcmk__new_location(const char *id, pe_resource_t *rsc,
424 int node_weight, const char *discover_mode,
425 pe_node_t *foo_node,
426 pe_working_set_t *data_set);
427
428 G_GNUC_INTERNAL
429 void pcmk__apply_locations(pe_working_set_t *data_set);
430
431 G_GNUC_INTERNAL
432 void pcmk__apply_location(pe_resource_t *rsc, pe__location_t *constraint);
433
434
435
436
437 enum pcmk__coloc_affects {
438 pcmk__coloc_affects_nothing = 0,
439 pcmk__coloc_affects_location,
440 pcmk__coloc_affects_role,
441 };
442
443 G_GNUC_INTERNAL
444 enum pcmk__coloc_affects pcmk__colocation_affects(const pe_resource_t *dependent,
445 const pe_resource_t *primary,
446 const pcmk__colocation_t *colocation,
447 bool preview);
448
449 G_GNUC_INTERNAL
450 void pcmk__apply_coloc_to_weights(pe_resource_t *dependent,
451 const pe_resource_t *primary,
452 const pcmk__colocation_t *colocation);
453
454 G_GNUC_INTERNAL
455 void pcmk__apply_coloc_to_priority(pe_resource_t *dependent,
456 const pe_resource_t *primary,
457 const pcmk__colocation_t *colocation);
458
459 G_GNUC_INTERNAL
460 void 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
464 G_GNUC_INTERNAL
465 void pcmk__add_dependent_scores(gpointer data, gpointer user_data);
466
467 G_GNUC_INTERNAL
468 void pcmk__unpack_colocation(xmlNode *xml_obj, pe_working_set_t *data_set);
469
470 G_GNUC_INTERNAL
471 void pcmk__add_this_with(GList **list, const pcmk__colocation_t *colocation);
472
473 G_GNUC_INTERNAL
474 void pcmk__add_this_with_list(GList **list, GList *addition);
475
476 G_GNUC_INTERNAL
477 void pcmk__add_with_this(GList **list, const pcmk__colocation_t *colocation);
478
479 G_GNUC_INTERNAL
480 void pcmk__add_with_this_list(GList **list, GList *addition);
481
482 G_GNUC_INTERNAL
483 void 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
488 G_GNUC_INTERNAL
489 void pcmk__block_colocation_dependents(pe_action_t *action,
490 pe_working_set_t *data_set);
491
492
493
494
495
496
497
498
499
500
501
502
503
504 static inline bool
505 pcmk__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
513
514
515
516
517
518
519
520
521
522
523
524 if (pcmk_is_set(colocation->dependent->flags, pe_rsc_allow_remote_remotes)
525 && !pcmk_is_set(rsc->flags, pe_rsc_failed)
526 && pcmk__list_of_1(rsc->running_on)) {
527 return false;
528 }
529
530
531
532
533 return colocation->influence || (rsc->running_on == NULL);
534 }
535
536
537
538
539 G_GNUC_INTERNAL
540 void 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
545 G_GNUC_INTERNAL
546 void pcmk__unpack_ordering(xmlNode *xml_obj, pe_working_set_t *data_set);
547
548 G_GNUC_INTERNAL
549 void pcmk__disable_invalid_orderings(pe_working_set_t *data_set);
550
551 G_GNUC_INTERNAL
552 void pcmk__order_stops_before_shutdown(pe_node_t *node,
553 pe_action_t *shutdown_op);
554
555 G_GNUC_INTERNAL
556 void pcmk__apply_orderings(pe_working_set_t *data_set);
557
558 G_GNUC_INTERNAL
559 void pcmk__order_after_each(pe_action_t *after, GList *list);
560
561
562
563
564
565
566
567
568
569
570
571
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
591
592 G_GNUC_INTERNAL
593 void pcmk__unpack_rsc_ticket(xmlNode *xml_obj, pe_working_set_t *data_set);
594
595
596
597
598 G_GNUC_INTERNAL
599 void pcmk__add_promotion_scores(pe_resource_t *rsc);
600
601 G_GNUC_INTERNAL
602 void pcmk__require_promotion_tickets(pe_resource_t *rsc);
603
604 G_GNUC_INTERNAL
605 void pcmk__set_instance_roles(pe_resource_t *rsc);
606
607 G_GNUC_INTERNAL
608 void pcmk__create_promotable_actions(pe_resource_t *clone);
609
610 G_GNUC_INTERNAL
611 void pcmk__promotable_restart_ordering(pe_resource_t *rsc);
612
613 G_GNUC_INTERNAL
614 void pcmk__order_promotable_instances(pe_resource_t *clone);
615
616 G_GNUC_INTERNAL
617 void pcmk__update_dependent_with_promotable(const pe_resource_t *primary,
618 pe_resource_t *dependent,
619 const pcmk__colocation_t *colocation);
620
621 G_GNUC_INTERNAL
622 void pcmk__update_promotable_dependent_priority(const pe_resource_t *primary,
623 pe_resource_t *dependent,
624 const pcmk__colocation_t *colocation);
625
626
627
628
629 G_GNUC_INTERNAL
630 bool pcmk__is_failed_remote_node(const pe_node_t *node);
631
632 G_GNUC_INTERNAL
633 void pcmk__order_remote_connection_actions(pe_working_set_t *data_set);
634
635 G_GNUC_INTERNAL
636 bool pcmk__rsc_corresponds_to_guest(const pe_resource_t *rsc,
637 const pe_node_t *node);
638
639 G_GNUC_INTERNAL
640 pe_node_t *pcmk__connection_host_for_action(const pe_action_t *action);
641
642 G_GNUC_INTERNAL
643 void pcmk__substitute_remote_addr(pe_resource_t *rsc, GHashTable *params);
644
645 G_GNUC_INTERNAL
646 void pcmk__add_bundle_meta_to_xml(xmlNode *args_xml, const pe_action_t *action);
647
648
649
650
651 G_GNUC_INTERNAL
652 pe_node_t *pcmk__primitive_assign(pe_resource_t *rsc, const pe_node_t *prefer);
653
654 G_GNUC_INTERNAL
655 void pcmk__primitive_create_actions(pe_resource_t *rsc);
656
657 G_GNUC_INTERNAL
658 void pcmk__primitive_internal_constraints(pe_resource_t *rsc);
659
660 G_GNUC_INTERNAL
661 enum pe_action_flags pcmk__primitive_action_flags(pe_action_t *action,
662 const pe_node_t *node);
663
664 G_GNUC_INTERNAL
665 void pcmk__primitive_apply_coloc_score(pe_resource_t *dependent,
666 const pe_resource_t *primary,
667 const pcmk__colocation_t *colocation,
668 bool for_dependent);
669
670 G_GNUC_INTERNAL
671 void pcmk__with_primitive_colocations(const pe_resource_t *rsc,
672 const pe_resource_t *orig_rsc,
673 GList **list);
674
675 G_GNUC_INTERNAL
676 void pcmk__primitive_with_colocations(const pe_resource_t *rsc,
677 const pe_resource_t *orig_rsc,
678 GList **list);
679
680 G_GNUC_INTERNAL
681 void pcmk__schedule_cleanup(pe_resource_t *rsc, const pe_node_t *node,
682 bool optional);
683
684 G_GNUC_INTERNAL
685 void pcmk__primitive_add_graph_meta(const pe_resource_t *rsc, xmlNode *xml);
686
687 G_GNUC_INTERNAL
688 void pcmk__primitive_add_utilization(const pe_resource_t *rsc,
689 const pe_resource_t *orig_rsc,
690 GList *all_rscs, GHashTable *utilization);
691
692 G_GNUC_INTERNAL
693 void pcmk__primitive_shutdown_lock(pe_resource_t *rsc);
694
695
696
697
698 G_GNUC_INTERNAL
699 pe_node_t *pcmk__group_assign(pe_resource_t *rsc, const pe_node_t *prefer);
700
701 G_GNUC_INTERNAL
702 void pcmk__group_create_actions(pe_resource_t *rsc);
703
704 G_GNUC_INTERNAL
705 void pcmk__group_internal_constraints(pe_resource_t *rsc);
706
707 G_GNUC_INTERNAL
708 void pcmk__group_apply_coloc_score(pe_resource_t *dependent,
709 const pe_resource_t *primary,
710 const pcmk__colocation_t *colocation,
711 bool for_dependent);
712
713 G_GNUC_INTERNAL
714 void pcmk__with_group_colocations(const pe_resource_t *rsc,
715 const pe_resource_t *orig_rsc, GList **list);
716
717 G_GNUC_INTERNAL
718 void pcmk__group_with_colocations(const pe_resource_t *rsc,
719 const pe_resource_t *orig_rsc, GList **list);
720
721 G_GNUC_INTERNAL
722 void pcmk__group_add_colocated_node_scores(pe_resource_t *rsc,
723 const char *log_id,
724 GHashTable **nodes, const char *attr,
725 float factor, uint32_t flags);
726
727 G_GNUC_INTERNAL
728 void pcmk__group_apply_location(pe_resource_t *rsc, pe__location_t *location);
729
730 G_GNUC_INTERNAL
731 enum pe_action_flags pcmk__group_action_flags(pe_action_t *action,
732 const pe_node_t *node);
733
734 G_GNUC_INTERNAL
735 uint32_t pcmk__group_update_ordered_actions(pe_action_t *first,
736 pe_action_t *then,
737 const pe_node_t *node,
738 uint32_t flags, uint32_t filter,
739 uint32_t type,
740 pe_working_set_t *data_set);
741
742 G_GNUC_INTERNAL
743 GList *pcmk__group_colocated_resources(const pe_resource_t *rsc,
744 const pe_resource_t *orig_rsc,
745 GList *colocated_rscs);
746
747 G_GNUC_INTERNAL
748 void pcmk__group_add_utilization(const pe_resource_t *rsc,
749 const pe_resource_t *orig_rsc, GList *all_rscs,
750 GHashTable *utilization);
751
752 G_GNUC_INTERNAL
753 void pcmk__group_shutdown_lock(pe_resource_t *rsc);
754
755
756
757
758 G_GNUC_INTERNAL
759 pe_node_t *pcmk__clone_assign(pe_resource_t *rsc, const pe_node_t *prefer);
760
761 G_GNUC_INTERNAL
762 void pcmk__clone_apply_coloc_score(pe_resource_t *dependent,
763 const pe_resource_t *primary,
764 const pcmk__colocation_t *colocation,
765 bool for_dependent);
766
767 G_GNUC_INTERNAL
768 void pcmk__with_clone_colocations(const pe_resource_t *rsc,
769 const pe_resource_t *orig_rsc, GList **list);
770
771 G_GNUC_INTERNAL
772 void pcmk__clone_with_colocations(const pe_resource_t *rsc,
773 const pe_resource_t *orig_rsc, GList **list);
774
775
776
777 G_GNUC_INTERNAL
778 const pe_resource_t *pcmk__get_rsc_in_container(const pe_resource_t *instance);
779
780 G_GNUC_INTERNAL
781 void pcmk__bundle_apply_coloc_score(pe_resource_t *dependent,
782 const pe_resource_t *primary,
783 const pcmk__colocation_t *colocation,
784 bool for_dependent);
785
786 G_GNUC_INTERNAL
787 void pcmk__with_bundle_colocations(const pe_resource_t *rsc,
788 const pe_resource_t *orig_rsc, GList **list);
789
790 G_GNUC_INTERNAL
791 void pcmk__bundle_with_colocations(const pe_resource_t *rsc,
792 const pe_resource_t *orig_rsc, GList **list);
793
794 G_GNUC_INTERNAL
795 void pcmk__output_bundle_actions(pe_resource_t *rsc);
796
797
798
799
800 G_GNUC_INTERNAL
801 void pcmk__assign_instances(pe_resource_t *collective, GList *instances,
802 int max_total, int max_per_node);
803
804 G_GNUC_INTERNAL
805 void pcmk__create_instance_actions(pe_resource_t *rsc, GList *instances);
806
807 G_GNUC_INTERNAL
808 bool pcmk__instance_matches(const pe_resource_t *instance,
809 const pe_node_t *node, enum rsc_role_e role,
810 bool current);
811
812 G_GNUC_INTERNAL
813 pe_resource_t *pcmk__find_compatible_instance(const pe_resource_t *match_rsc,
814 const pe_resource_t *rsc,
815 enum rsc_role_e role,
816 bool current);
817
818 G_GNUC_INTERNAL
819 uint32_t pcmk__instance_update_ordered_actions(pe_action_t *first,
820 pe_action_t *then,
821 const pe_node_t *node,
822 uint32_t flags, uint32_t filter,
823 uint32_t type,
824 pe_working_set_t *data_set);
825
826 G_GNUC_INTERNAL
827 enum pe_action_flags pcmk__collective_action_flags(pe_action_t *action,
828 const GList *instances,
829 const pe_node_t *node);
830
831 G_GNUC_INTERNAL
832 void 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
839
840 G_GNUC_INTERNAL
841 xmlNode *pcmk__inject_node(cib_t *cib_conn, const char *node, const char *uuid);
842
843 G_GNUC_INTERNAL
844 xmlNode *pcmk__inject_node_state_change(cib_t *cib_conn, const char *node,
845 bool up);
846
847 G_GNUC_INTERNAL
848 xmlNode *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
855 G_GNUC_INTERNAL
856 void pcmk__inject_failcount(pcmk__output_t *out, xmlNode *cib_node,
857 const char *resource, const char *task,
858 guint interval_ms, int rc);
859
860 G_GNUC_INTERNAL
861 xmlNode *pcmk__inject_action_result(xmlNode *cib_resource,
862 lrmd_event_data_t *op, int target_rc);
863
864
865
866
867 G_GNUC_INTERNAL
868 bool pcmk__node_available(const pe_node_t *node, bool consider_score,
869 bool consider_guest);
870
871 G_GNUC_INTERNAL
872 bool pcmk__any_node_available(GHashTable *nodes);
873
874 G_GNUC_INTERNAL
875 GHashTable *pcmk__copy_node_table(GHashTable *nodes);
876
877 G_GNUC_INTERNAL
878 GList *pcmk__sort_nodes(GList *nodes, pe_node_t *active_node);
879
880 G_GNUC_INTERNAL
881 void pcmk__apply_node_health(pe_working_set_t *data_set);
882
883 G_GNUC_INTERNAL
884 pe_node_t *pcmk__top_allowed_node(const pe_resource_t *rsc,
885 const pe_node_t *node);
886
887
888
889
890 G_GNUC_INTERNAL
891 void pcmk__set_allocation_methods(pe_working_set_t *data_set);
892
893 G_GNUC_INTERNAL
894 bool pcmk__rsc_agent_changed(pe_resource_t *rsc, pe_node_t *node,
895 const xmlNode *rsc_entry, bool active_on_node);
896
897 G_GNUC_INTERNAL
898 GList *pcmk__rscs_matching_id(const char *id, const pe_working_set_t *data_set);
899
900 G_GNUC_INTERNAL
901 GList *pcmk__colocated_resources(const pe_resource_t *rsc,
902 const pe_resource_t *orig_rsc,
903 GList *colocated_rscs);
904
905 G_GNUC_INTERNAL
906 void pcmk__noop_add_graph_meta(const pe_resource_t *rsc, xmlNode *xml);
907
908 G_GNUC_INTERNAL
909 void pcmk__output_resource_actions(pe_resource_t *rsc);
910
911 G_GNUC_INTERNAL
912 bool pcmk__finalize_assignment(pe_resource_t *rsc, pe_node_t *chosen,
913 bool force);
914
915 G_GNUC_INTERNAL
916 bool pcmk__assign_resource(pe_resource_t *rsc, pe_node_t *node, bool force);
917
918 G_GNUC_INTERNAL
919 void pcmk__unassign_resource(pe_resource_t *rsc);
920
921 G_GNUC_INTERNAL
922 bool pcmk__threshold_reached(pe_resource_t *rsc, const pe_node_t *node,
923 pe_resource_t **failed);
924
925 G_GNUC_INTERNAL
926 void pcmk__sort_resources(pe_working_set_t *data_set);
927
928 G_GNUC_INTERNAL
929 gint pcmk__cmp_instance(gconstpointer a, gconstpointer b);
930
931 G_GNUC_INTERNAL
932 gint pcmk__cmp_instance_number(gconstpointer a, gconstpointer b);
933
934
935
936
937 G_GNUC_INTERNAL
938 bool pcmk__probe_rsc_on_node(pe_resource_t *rsc, pe_node_t *node);
939
940 G_GNUC_INTERNAL
941 void pcmk__order_probes(pe_working_set_t *data_set);
942
943 G_GNUC_INTERNAL
944 bool pcmk__probe_resource_list(GList *rscs, pe_node_t *node);
945
946 G_GNUC_INTERNAL
947 void pcmk__schedule_probes(pe_working_set_t *data_set);
948
949
950
951
952 void pcmk__create_migration_actions(pe_resource_t *rsc,
953 const pe_node_t *current);
954
955 void pcmk__abort_dangling_migration(void *data, void *user_data);
956
957 bool pcmk__rsc_can_migrate(const pe_resource_t *rsc, const pe_node_t *current);
958
959 void pcmk__order_migration_equivalents(pe__ordering_t *order);
960
961
962
963
964 G_GNUC_INTERNAL
965 int pcmk__compare_node_capacities(const pe_node_t *node1,
966 const pe_node_t *node2);
967
968 G_GNUC_INTERNAL
969 void pcmk__consume_node_capacity(GHashTable *current_utilization,
970 const pe_resource_t *rsc);
971
972 G_GNUC_INTERNAL
973 void pcmk__release_node_capacity(GHashTable *current_utilization,
974 const pe_resource_t *rsc);
975
976 G_GNUC_INTERNAL
977 const pe_node_t *pcmk__ban_insufficient_capacity(pe_resource_t *rsc);
978
979 G_GNUC_INTERNAL
980 void pcmk__create_utilization_constraints(pe_resource_t *rsc,
981 const GList *allowed_nodes);
982
983 G_GNUC_INTERNAL
984 void pcmk__show_node_capacities(const char *desc, pe_working_set_t *data_set);
985
986 #endif