root/lib/pacemaker/libpacemaker_private.h

/* [previous][next][first][last][top][bottom][index][help] */

INCLUDED FROM


   1 /*
   2  * Copyright 2021-2024 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__PACEMAKER_LIBPACEMAKER_PRIVATE__H
  11 #define PCMK__PACEMAKER_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 <stdio.h>                  // NULL
  18 #include <stdint.h>                 // uint32_t
  19 #include <stdbool.h>                // bool, false
  20 #include <glib.h>                   // guint, gpointer, GList, GHashTable
  21 #include <libxml/tree.h>            // xmlNode
  22 
  23 #include <crm/common/scheduler.h>   // pcmk_action_t, pcmk_node_t, etc.
  24 #include <crm/common/scheduler_internal.h>  // pcmk__location_t, etc.
  25 #include <crm/cib.h>                // cib_t
  26 #include <crm/lrmd_events.h>        // lrmd_event_data_t
  27 #include <crm/pengine/internal.h>   // pe__const_top_resource(), etc.
  28 #include <pacemaker.h>              // pcmk_injections_t
  29 #include <pacemaker-internal.h>     // pcmk__colocation_t
  30 
  31 #ifdef __cplusplus
  32 extern "C" {
  33 #endif
  34 
  35 // Colocation flags
  36 enum pcmk__coloc_flags {
  37     pcmk__coloc_none        = 0U,
  38 
  39     // Primary is affected even if already active
  40     pcmk__coloc_influence   = (1U << 0),
  41 
  42     // Colocation was explicitly configured in CIB
  43     pcmk__coloc_explicit    = (1U << 1),
  44 };
  45 
  46 // Flags to modify the behavior of add_colocated_node_scores()
  47 enum pcmk__coloc_select {
  48     // With no other flags, apply all "with this" colocations
  49     pcmk__coloc_select_default      = 0,
  50 
  51     // Apply "this with" colocations instead of "with this" colocations
  52     pcmk__coloc_select_this_with    = (1 << 0),
  53 
  54     // Apply only colocations with non-negative scores
  55     pcmk__coloc_select_nonnegative  = (1 << 1),
  56 
  57     // Apply only colocations with at least one matching node
  58     pcmk__coloc_select_active       = (1 << 2),
  59 };
  60 
  61 // Flags the update_ordered_actions() method can return
  62 enum pcmk__updated {
  63     pcmk__updated_none      = 0,        // Nothing changed
  64     pcmk__updated_first     = (1 << 0), // First action was updated
  65     pcmk__updated_then      = (1 << 1), // Then action was updated
  66 };
  67 
  68 #define pcmk__set_updated_flags(au_flags, action, flags_to_set) do {        \
  69         au_flags = pcmk__set_flags_as(__func__, __LINE__,                   \
  70                                       LOG_TRACE, "Action update",           \
  71                                       (action)->uuid, au_flags,             \
  72                                       (flags_to_set), #flags_to_set);       \
  73     } while (0)
  74 
  75 #define pcmk__clear_updated_flags(au_flags, action, flags_to_clear) do {    \
  76         au_flags = pcmk__clear_flags_as(__func__, __LINE__,                 \
  77                                         LOG_TRACE, "Action update",         \
  78                                         (action)->uuid, au_flags,           \
  79                                         (flags_to_clear), #flags_to_clear); \
  80     } while (0)
  81 
  82 // Resource assignment methods
  83 struct pcmk__assignment_methods {
  84     /*!
  85      * \internal
  86      * \brief Assign a resource to a node
  87      *
  88      * \param[in,out] rsc           Resource to assign to a node
  89      * \param[in]     prefer        Node to prefer, if all else is equal
  90      * \param[in]     stop_if_fail  If \c true and \p rsc can't be assigned to a
  91      *                              node, set next role to stopped and update
  92      *                              existing actions (if \p rsc is not a
  93      *                              primitive, this applies to its primitive
  94      *                              descendants instead)
  95      *
  96      * \return Node that \p rsc is assigned to, if assigned entirely to one node
  97      *
  98      * \note If \p stop_if_fail is \c false, then \c pcmk__unassign_resource()
  99      *       can completely undo the assignment. A successful assignment can be
 100      *       either undone or left alone as final. A failed assignment has the
 101      *       same effect as calling pcmk__unassign_resource(); there are no side
 102      *       effects on roles or actions.
 103      */
 104     pcmk_node_t *(*assign)(pcmk_resource_t *rsc, const pcmk_node_t *prefer,
 105                            bool stop_if_fail);
 106 
 107     /*!
 108      * \internal
 109      * \brief Create all actions needed for a given resource
 110      *
 111      * \param[in,out] rsc  Resource to create actions for
 112      */
 113     void (*create_actions)(pcmk_resource_t *rsc);
 114 
 115     /*!
 116      * \internal
 117      * \brief Schedule any probes needed for a resource on a node
 118      *
 119      * \param[in,out] rsc   Resource to create probe for
 120      * \param[in,out] node  Node to create probe on
 121      *
 122      * \return true if any probe was created, otherwise false
 123      */
 124     bool (*create_probe)(pcmk_resource_t *rsc, pcmk_node_t *node);
 125 
 126     /*!
 127      * \internal
 128      * \brief Create implicit constraints needed for a resource
 129      *
 130      * \param[in,out] rsc  Resource to create implicit constraints for
 131      */
 132     void (*internal_constraints)(pcmk_resource_t *rsc);
 133 
 134     /*!
 135      * \internal
 136      * \brief Apply a colocation's score to node scores or resource priority
 137      *
 138      * Given a colocation constraint, apply its score to the dependent's
 139      * allowed node scores (if we are still placing resources) or priority (if
 140      * we are choosing promotable clone instance roles).
 141      *
 142      * \param[in,out] dependent      Dependent resource in colocation
 143      * \param[in]     primary        Primary resource in colocation
 144      * \param[in]     colocation     Colocation constraint to apply
 145      * \param[in]     for_dependent  true if called on behalf of dependent
 146      *
 147      * \return The score added to the dependent's priority
 148      */
 149     int (*apply_coloc_score)(pcmk_resource_t *dependent,
 150                              const pcmk_resource_t *primary,
 151                              const pcmk__colocation_t *colocation,
 152                              bool for_dependent);
 153 
 154     /*!
 155      * \internal
 156      * \brief Create list of all resources in colocations with a given resource
 157      *
 158      * Given a resource, create a list of all resources involved in mandatory
 159      * colocations with it, whether directly or via chained colocations.
 160      *
 161      * \param[in]     rsc             Resource to add to colocated list
 162      * \param[in]     orig_rsc        Resource originally requested
 163      * \param[in,out] colocated_rscs  Existing list
 164      *
 165      * \return List of given resource and all resources involved in colocations
 166      *
 167      * \note This function is recursive; top-level callers should pass NULL as
 168      *       \p colocated_rscs and \p orig_rsc, and the desired resource as
 169      *       \p rsc. The recursive calls will use other values.
 170      */
 171     GList *(*colocated_resources)(const pcmk_resource_t *rsc,
 172                                   const pcmk_resource_t *orig_rsc,
 173                                   GList *colocated_rscs);
 174 
 175     /*!
 176      * \internal
 177      * \brief Add colocations affecting a resource as primary to a list
 178      *
 179      * Given a resource being assigned (\p orig_rsc) and a resource somewhere in
 180      * its chain of ancestors (\p rsc, which may be \p orig_rsc), get
 181      * colocations that affect the ancestor as primary and should affect the
 182      * resource, and add them to a given list.
 183      *
 184      * \param[in]     rsc       Resource whose colocations should be added
 185      * \param[in]     orig_rsc  Affected resource (\p rsc or a descendant)
 186      * \param[in,out] list      List of colocations to add to
 187      *
 188      * \note All arguments should be non-NULL.
 189      * \note The pcmk__with_this_colocations() wrapper should usually be used
 190      *       instead of using this method directly.
 191      */
 192     void (*with_this_colocations)(const pcmk_resource_t *rsc,
 193                                   const pcmk_resource_t *orig_rsc,
 194                                   GList **list);
 195 
 196     /*!
 197      * \internal
 198      * \brief Add colocations affecting a resource as dependent to a list
 199      *
 200      * Given a resource being assigned (\p orig_rsc) and a resource somewhere in
 201      * its chain of ancestors (\p rsc, which may be \p orig_rsc), get
 202      * colocations that affect the ancestor as dependent and should affect the
 203      * resource, and add them to a given list.
 204      *
 205      *
 206      * \param[in]     rsc       Resource whose colocations should be added
 207      * \param[in]     orig_rsc  Affected resource (\p rsc or a descendant)
 208      * \param[in,out] list      List of colocations to add to
 209      *
 210      * \note All arguments should be non-NULL.
 211      * \note The pcmk__this_with_colocations() wrapper should usually be used
 212      *       instead of using this method directly.
 213      */
 214     void (*this_with_colocations)(const pcmk_resource_t *rsc,
 215                                   const pcmk_resource_t *orig_rsc,
 216                                   GList **list);
 217 
 218     /*!
 219      * \internal
 220      * \brief Update nodes with scores of colocated resources' nodes
 221      *
 222      * Given a table of nodes and a resource, update the nodes' scores with the
 223      * scores of the best nodes matching the attribute used for each of the
 224      * resource's relevant colocations.
 225      *
 226      * \param[in,out] source_rsc  Resource whose node scores to add
 227      * \param[in]     target_rsc  Resource on whose behalf to update \p *nodes
 228      * \param[in]     log_id      Resource ID for logs (if \c NULL, use
 229      *                            \p source_rsc ID)
 230      * \param[in,out] nodes       Nodes to update (set initial contents to
 231      *                            \c NULL to copy allowed nodes from
 232      *                            \p source_rsc)
 233      * \param[in]     colocation  Original colocation constraint (used to get
 234      *                            configured primary resource's stickiness, and
 235      *                            to get colocation node attribute; if \c NULL,
 236      *                            <tt>source_rsc</tt>'s own matching node scores
 237      *                            will not be added, and \p *nodes must be
 238      *                            \c NULL as well)
 239      * \param[in]     factor      Incorporate scores multiplied by this factor
 240      * \param[in]     flags       Bitmask of enum pcmk__coloc_select values
 241      *
 242      * \note \c NULL \p target_rsc, \c NULL \p *nodes, \c NULL \p colocation,
 243      *       and the \c pcmk__coloc_select_this_with flag are used together (and
 244      *       only by \c cmp_resources()).
 245      * \note The caller remains responsible for freeing \p *nodes.
 246      */
 247     void (*add_colocated_node_scores)(pcmk_resource_t *source_rsc,
 248                                       const pcmk_resource_t *target_rsc,
 249                                       const char *log_id, GHashTable **nodes,
 250                                       const pcmk__colocation_t *colocation,
 251                                       float factor, uint32_t flags);
 252 
 253     /*!
 254      * \internal
 255      * \brief Apply a location constraint to a resource's allowed node scores
 256      *
 257      * \param[in,out] rsc       Resource to apply constraint to
 258      * \param[in,out] location  Location constraint to apply
 259      */
 260     void (*apply_location)(pcmk_resource_t *rsc, pcmk__location_t *location);
 261 
 262     /*!
 263      * \internal
 264      * \brief Return action flags for a given resource action
 265      *
 266      * \param[in,out] action  Action to get flags for
 267      * \param[in]     node    If not NULL, limit effects to this node
 268      *
 269      * \return Flags appropriate to \p action on \p node
 270      * \note For primitives, this will be the same as action->flags regardless
 271      *       of node. For collective resources, the flags can differ due to
 272      *       multiple instances possibly being involved.
 273      */
 274     uint32_t (*action_flags)(pcmk_action_t *action, const pcmk_node_t *node);
 275 
 276     /*!
 277      * \internal
 278      * \brief Update two actions according to an ordering between them
 279      *
 280      * Given information about an ordering of two actions, update the actions'
 281      * flags (and runnable_before members if appropriate) as appropriate for the
 282      * ordering. Effects may cascade to other orderings involving the actions as
 283      * well.
 284      *
 285      * \param[in,out] first      'First' action in an ordering
 286      * \param[in,out] then       'Then' action in an ordering
 287      * \param[in]     node       If not NULL, limit scope of ordering to this
 288      *                           node (only used when interleaving instances)
 289      * \param[in]     flags      Action flags for \p first for ordering purposes
 290      * \param[in]     filter     Action flags to limit scope of certain updates
 291      *                           (may include pcmk__action_optional to affect
 292      *                           only mandatory actions and
 293      *                           pcmk__action_runnable to affect only runnable
 294      *                           actions)
 295      * \param[in]     type       Group of enum pcmk__action_relation_flags
 296      * \param[in,out] scheduler  Scheduler data
 297      *
 298      * \return Group of enum pcmk__updated flags indicating what was updated
 299      */
 300     uint32_t (*update_ordered_actions)(pcmk_action_t *first,
 301                                        pcmk_action_t *then,
 302                                        const pcmk_node_t *node, uint32_t flags,
 303                                        uint32_t filter, uint32_t type,
 304                                        pcmk_scheduler_t *scheduler);
 305 
 306     /*!
 307      * \internal
 308      * \brief Output a summary of scheduled actions for a resource
 309      *
 310      * \param[in,out] rsc  Resource to output actions for
 311      */
 312     void (*output_actions)(pcmk_resource_t *rsc);
 313 
 314     /*!
 315      * \internal
 316      * \brief Add a resource's actions to the transition graph
 317      *
 318      * \param[in,out] rsc  Resource whose actions should be added
 319      */
 320     void (*add_actions_to_graph)(pcmk_resource_t *rsc);
 321 
 322     /*!
 323      * \internal
 324      * \brief Add meta-attributes relevant to transition graph actions to XML
 325      *
 326      * If a given resource supports variant-specific meta-attributes that are
 327      * needed for transition graph actions, add them to a given XML element.
 328      *
 329      * \param[in]     rsc  Resource whose meta-attributes should be added
 330      * \param[in,out] xml  Transition graph action attributes XML to add to
 331      */
 332     void (*add_graph_meta)(const pcmk_resource_t *rsc, xmlNode *xml);
 333 
 334     /*!
 335      * \internal
 336      * \brief Add a resource's utilization to a table of utilization values
 337      *
 338      * This function is used when summing the utilization of a resource and all
 339      * resources colocated with it, to determine whether a node has sufficient
 340      * capacity. Given a resource and a table of utilization values, it will add
 341      * the resource's utilization to the existing values, if the resource has
 342      * not yet been assigned to a node.
 343      *
 344      * \param[in]     rsc          Resource with utilization to add
 345      * \param[in]     orig_rsc     Resource being assigned (for logging only)
 346      * \param[in]     all_rscs     List of all resources that will be summed
 347      * \param[in,out] utilization  Table of utilization values to add to
 348      */
 349     void (*add_utilization)(const pcmk_resource_t *rsc,
 350                             const pcmk_resource_t *orig_rsc, GList *all_rscs,
 351                             GHashTable *utilization);
 352 
 353     /*!
 354      * \internal
 355      * \brief Apply a shutdown lock for a resource, if appropriate
 356      *
 357      * \param[in,out] rsc       Resource to check for shutdown lock
 358      */
 359     void (*shutdown_lock)(pcmk_resource_t *rsc);
 360 };
 361 
 362 // Actions (pcmk_sched_actions.c)
 363 
 364 G_GNUC_INTERNAL
 365 void pcmk__update_action_for_orderings(pcmk_action_t *action,
 366                                        pcmk_scheduler_t *scheduler);
 367 
 368 G_GNUC_INTERNAL
 369 uint32_t pcmk__update_ordered_actions(pcmk_action_t *first, pcmk_action_t *then,
 370                                       const pcmk_node_t *node, uint32_t flags,
 371                                       uint32_t filter, uint32_t type,
 372                                       pcmk_scheduler_t *scheduler);
 373 
 374 G_GNUC_INTERNAL
 375 void pcmk__log_action(const char *pre_text, const pcmk_action_t *action,
 376                       bool details);
 377 
 378 G_GNUC_INTERNAL
 379 pcmk_action_t *pcmk__new_cancel_action(pcmk_resource_t *rsc, const char *name,
 380                                        guint interval_ms,
 381                                        const pcmk_node_t *node);
 382 
 383 G_GNUC_INTERNAL
 384 pcmk_action_t *pcmk__new_shutdown_action(pcmk_node_t *node);
 385 
 386 G_GNUC_INTERNAL
 387 bool pcmk__action_locks_rsc_to_node(const pcmk_action_t *action);
 388 
 389 G_GNUC_INTERNAL
 390 void pcmk__deduplicate_action_inputs(pcmk_action_t *action);
 391 
 392 G_GNUC_INTERNAL
 393 void pcmk__output_actions(pcmk_scheduler_t *scheduler);
 394 
 395 G_GNUC_INTERNAL
 396 bool pcmk__check_action_config(pcmk_resource_t *rsc, pcmk_node_t *node,
 397                                const xmlNode *xml_op);
 398 
 399 G_GNUC_INTERNAL
 400 void pcmk__handle_rsc_config_changes(pcmk_scheduler_t *scheduler);
 401 
 402 
 403 // Recurring actions (pcmk_sched_recurring.c)
 404 
 405 G_GNUC_INTERNAL
 406 void pcmk__create_recurring_actions(pcmk_resource_t *rsc);
 407 
 408 G_GNUC_INTERNAL
 409 void pcmk__schedule_cancel(pcmk_resource_t *rsc, const char *call_id,
 410                            const char *task, guint interval_ms,
 411                            const pcmk_node_t *node, const char *reason);
 412 
 413 G_GNUC_INTERNAL
 414 void pcmk__reschedule_recurring(pcmk_resource_t *rsc, const char *task,
 415                                 guint interval_ms, pcmk_node_t *node);
 416 
 417 G_GNUC_INTERNAL
 418 bool pcmk__action_is_recurring(const pcmk_action_t *action);
 419 
 420 
 421 // Producing transition graphs (pcmk_graph_producer.c)
 422 
 423 G_GNUC_INTERNAL
 424 bool pcmk__graph_has_loop(const pcmk_action_t *init_action,
 425                           const pcmk_action_t *action,
 426                           pcmk__related_action_t *input);
 427 
 428 G_GNUC_INTERNAL
 429 void pcmk__add_rsc_actions_to_graph(pcmk_resource_t *rsc);
 430 
 431 G_GNUC_INTERNAL
 432 void pcmk__create_graph(pcmk_scheduler_t *scheduler);
 433 
 434 
 435 // Fencing (pcmk_sched_fencing.c)
 436 
 437 G_GNUC_INTERNAL
 438 void pcmk__order_vs_fence(pcmk_action_t *stonith_op,
 439                           pcmk_scheduler_t *scheduler);
 440 
 441 G_GNUC_INTERNAL
 442 void pcmk__order_vs_unfence(const pcmk_resource_t *rsc, pcmk_node_t *node,
 443                             pcmk_action_t *action,
 444                             enum pcmk__action_relation_flags order);
 445 
 446 G_GNUC_INTERNAL
 447 void pcmk__fence_guest(pcmk_node_t *node);
 448 
 449 G_GNUC_INTERNAL
 450 bool pcmk__node_unfenced(const pcmk_node_t *node);
 451 
 452 G_GNUC_INTERNAL
 453 void pcmk__order_restart_vs_unfence(gpointer data, gpointer user_data);
 454 
 455 
 456 // Injected scheduler inputs (pcmk_sched_injections.c)
 457 
 458 G_GNUC_INTERNAL
 459 void pcmk__inject_scheduler_input(pcmk_scheduler_t *scheduler, cib_t *cib,
 460                                   const pcmk_injections_t *injections);
 461 
 462 
 463 // Constraints of any type (pcmk_sched_constraints.c)
 464 
 465 G_GNUC_INTERNAL
 466 pcmk_resource_t *pcmk__find_constraint_resource(GList *rsc_list,
 467                                                 const char *id);
 468 
 469 G_GNUC_INTERNAL
 470 int pcmk__parse_constraint_role(const char *id, const char *role_spec,
 471                                 enum rsc_role_e *role);
 472 
 473 G_GNUC_INTERNAL
 474 xmlNode *pcmk__expand_tags_in_sets(xmlNode *xml_obj,
 475                                    const pcmk_scheduler_t *scheduler);
 476 
 477 G_GNUC_INTERNAL
 478 bool pcmk__valid_resource_or_tag(const pcmk_scheduler_t *scheduler,
 479                                  const char *id, pcmk_resource_t **rsc,
 480                                  pcmk__idref_t **tag);
 481 
 482 G_GNUC_INTERNAL
 483 bool pcmk__tag_to_set(xmlNode *xml_obj, xmlNode **rsc_set, const char *attr,
 484                       bool convert_rsc, const pcmk_scheduler_t *scheduler);
 485 
 486 G_GNUC_INTERNAL
 487 void pcmk__create_internal_constraints(pcmk_scheduler_t *scheduler);
 488 
 489 
 490 // Location constraints
 491 
 492 G_GNUC_INTERNAL
 493 void pcmk__unpack_location(xmlNode *xml_obj, pcmk_scheduler_t *scheduler);
 494 
 495 G_GNUC_INTERNAL
 496 pcmk__location_t *pcmk__new_location(const char *id, pcmk_resource_t *rsc,
 497                                      int node_score, const char *discover_mode,
 498                                      pcmk_node_t *foo_node);
 499 
 500 G_GNUC_INTERNAL
 501 void pcmk__apply_locations(pcmk_scheduler_t *scheduler);
 502 
 503 G_GNUC_INTERNAL
 504 void pcmk__apply_location(pcmk_resource_t *rsc, pcmk__location_t *constraint);
 505 
 506 
 507 // Colocation constraints (pcmk_sched_colocation.c)
 508 
 509 enum pcmk__coloc_affects {
 510     pcmk__coloc_affects_nothing = 0,
 511     pcmk__coloc_affects_location,
 512     pcmk__coloc_affects_role,
 513 };
 514 
 515 G_GNUC_INTERNAL
 516 const char *pcmk__colocation_node_attr(const pcmk_node_t *node,
 517                                        const char *attr,
 518                                        const pcmk_resource_t *rsc);
 519 
 520 G_GNUC_INTERNAL
 521 enum pcmk__coloc_affects pcmk__colocation_affects(const pcmk_resource_t
 522                                                     *dependent,
 523                                                   const pcmk_resource_t
 524                                                     *primary,
 525                                                   const pcmk__colocation_t
 526                                                     *colocation,
 527                                                   bool preview);
 528 
 529 G_GNUC_INTERNAL
 530 void pcmk__apply_coloc_to_scores(pcmk_resource_t *dependent,
 531                                  const pcmk_resource_t *primary,
 532                                  const pcmk__colocation_t *colocation);
 533 
 534 G_GNUC_INTERNAL
 535 int pcmk__apply_coloc_to_priority(pcmk_resource_t *dependent,
 536                                   const pcmk_resource_t *primary,
 537                                   const pcmk__colocation_t *colocation);
 538 
 539 G_GNUC_INTERNAL
 540 void pcmk__add_colocated_node_scores(pcmk_resource_t *source_rsc,
 541                                      const pcmk_resource_t *target_rsc,
 542                                      const char *log_id, GHashTable **nodes,
 543                                      const pcmk__colocation_t *colocation,
 544                                      float factor, uint32_t flags);
 545 
 546 G_GNUC_INTERNAL
 547 void pcmk__add_dependent_scores(gpointer data, gpointer user_data);
 548 
 549 G_GNUC_INTERNAL
 550 void pcmk__colocation_intersect_nodes(pcmk_resource_t *dependent,
 551                                       const pcmk_resource_t *primary,
 552                                       const pcmk__colocation_t *colocation,
 553                                       const GList *primary_nodes,
 554                                       bool merge_scores);
 555 
 556 G_GNUC_INTERNAL
 557 void pcmk__unpack_colocation(xmlNode *xml_obj, pcmk_scheduler_t *scheduler);
 558 
 559 G_GNUC_INTERNAL
 560 void pcmk__add_this_with(GList **list, const pcmk__colocation_t *colocation,
 561                          const pcmk_resource_t *rsc);
 562 
 563 G_GNUC_INTERNAL
 564 void pcmk__add_this_with_list(GList **list, GList *addition,
 565                               const pcmk_resource_t *rsc);
 566 
 567 G_GNUC_INTERNAL
 568 void pcmk__add_with_this(GList **list, const pcmk__colocation_t *colocation,
 569                          const pcmk_resource_t *rsc);
 570 
 571 G_GNUC_INTERNAL
 572 void pcmk__add_with_this_list(GList **list, GList *addition,
 573                               const pcmk_resource_t *rsc);
 574 
 575 G_GNUC_INTERNAL
 576 GList *pcmk__with_this_colocations(const pcmk_resource_t *rsc);
 577 
 578 G_GNUC_INTERNAL
 579 GList *pcmk__this_with_colocations(const pcmk_resource_t *rsc);
 580 
 581 G_GNUC_INTERNAL
 582 void pcmk__new_colocation(const char *id, const char *node_attr, int score,
 583                           pcmk_resource_t *dependent, pcmk_resource_t *primary,
 584                           const char *dependent_role_spec,
 585                           const char *primary_role_spec, uint32_t flags);
 586 
 587 G_GNUC_INTERNAL
 588 void pcmk__block_colocation_dependents(pcmk_action_t *action);
 589 
 590 G_GNUC_INTERNAL
 591 bool pcmk__colocation_has_influence(const pcmk__colocation_t *colocation,
 592                                     const pcmk_resource_t *rsc);
 593 
 594 
 595 // Ordering constraints (pcmk_sched_ordering.c)
 596 
 597 G_GNUC_INTERNAL
 598 void pcmk__new_ordering(pcmk_resource_t *first_rsc, char *first_task,
 599                         pcmk_action_t *first_action, pcmk_resource_t *then_rsc,
 600                         char *then_task, pcmk_action_t *then_action,
 601                         uint32_t flags, pcmk_scheduler_t *sched);
 602 
 603 G_GNUC_INTERNAL
 604 void pcmk__unpack_ordering(xmlNode *xml_obj, pcmk_scheduler_t *scheduler);
 605 
 606 G_GNUC_INTERNAL
 607 void pcmk__disable_invalid_orderings(pcmk_scheduler_t *scheduler);
 608 
 609 G_GNUC_INTERNAL
 610 void pcmk__order_stops_before_shutdown(pcmk_node_t *node,
 611                                        pcmk_action_t *shutdown_op);
 612 
 613 G_GNUC_INTERNAL
 614 void pcmk__apply_orderings(pcmk_scheduler_t *sched);
 615 
 616 G_GNUC_INTERNAL
 617 void pcmk__order_after_each(pcmk_action_t *after, GList *list);
 618 
 619 
 620 /*!
 621  * \internal
 622  * \brief Create a new ordering between two resource actions
 623  *
 624  * \param[in,out] first_rsc   Resource for 'first' action
 625  * \param[in,out] first_task  Action key for 'first' action
 626  * \param[in]     then_rsc    Resource for 'then' action
 627  * \param[in,out] then_task   Action key for 'then' action
 628  * \param[in]     flags       Group of enum pcmk__action_relation_flags
 629  */
 630 #define pcmk__order_resource_actions(first_rsc, first_task,                 \
 631                                      then_rsc, then_task, flags)            \
 632     pcmk__new_ordering((first_rsc),                                         \
 633                        pcmk__op_key((first_rsc)->id, (first_task), 0),      \
 634                        NULL,                                                \
 635                        (then_rsc),                                          \
 636                        pcmk__op_key((then_rsc)->id, (then_task), 0),        \
 637                        NULL, (flags), (first_rsc)->priv->scheduler)
 638 
 639 #define pcmk__order_starts(rsc1, rsc2, flags)                \
 640     pcmk__order_resource_actions((rsc1), PCMK_ACTION_START,  \
 641                                  (rsc2), PCMK_ACTION_START, (flags))
 642 
 643 #define pcmk__order_stops(rsc1, rsc2, flags)                 \
 644     pcmk__order_resource_actions((rsc1), PCMK_ACTION_STOP,   \
 645                                  (rsc2), PCMK_ACTION_STOP, (flags))
 646 
 647 
 648 // Ticket constraints (pcmk_sched_tickets.c)
 649 
 650 G_GNUC_INTERNAL
 651 void pcmk__unpack_rsc_ticket(xmlNode *xml_obj, pcmk_scheduler_t *scheduler);
 652 
 653 
 654 // Promotable clone resources (pcmk_sched_promotable.c)
 655 
 656 G_GNUC_INTERNAL
 657 void pcmk__add_promotion_scores(pcmk_resource_t *rsc);
 658 
 659 G_GNUC_INTERNAL
 660 void pcmk__require_promotion_tickets(pcmk_resource_t *rsc);
 661 
 662 G_GNUC_INTERNAL
 663 void pcmk__set_instance_roles(pcmk_resource_t *rsc);
 664 
 665 G_GNUC_INTERNAL
 666 void pcmk__create_promotable_actions(pcmk_resource_t *clone);
 667 
 668 G_GNUC_INTERNAL
 669 void pcmk__promotable_restart_ordering(pcmk_resource_t *rsc);
 670 
 671 G_GNUC_INTERNAL
 672 void pcmk__order_promotable_instances(pcmk_resource_t *clone);
 673 
 674 G_GNUC_INTERNAL
 675 void pcmk__update_dependent_with_promotable(const pcmk_resource_t *primary,
 676                                             pcmk_resource_t *dependent,
 677                                             const pcmk__colocation_t
 678                                                 *colocation);
 679 
 680 G_GNUC_INTERNAL
 681 int pcmk__update_promotable_dependent_priority(const pcmk_resource_t *primary,
 682                                                pcmk_resource_t *dependent,
 683                                                const pcmk__colocation_t
 684                                                    *colocation);
 685 
 686 
 687 // Pacemaker Remote nodes (pcmk_sched_remote.c)
 688 
 689 G_GNUC_INTERNAL
 690 bool pcmk__is_failed_remote_node(const pcmk_node_t *node);
 691 
 692 G_GNUC_INTERNAL
 693 void pcmk__order_remote_connection_actions(pcmk_scheduler_t *scheduler);
 694 
 695 G_GNUC_INTERNAL
 696 bool pcmk__rsc_corresponds_to_guest(const pcmk_resource_t *rsc,
 697                                     const pcmk_node_t *node);
 698 
 699 G_GNUC_INTERNAL
 700 pcmk_node_t *pcmk__connection_host_for_action(const pcmk_action_t *action);
 701 
 702 G_GNUC_INTERNAL
 703 void pcmk__substitute_remote_addr(pcmk_resource_t *rsc, GHashTable *params);
 704 
 705 G_GNUC_INTERNAL
 706 void pcmk__add_guest_meta_to_xml(xmlNode *args_xml,
 707                                  const pcmk_action_t *action);
 708 
 709 
 710 // Primitives (pcmk_sched_primitive.c)
 711 
 712 G_GNUC_INTERNAL
 713 pcmk_node_t *pcmk__primitive_assign(pcmk_resource_t *rsc,
 714                                     const pcmk_node_t *prefer,
 715                                     bool stop_if_fail);
 716 
 717 G_GNUC_INTERNAL
 718 void pcmk__primitive_create_actions(pcmk_resource_t *rsc);
 719 
 720 G_GNUC_INTERNAL
 721 void pcmk__primitive_internal_constraints(pcmk_resource_t *rsc);
 722 
 723 G_GNUC_INTERNAL
 724 uint32_t pcmk__primitive_action_flags(pcmk_action_t *action,
 725                                       const pcmk_node_t *node);
 726 
 727 G_GNUC_INTERNAL
 728 int pcmk__primitive_apply_coloc_score(pcmk_resource_t *dependent,
 729                                       const pcmk_resource_t *primary,
 730                                       const pcmk__colocation_t *colocation,
 731                                       bool for_dependent);
 732 
 733 G_GNUC_INTERNAL
 734 void pcmk__with_primitive_colocations(const pcmk_resource_t *rsc,
 735                                       const pcmk_resource_t *orig_rsc,
 736                                       GList **list);
 737 
 738 G_GNUC_INTERNAL
 739 void pcmk__primitive_with_colocations(const pcmk_resource_t *rsc,
 740                                       const pcmk_resource_t *orig_rsc,
 741                                       GList **list);
 742 
 743 G_GNUC_INTERNAL
 744 void pcmk__schedule_cleanup(pcmk_resource_t *rsc, const pcmk_node_t *node,
 745                             bool optional);
 746 
 747 G_GNUC_INTERNAL
 748 void pcmk__primitive_add_graph_meta(const pcmk_resource_t *rsc, xmlNode *xml);
 749 
 750 G_GNUC_INTERNAL
 751 void pcmk__primitive_add_utilization(const pcmk_resource_t *rsc,
 752                                      const pcmk_resource_t *orig_rsc,
 753                                      GList *all_rscs, GHashTable *utilization);
 754 
 755 G_GNUC_INTERNAL
 756 void pcmk__primitive_shutdown_lock(pcmk_resource_t *rsc);
 757 
 758 
 759 // Groups (pcmk_sched_group.c)
 760 
 761 G_GNUC_INTERNAL
 762 pcmk_node_t *pcmk__group_assign(pcmk_resource_t *rsc, const pcmk_node_t *prefer,
 763                                 bool stop_if_fail);
 764 
 765 G_GNUC_INTERNAL
 766 void pcmk__group_create_actions(pcmk_resource_t *rsc);
 767 
 768 G_GNUC_INTERNAL
 769 void pcmk__group_internal_constraints(pcmk_resource_t *rsc);
 770 
 771 G_GNUC_INTERNAL
 772 int pcmk__group_apply_coloc_score(pcmk_resource_t *dependent,
 773                                   const pcmk_resource_t *primary,
 774                                   const pcmk__colocation_t *colocation,
 775                                   bool for_dependent);
 776 
 777 G_GNUC_INTERNAL
 778 void pcmk__with_group_colocations(const pcmk_resource_t *rsc,
 779                                   const pcmk_resource_t *orig_rsc,
 780                                   GList **list);
 781 
 782 G_GNUC_INTERNAL
 783 void pcmk__group_with_colocations(const pcmk_resource_t *rsc,
 784                                   const pcmk_resource_t *orig_rsc,
 785                                   GList **list);
 786 
 787 G_GNUC_INTERNAL
 788 void pcmk__group_add_colocated_node_scores(pcmk_resource_t *source_rsc,
 789                                            const pcmk_resource_t *target_rsc,
 790                                            const char *log_id,
 791                                            GHashTable **nodes,
 792                                            const pcmk__colocation_t *colocation,
 793                                            float factor, uint32_t flags);
 794 
 795 G_GNUC_INTERNAL
 796 void pcmk__group_apply_location(pcmk_resource_t *rsc,
 797                                 pcmk__location_t *location);
 798 
 799 G_GNUC_INTERNAL
 800 uint32_t pcmk__group_action_flags(pcmk_action_t *action,
 801                                   const pcmk_node_t *node);
 802 
 803 G_GNUC_INTERNAL
 804 uint32_t pcmk__group_update_ordered_actions(pcmk_action_t *first,
 805                                             pcmk_action_t *then,
 806                                             const pcmk_node_t *node,
 807                                             uint32_t flags, uint32_t filter,
 808                                             uint32_t type,
 809                                             pcmk_scheduler_t *scheduler);
 810 
 811 G_GNUC_INTERNAL
 812 GList *pcmk__group_colocated_resources(const pcmk_resource_t *rsc,
 813                                        const pcmk_resource_t *orig_rsc,
 814                                        GList *colocated_rscs);
 815 
 816 G_GNUC_INTERNAL
 817 void pcmk__group_add_utilization(const pcmk_resource_t *rsc,
 818                                  const pcmk_resource_t *orig_rsc,
 819                                  GList *all_rscs, GHashTable *utilization);
 820 
 821 G_GNUC_INTERNAL
 822 void pcmk__group_shutdown_lock(pcmk_resource_t *rsc);
 823 
 824 
 825 // Clones (pcmk_sched_clone.c)
 826 
 827 G_GNUC_INTERNAL
 828 pcmk_node_t *pcmk__clone_assign(pcmk_resource_t *rsc, const pcmk_node_t *prefer,
 829                                 bool stop_if_fail);
 830 
 831 G_GNUC_INTERNAL
 832 void pcmk__clone_create_actions(pcmk_resource_t *rsc);
 833 
 834 G_GNUC_INTERNAL
 835 bool pcmk__clone_create_probe(pcmk_resource_t *rsc, pcmk_node_t *node);
 836 
 837 G_GNUC_INTERNAL
 838 void pcmk__clone_internal_constraints(pcmk_resource_t *rsc);
 839 
 840 G_GNUC_INTERNAL
 841 int pcmk__clone_apply_coloc_score(pcmk_resource_t *dependent,
 842                                   const pcmk_resource_t *primary,
 843                                   const pcmk__colocation_t *colocation,
 844                                   bool for_dependent);
 845 
 846 G_GNUC_INTERNAL
 847 void pcmk__with_clone_colocations(const pcmk_resource_t *rsc,
 848                                   const pcmk_resource_t *orig_rsc,
 849                                   GList **list);
 850 
 851 G_GNUC_INTERNAL
 852 void pcmk__clone_with_colocations(const pcmk_resource_t *rsc,
 853                                   const pcmk_resource_t *orig_rsc,
 854                                   GList **list);
 855 
 856 G_GNUC_INTERNAL
 857 void pcmk__clone_apply_location(pcmk_resource_t *rsc,
 858                                 pcmk__location_t *constraint);
 859 
 860 G_GNUC_INTERNAL
 861 uint32_t pcmk__clone_action_flags(pcmk_action_t *action,
 862                                   const pcmk_node_t *node);
 863 
 864 G_GNUC_INTERNAL
 865 void pcmk__clone_add_actions_to_graph(pcmk_resource_t *rsc);
 866 
 867 G_GNUC_INTERNAL
 868 void pcmk__clone_add_graph_meta(const pcmk_resource_t *rsc, xmlNode *xml);
 869 
 870 G_GNUC_INTERNAL
 871 void pcmk__clone_add_utilization(const pcmk_resource_t *rsc,
 872                                  const pcmk_resource_t *orig_rsc,
 873                                  GList *all_rscs, GHashTable *utilization);
 874 
 875 G_GNUC_INTERNAL
 876 void pcmk__clone_shutdown_lock(pcmk_resource_t *rsc);
 877 
 878 // Bundles (pcmk_sched_bundle.c)
 879 
 880 G_GNUC_INTERNAL
 881 pcmk_node_t *pcmk__bundle_assign(pcmk_resource_t *rsc,
 882                                  const pcmk_node_t *prefer, bool stop_if_fail);
 883 
 884 G_GNUC_INTERNAL
 885 void pcmk__bundle_create_actions(pcmk_resource_t *rsc);
 886 
 887 G_GNUC_INTERNAL
 888 bool pcmk__bundle_create_probe(pcmk_resource_t *rsc, pcmk_node_t *node);
 889 
 890 G_GNUC_INTERNAL
 891 void pcmk__bundle_internal_constraints(pcmk_resource_t *rsc);
 892 
 893 G_GNUC_INTERNAL
 894 int pcmk__bundle_apply_coloc_score(pcmk_resource_t *dependent,
 895                                    const pcmk_resource_t *primary,
 896                                    const pcmk__colocation_t *colocation,
 897                                    bool for_dependent);
 898 
 899 G_GNUC_INTERNAL
 900 void pcmk__with_bundle_colocations(const pcmk_resource_t *rsc,
 901                                    const pcmk_resource_t *orig_rsc,
 902                                    GList **list);
 903 
 904 G_GNUC_INTERNAL
 905 void pcmk__bundle_with_colocations(const pcmk_resource_t *rsc,
 906                                    const pcmk_resource_t *orig_rsc,
 907                                    GList **list);
 908 
 909 G_GNUC_INTERNAL
 910 void pcmk__bundle_apply_location(pcmk_resource_t *rsc,
 911                                  pcmk__location_t *constraint);
 912 
 913 G_GNUC_INTERNAL
 914 uint32_t pcmk__bundle_action_flags(pcmk_action_t *action,
 915                                    const pcmk_node_t *node);
 916 
 917 G_GNUC_INTERNAL
 918 void pcmk__output_bundle_actions(pcmk_resource_t *rsc);
 919 
 920 G_GNUC_INTERNAL
 921 void pcmk__bundle_add_actions_to_graph(pcmk_resource_t *rsc);
 922 
 923 G_GNUC_INTERNAL
 924 void pcmk__bundle_add_utilization(const pcmk_resource_t *rsc,
 925                                   const pcmk_resource_t *orig_rsc,
 926                                   GList *all_rscs, GHashTable *utilization);
 927 
 928 G_GNUC_INTERNAL
 929 void pcmk__bundle_shutdown_lock(pcmk_resource_t *rsc);
 930 
 931 
 932 // Clone instances or bundle replica containers (pcmk_sched_instances.c)
 933 
 934 G_GNUC_INTERNAL
 935 void pcmk__assign_instances(pcmk_resource_t *collective, GList *instances,
 936                             int max_total, int max_per_node);
 937 
 938 G_GNUC_INTERNAL
 939 void pcmk__create_instance_actions(pcmk_resource_t *rsc, GList *instances);
 940 
 941 G_GNUC_INTERNAL
 942 bool pcmk__instance_matches(const pcmk_resource_t *instance,
 943                             const pcmk_node_t *node, enum rsc_role_e role,
 944                             bool current);
 945 
 946 G_GNUC_INTERNAL
 947 pcmk_resource_t *pcmk__find_compatible_instance(const pcmk_resource_t *match_rsc,
 948                                                 const pcmk_resource_t *rsc,
 949                                                 enum rsc_role_e role,
 950                                                 bool current);
 951 
 952 G_GNUC_INTERNAL
 953 uint32_t pcmk__instance_update_ordered_actions(pcmk_action_t *first,
 954                                                pcmk_action_t *then,
 955                                                const pcmk_node_t *node,
 956                                                uint32_t flags, uint32_t filter,
 957                                                uint32_t type,
 958                                                pcmk_scheduler_t *scheduler);
 959 
 960 G_GNUC_INTERNAL
 961 uint32_t pcmk__collective_action_flags(pcmk_action_t *action,
 962                                        const GList *instances,
 963                                        const pcmk_node_t *node);
 964 
 965 
 966 // Injections (pcmk_injections.c)
 967 
 968 G_GNUC_INTERNAL
 969 xmlNode *pcmk__inject_node(cib_t *cib_conn, const char *node, const char *uuid);
 970 
 971 G_GNUC_INTERNAL
 972 xmlNode *pcmk__inject_node_state_change(cib_t *cib_conn, const char *node,
 973                                         bool up);
 974 
 975 G_GNUC_INTERNAL
 976 xmlNode *pcmk__inject_resource_history(pcmk__output_t *out, xmlNode *cib_node,
 977                                        const char *resource,
 978                                        const char *lrm_name,
 979                                        const char *rclass,
 980                                        const char *rtype,
 981                                        const char *rprovider);
 982 
 983 G_GNUC_INTERNAL
 984 void pcmk__inject_failcount(pcmk__output_t *out, cib_t *cib_conn,
 985                             xmlNode *cib_node, const char *resource,
 986                             const char *task, guint interval_ms, int rc,
 987                             bool infinity);
 988 
 989 G_GNUC_INTERNAL
 990 xmlNode *pcmk__inject_action_result(xmlNode *cib_resource,
 991                                     lrmd_event_data_t *op, const char *node,
 992                                     int target_rc);
 993 
 994 
 995 // Nodes (pcmk_sched_nodes.c)
 996 
 997 G_GNUC_INTERNAL
 998 bool pcmk__node_available(const pcmk_node_t *node, bool consider_score,
 999                           bool consider_guest);
