pacemaker 2.1.7-2.1.7
Scalable High-Availability cluster resource manager
Loading...
Searching...
No Matches
scheduler.h
Go to the documentation of this file.
1/*
2 * Copyright 2004-2023 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__CRM_COMMON_SCHEDULER__H
11# define PCMK__CRM_COMMON_SCHEDULER__H
12
13#include <sys/types.h> // time_t
14#include <libxml/tree.h> // xmlNode
15#include <glib.h> // guint, GList, GHashTable
16
17#include <crm/common/iso8601.h> // crm_time_t
18
19#include <crm/common/actions.h>
20#include <crm/common/nodes.h>
22#include <crm/common/roles.h>
24#include <crm/common/tags.h>
25#include <crm/common/tickets.h>
26
27#ifdef __cplusplus
28extern "C" {
29#endif
30
39 pcmk_no_quorum_freeze, //<! Do not recover resources from outside partition
40 pcmk_no_quorum_stop, //<! Stop all resources in partition
41 pcmk_no_quorum_ignore, //<! Act as if partition still holds quorum
42 pcmk_no_quorum_fence, //<! Fence all nodes in partition
43 pcmk_no_quorum_demote, //<! Demote promotable resources and stop all others
44
45#if !defined(PCMK_ALLOW_DEPRECATED) || (PCMK_ALLOW_DEPRECATED == 1)
48
51
54
57
60#endif
61};
62
67
68 // These flags are dynamically determined conditions
69
71 pcmk_sched_quorate = (1ULL << 0),
72
75
78
81
84
87
90
96
102
104 pcmk_sched_stop_all = (1ULL << 10),
105
111
114
117
123
129
132
135
136 // The remaining flags are scheduling options that must be set explicitly
137
144
146 pcmk_sched_sanitized = (1ULL << 21),
147
149 pcmk_sched_no_counts = (1ULL << 23),
150
155 pcmk_sched_no_compat = (1ULL << 24),
156
159
162
169};
170
173 // Be careful about when each piece of information is available and final
174
175 xmlNode *input;
177 char *dc_uuid;
179 const char *stonith_action;
180 const char *placement_strategy;
181
182 // @COMPAT Change to uint64_t at a compatibility break
183 unsigned long long flags;
184
187 GHashTable *config_hash;
188
190 GHashTable *tickets;
191
193 GHashTable *singletons;
194
195 GList *nodes;
196 GList *resources;
200
203
204 GList *actions;
205 xmlNode *failed;
206 xmlNode *op_defaults;
207 xmlNode *rsc_defaults;
212 xmlNode *graph;
213 GHashTable *template_rsc_sets;
214
215 // @COMPAT Replace this with a fencer variable (only place it's used)
216 const char *localhost;
217
218 GHashTable *tags;
221 GList *param_check;
222 GList *stop_needed;
223 time_t recheck_by;
227
228 // pcmk__output_t *
229 void *priv;
230
232};
233
234#ifdef __cplusplus
235}
236#endif
237
238#endif // PCMK__CRM_COMMON_SCHEDULER__H
APIs related to actions.
ISO_8601 Date handling.
struct crm_time_s crm_time_t
Definition iso8601.h:32
Scheduler API for nodes.
Scheduler API for resources.
Scheduler API for resource roles.
pe_quorum_policy
Possible responses to loss of quorum.
Definition scheduler.h:38
@ pcmk_no_quorum_freeze
Definition scheduler.h:39
@ pcmk_no_quorum_stop
Definition scheduler.h:40
@ pcmk_no_quorum_ignore
Definition scheduler.h:41
@ no_quorum_suicide
Definition scheduler.h:56
@ no_quorum_demote
Definition scheduler.h:59
@ no_quorum_freeze
Definition scheduler.h:47
@ no_quorum_ignore
Definition scheduler.h:53
@ no_quorum_stop
Definition scheduler.h:50
@ pcmk_no_quorum_demote
Definition scheduler.h:43
@ pcmk_no_quorum_fence
Definition scheduler.h:42
pcmk_scheduler_flags
Scheduling options and conditions.
Definition scheduler.h:64
@ pcmk_sched_stop_removed_resources
Definition scheduler.h:95
@ pcmk_sched_sanitized
Whether sensitive resource attributes have been masked.
Definition scheduler.h:146
@ pcmk_sched_in_maintenance
Whether cluster is in maintenance mode (via maintenance-mode property)
Definition scheduler.h:77
@ pcmk_sched_symmetric_cluster
Whether cluster is symmetric (via symmetric-cluster property)
Definition scheduler.h:74
@ pcmk_sched_fencing_enabled
Whether fencing is enabled (via stonith-enabled property)
Definition scheduler.h:80
@ pcmk_sched_probe_resources
Definition scheduler.h:128
@ pcmk_sched_have_remote_nodes
Whether the cluster includes any Pacemaker Remote nodes (via CIB)
Definition scheduler.h:134
@ pcmk_sched_no_compat
Definition scheduler.h:155
@ pcmk_sched_have_fencing
Whether cluster has a fencing resource (via CIB resources)
Definition scheduler.h:83
@ pcmk_sched_shutdown_lock
Definition scheduler.h:122
@ pcmk_sched_no_counts
Skip counting of total, disabled, and blocked resource instances.
Definition scheduler.h:149
@ pcmk_sched_location_only
Definition scheduler.h:143
@ pcmk_sched_quorate
Whether partition has quorum (via have-quorum property)
Definition scheduler.h:71
@ pcmk_sched_concurrent_fencing
Whether concurrent fencing is allowed (via concurrent-fencing property)
Definition scheduler.h:89
@ pcmk_sched_none
No scheduler flags set (compare with equality rather than bit set)
Definition scheduler.h:66
@ pcmk_sched_start_failure_fatal
Definition scheduler.h:110
@ pcmk_sched_validate_only
Definition scheduler.h:168
@ pcmk_sched_show_utilization
Whether to show node and resource utilization (in log or output)
Definition scheduler.h:161
@ pcmk_sched_have_status
Whether the CIB status section has been parsed yet.
Definition scheduler.h:131
@ pcmk_sched_output_scores
Whether node scores should be output instead of logged.
Definition scheduler.h:158
@ pcmk_sched_enable_unfencing
Whether any resource provides or requires unfencing (via CIB resources)
Definition scheduler.h:86
@ pcmk_sched_remove_after_stop
Definition scheduler.h:113
@ pcmk_sched_cancel_removed_actions
Definition scheduler.h:101
@ pcmk_sched_stop_all
Whether to stop all resources (via stop-all-resources property)
Definition scheduler.h:104
@ pcmk_sched_startup_fencing
Whether unseen nodes should be fenced (via startup-fencing property)
Definition scheduler.h:116
Type aliases needed to define scheduler objects.
Implementation of pcmk_node_t.
Definition nodes.h:130
Implementation of pcmk_scheduler_t.
Definition scheduler.h:172
GHashTable * singletons
Actions for which there can be only one (such as "fence node X")
Definition scheduler.h:193
GList * colocation_constraints
Colocation constraints.
Definition scheduler.h:199
GList * ticket_constraints
Definition scheduler.h:202
guint node_pending_timeout
Pending join times out after this (ms)
Definition scheduler.h:231
const char * stonith_action
Default fencing action.
Definition scheduler.h:179
char * dc_uuid
Node ID of designated controller.
Definition scheduler.h:177
int action_id
ID to use for next created action.
Definition scheduler.h:211
GHashTable * tags
Configuration tags (ID -> pcmk_tag_t *)
Definition scheduler.h:218
const char * placement_strategy
Value of placement-strategy property.
Definition scheduler.h:180
int blocked_resources
Number of blocked resources in cluster.
Definition scheduler.h:219
guint shutdown_lock
How long to lock resources (seconds)
Definition scheduler.h:225
int ninstances
Total number of resource instances.
Definition scheduler.h:224
GHashTable * config_hash
Cluster properties.
Definition scheduler.h:187
int stonith_timeout
Value of stonith-timeout property.
Definition scheduler.h:185
GList * param_check
History entries that need to be checked.
Definition scheduler.h:221
GList * actions
Scheduled actions.
Definition scheduler.h:204
GHashTable * template_rsc_sets
Mappings of template ID to resource ID.
Definition scheduler.h:213
xmlNode * input
CIB XML.
Definition scheduler.h:175
GList * resources
Resources in cluster.
Definition scheduler.h:196
xmlNode * failed
History entries of failed actions.
Definition scheduler.h:205
xmlNode * graph
Transition graph.
Definition scheduler.h:212
int disabled_resources
Number of disabled resources in cluster.
Definition scheduler.h:220
unsigned long long flags
Group of enum pcmk_scheduler_flags.
Definition scheduler.h:183
xmlNode * rsc_defaults
Configured resource defaults.
Definition scheduler.h:207
pcmk_node_t * dc_node
Node object for DC.
Definition scheduler.h:178
void * priv
For Pacemaker use only.
Definition scheduler.h:229
xmlNode * op_defaults
Configured operation defaults.
Definition scheduler.h:206
enum pe_quorum_policy no_quorum_policy
Response to loss of quorum.
Definition scheduler.h:186
GList * stop_needed
Containers that need stop actions.
Definition scheduler.h:222
GHashTable * tickets
Definition scheduler.h:190
GList * placement_constraints
Location constraints.
Definition scheduler.h:197
GList * nodes
Nodes in cluster.
Definition scheduler.h:195
GList * ordering_constraints
Ordering constraints.
Definition scheduler.h:198
time_t recheck_by
Hint to controller when to reschedule.
Definition scheduler.h:223
int num_synapse
Number of transition graph synapses.
Definition scheduler.h:208
int priority_fencing_delay
Priority fencing delay.
Definition scheduler.h:226
crm_time_t * now
Current time for evaluation purposes.
Definition scheduler.h:176
int order_id
ID to use for next created ordering.
Definition scheduler.h:210
const char * localhost
Definition scheduler.h:216
Scheduler API for configuration tags.
Scheduler API for tickets.