pacemaker 2.1.1-77db578727
Scalable High-Availability cluster resource manager
Loading...
Searching...
No Matches
pcmki_scheduler.h
Go to the documentation of this file.
1/*
2 * Copyright 2014-2021 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 PENGINE__H
11# define PENGINE__H
12
14typedef struct lrm_agent_s lrm_agent_t;
15
16# include <glib.h>
17# include <crm/crm.h>
18# include <crm/common/iso8601.h>
19# include <crm/pengine/rules.h>
20# include <crm/pengine/common.h>
21# include <crm/pengine/status.h>
22
23# include <crm/pengine/complex.h>
24
30
38
39typedef struct {
40 const char *id;
41 const char *node_attribute;
44
47
48 int score;
49 bool influence; // Whether rsc_lh should influence active rsc_rh placement
51
58
67
68extern gboolean stage0(pe_working_set_t * data_set);
69extern gboolean probe_resources(pe_working_set_t * data_set);
70extern gboolean stage2(pe_working_set_t * data_set);
71extern gboolean stage3(pe_working_set_t * data_set);
72extern gboolean stage4(pe_working_set_t * data_set);
73extern gboolean stage5(pe_working_set_t * data_set);
74extern gboolean stage6(pe_working_set_t * data_set);
75extern gboolean stage7(pe_working_set_t * data_set);
76extern gboolean stage8(pe_working_set_t * data_set);
77
78extern gboolean summary(GList *resources);
79
80extern gboolean unpack_constraints(xmlNode * xml_constraints, pe_working_set_t * data_set);
81
82extern gboolean shutdown_constraints(pe_node_t * node, pe_action_t * shutdown_op,
83 pe_working_set_t * data_set);
84
85void pcmk__order_vs_fence(pe_action_t *stonith_op, pe_working_set_t *data_set);
86
87extern int custom_action_order(pe_resource_t * lh_rsc, char *lh_task, pe_action_t * lh_action,
88 pe_resource_t * rh_rsc, char *rh_task, pe_action_t * rh_action,
89 enum pe_ordering type, pe_working_set_t * data_set);
90
91extern int new_rsc_order(pe_resource_t * lh_rsc, const char *lh_task,
92 pe_resource_t * rh_rsc, const char *rh_task,
93 enum pe_ordering type, pe_working_set_t * data_set);
94
95# define order_start_start(rsc1,rsc2, type) \
96 new_rsc_order(rsc1, CRMD_ACTION_START, rsc2, CRMD_ACTION_START, type, data_set)
97# define order_stop_stop(rsc1, rsc2, type) \
98 new_rsc_order(rsc1, CRMD_ACTION_STOP, rsc2, CRMD_ACTION_STOP, type, data_set)
99
101extern void add_maintenance_update(pe_working_set_t *data_set);
102xmlNode *pcmk__schedule_actions(pe_working_set_t *data_set, xmlNode *xml_input,
103 crm_time_t *now);
105
106extern const char *transition_idle_timeout;
107
120static inline bool
121pcmk__colocation_has_influence(const pcmk__colocation_t *colocation,
122 const pe_resource_t *rsc)
123{
124 if (rsc == NULL) {
125 rsc = colocation->rsc_rh;
126 }
127
128 /* The left hand of a colocation influences the right hand's location
129 * if the influence option is true, or the right hand is not yet active.
130 */
131 return colocation->influence || (rsc->running_on == NULL);
132}
133
134#endif
enum crm_ais_msg_types type
Definition cpg.c:3
A dumping ground.
ISO_8601 Date handling.
struct crm_time_s crm_time_t
Definition iso8601.h:32
const char * action
Definition pcmk_fence.c:30
gboolean shutdown_constraints(pe_node_t *node, pe_action_t *shutdown_op, pe_working_set_t *data_set)
xmlNode * pcmk__schedule_actions(pe_working_set_t *data_set, xmlNode *xml_input, crm_time_t *now)
void graph_element_from_action(pe_action_t *action, pe_working_set_t *data_set)
gboolean stage3(pe_working_set_t *data_set)
gboolean stage8(pe_working_set_t *data_set)
pe_stop_fail
@ pesf_block
@ pesf_stonith
@ pesf_ignore
gboolean stage4(pe_working_set_t *data_set)
gboolean stage5(pe_working_set_t *data_set)
void pcmk__order_vs_fence(pe_action_t *stonith_op, pe_working_set_t *data_set)
bool pcmk__ordering_is_invalid(pe_action_t *action, pe_action_wrapper_t *input)
gboolean stage7(pe_working_set_t *data_set)
gboolean summary(GList *resources)
struct lrm_agent_s lrm_agent_t
int new_rsc_order(pe_resource_t *lh_rsc, const char *lh_task, pe_resource_t *rh_rsc, const char *rh_task, enum pe_ordering type, pe_working_set_t *data_set)
const char * transition_idle_timeout
int custom_action_order(pe_resource_t *lh_rsc, char *lh_task, pe_action_t *lh_action, pe_resource_t *rh_rsc, char *rh_task, pe_action_t *rh_action, enum pe_ordering type, pe_working_set_t *data_set)
void add_maintenance_update(pe_working_set_t *data_set)
gboolean stage6(pe_working_set_t *data_set)
gboolean probe_resources(pe_working_set_t *data_set)
gboolean stage2(pe_working_set_t *data_set)
gboolean unpack_constraints(xmlNode *xml_constraints, pe_working_set_t *data_set)
gboolean stage0(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
pe_ordering
Definition pe_types.h:484
Cluster status and scheduling.
pe_resource_t * rsc_lh
const char * node_attribute
pe_resource_t * rsc_rh
GList * running_on
Definition pe_types.h:367
enum loss_ticket_policy_e loss_policy
const char * id
pe_resource_t * rsc_lh
pe_ticket_t * ticket