1000 
1001 G_GNUC_INTERNAL
1002 bool pcmk__any_node_available(GHashTable *nodes);
1003 
1004 G_GNUC_INTERNAL
1005 GHashTable *pcmk__copy_node_table(GHashTable *nodes);
1006 
1007 G_GNUC_INTERNAL
1008 void pcmk__copy_node_tables(const pcmk_resource_t *rsc, GHashTable **copy);
1009 
1010 G_GNUC_INTERNAL
1011 void pcmk__restore_node_tables(pcmk_resource_t *rsc, GHashTable *backup);
1012 
1013 G_GNUC_INTERNAL
1014 GList *pcmk__sort_nodes(GList *nodes, pcmk_node_t *active_node);
1015 
1016 G_GNUC_INTERNAL
1017 void pcmk__apply_node_health(pcmk_scheduler_t *scheduler);
1018 
1019 G_GNUC_INTERNAL
1020 pcmk_node_t *pcmk__top_allowed_node(const pcmk_resource_t *rsc,
1021                                     const pcmk_node_t *node);
1022 
1023 
1024 // Functions applying to more than one variant (pcmk_sched_resource.c)
1025 
1026 G_GNUC_INTERNAL
1027 void pcmk__set_assignment_methods(pcmk_scheduler_t *scheduler);
1028 
1029 G_GNUC_INTERNAL
1030 bool pcmk__rsc_agent_changed(pcmk_resource_t *rsc, pcmk_node_t *node,
1031                              const xmlNode *rsc_entry, bool active_on_node);
1032 
1033 G_GNUC_INTERNAL
1034 GList *pcmk__rscs_matching_id(const char *id,
1035                               const pcmk_scheduler_t *scheduler);
1036 
1037 G_GNUC_INTERNAL
1038 GList *pcmk__colocated_resources(const pcmk_resource_t *rsc,
1039                                  const pcmk_resource_t *orig_rsc,
1040                                  GList *colocated_rscs);
1041 
1042 G_GNUC_INTERNAL
1043 void pcmk__noop_add_graph_meta(const pcmk_resource_t *rsc, xmlNode *xml);
1044 
1045 G_GNUC_INTERNAL
1046 void pcmk__output_resource_actions(pcmk_resource_t *rsc);
1047 
1048 G_GNUC_INTERNAL
1049 bool pcmk__assign_resource(pcmk_resource_t *rsc, pcmk_node_t *node, bool force,
1050                            bool stop_if_fail);
1051 
1052 G_GNUC_INTERNAL
1053 void pcmk__unassign_resource(pcmk_resource_t *rsc);
1054 
1055 G_GNUC_INTERNAL
1056 bool pcmk__threshold_reached(pcmk_resource_t *rsc, const pcmk_node_t *node,
1057                              pcmk_resource_t **failed);
1058 
1059 G_GNUC_INTERNAL
1060 void pcmk__sort_resources(pcmk_scheduler_t *scheduler);
1061 
1062 G_GNUC_INTERNAL
1063 gint pcmk__cmp_instance(gconstpointer a, gconstpointer b);
1064 
1065 G_GNUC_INTERNAL
1066 gint pcmk__cmp_instance_number(gconstpointer a, gconstpointer b);
1067 
1068 
1069 // Functions related to probes (pcmk_sched_probes.c)
1070 
1071 G_GNUC_INTERNAL
1072 bool pcmk__probe_rsc_on_node(pcmk_resource_t *rsc, pcmk_node_t *node);
1073 
1074 G_GNUC_INTERNAL
1075 void pcmk__order_probes(pcmk_scheduler_t *scheduler);
1076 
1077 G_GNUC_INTERNAL
1078 bool pcmk__probe_resource_list(GList *rscs, pcmk_node_t *node);
1079 
1080 G_GNUC_INTERNAL
1081 void pcmk__schedule_probes(pcmk_scheduler_t *scheduler);
1082 
1083 
1084 // Functions related to live migration (pcmk_sched_migration.c)
1085 
1086 void pcmk__create_migration_actions(pcmk_resource_t *rsc,
1087                                     const pcmk_node_t *current);
1088 
1089 void pcmk__abort_dangling_migration(void *data, void *user_data);
1090 
1091 bool pcmk__rsc_can_migrate(const pcmk_resource_t *rsc,
1092                            const pcmk_node_t *current);
1093 
1094 void pcmk__order_migration_equivalents(pcmk__action_relation_t *order);
1095 
1096 
1097 // Functions related to node utilization (pcmk_sched_utilization.c)
1098 
1099 G_GNUC_INTERNAL
1100 int pcmk__compare_node_capacities(const pcmk_node_t *node1,
1101                                   const pcmk_node_t *node2);
1102 
1103 G_GNUC_INTERNAL
1104 void pcmk__consume_node_capacity(GHashTable *current_utilization,
1105                                  const pcmk_resource_t *rsc);
1106 
1107 G_GNUC_INTERNAL
1108 void pcmk__release_node_capacity(GHashTable *current_utilization,
1109                                  const pcmk_resource_t *rsc);
1110 
1111 G_GNUC_INTERNAL
1112 const pcmk_node_t *pcmk__ban_insufficient_capacity(pcmk_resource_t *rsc);
1113 
1114 G_GNUC_INTERNAL
1115 void pcmk__create_utilization_constraints(pcmk_resource_t *rsc,
1116                                           const GList *allowed_nodes);
1117 
1118 G_GNUC_INTERNAL
1119 void pcmk__show_node_capacities(const char *desc, pcmk_scheduler_t *scheduler);
1120 
1121 
1122 // Functions related to the scheduler (pcmk_scheduler.c)
1123 
1124 G_GNUC_INTERNAL
1125 int pcmk__init_scheduler(pcmk__output_t *out, xmlNodePtr input, const crm_time_t *date,
1126                          pcmk_scheduler_t **scheduler);
1127 
1128 
1129 // General setup functions (pcmk_setup.c)
1130 
1131 G_GNUC_INTERNAL
1132 int pcmk__setup_output_cib_sched(pcmk__output_t **out, cib_t **cib,
1133                                  pcmk_scheduler_t **scheduler, xmlNode **xml);
1134 
1135 G_GNUC_INTERNAL
1136 int pcmk__setup_output_fencing(pcmk__output_t **out, stonith_t **st, xmlNode **xml);
1137 
1138 #ifdef __cplusplus
1139 }
1140 #endif
1141 
1142 #endif // PCMK__PACEMAKER_LIBPACEMAKER_PRIVATE__H

/* [previous][next][first][last][top][bottom][index][help] */