pacemaker 2.1.4-dc6eb4362e
Scalable High-Availability cluster resource manager
pcmki_scheduler.h
Go to the documentation of this file.
1/*
2 * Copyright 2014-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__PCMKI_PCMKI_SCHEDULER__H
11# define PCMK__PCMKI_PCMKI_SCHEDULER__H
12
14
15# include <glib.h>
16# include <crm/crm.h>
17# include <crm/common/iso8601.h>
18# include <crm/pengine/rules.h>
19# include <crm/pengine/common.h>
20# include <crm/pengine/status.h>
21
22# include <crm/pengine/complex.h>
23
30};
31
32typedef struct {
33 const char *id;
34 const char *node_attribute;
35 pe_resource_t *dependent; // The resource being colocated
36 pe_resource_t *primary; // The resource the dependent is colocated with
37
38 int dependent_role; // Colocation applies only if dependent has this role
39 int primary_role; // Colocation applies only if primary has this role
40
41 int score;
42 bool influence; // Whether dependent influences active primary placement
44
50};
51
53 const char *id;
57
59};
60
62
64void pcmk__schedule_actions(xmlNode *cib, unsigned long long flags,
66
67extern const char *transition_idle_timeout;
68
81static inline bool
82pcmk__colocation_has_influence(const pcmk__colocation_t *colocation,
83 const pe_resource_t *rsc)
84{
85 if (rsc == NULL) {
86 rsc = colocation->primary;
87 }
88
89 /* The left hand of a colocation influences the right hand's location
90 * if the influence option is true, or the right hand is not yet active.
91 */
92 return colocation->influence || (rsc->running_on == NULL);
93}
94
95#endif
uint64_t flags
Definition: remote.c:3
A dumping ground.
ISO_8601 Date handling.
pe_working_set_t * data_set
void pcmk__schedule_actions(xmlNode *cib, unsigned long long flags, pe_working_set_t *data_set)
void pcmk__unpack_constraints(pe_working_set_t *data_set)
const char * transition_idle_timeout
void add_maintenance_update(pe_working_set_t *data_set)
loss_ticket_policy_e
@ loss_ticket_fence
@ loss_ticket_demote
@ loss_ticket_freeze
@ loss_ticket_stop
pe_weights
@ pe_weights_positive
@ pe_weights_init
@ pe_weights_forward
@ pe_weights_rollback
@ pe_weights_none
Cluster status and scheduling.
pe_resource_t * primary
const char * node_attribute
pe_resource_t * dependent
GList * running_on
Definition: pe_types.h:380
enum loss_ticket_policy_e loss_policy
const char * id
pe_resource_t * rsc_lh
pe_ticket_t * ticket