pacemaker  2.0.2-debe490
Scalable High-Availability cluster resource manager
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
pcmki_scheduler.h
Go to the documentation of this file.
1 /*
2  * Copyright 2014-2019 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 
14 typedef struct rsc_ticket_s rsc_ticket_t;
15 typedef struct lrm_agent_s lrm_agent_t;
16 
17 # include <glib.h>
18 # include <crm/crm.h>
19 # include <crm/common/iso8601.h>
20 # include <crm/pengine/rules.h>
21 # include <crm/pengine/common.h>
22 # include <crm/pengine/status.h>
23 
24 # include <crm/pengine/complex.h>
25 
30 };
31 
32 enum pe_weights {
38 };
39 
41  const char *id;
42  const char *node_attribute;
45 
46  int role_lh;
47  int role_rh;
48 
49  int score;
50 };
51 
57 };
58 
59 struct rsc_ticket_s {
60  const char *id;
64 
65  int role_lh;
66 };
67 
68 extern gboolean stage0(pe_working_set_t * data_set);
69 extern gboolean probe_resources(pe_working_set_t * data_set);
70 extern gboolean stage2(pe_working_set_t * data_set);
71 extern gboolean stage3(pe_working_set_t * data_set);
72 extern gboolean stage4(pe_working_set_t * data_set);
73 extern gboolean stage5(pe_working_set_t * data_set);
74 extern gboolean stage6(pe_working_set_t * data_set);
75 extern gboolean stage7(pe_working_set_t * data_set);
76 extern gboolean stage8(pe_working_set_t * data_set);
77 
78 extern gboolean summary(GListPtr resources);
79 
80 extern gboolean unpack_constraints(xmlNode * xml_constraints, pe_working_set_t * data_set);
81 
82 extern gboolean update_action_states(GListPtr actions);
83 
84 extern gboolean shutdown_constraints(node_t * node, action_t * shutdown_op,
85  pe_working_set_t * data_set);
86 
87 extern gboolean stonith_constraints(node_t * node, action_t * stonith_op,
88  pe_working_set_t * data_set);
89 
90 extern int custom_action_order(resource_t * lh_rsc, char *lh_task, action_t * lh_action,
91  resource_t * rh_rsc, char *rh_task, action_t * rh_action,
92  enum pe_ordering type, pe_working_set_t * data_set);
93 
94 extern int new_rsc_order(resource_t * lh_rsc, const char *lh_task,
95  resource_t * rh_rsc, const char *rh_task,
96  enum pe_ordering type, pe_working_set_t * data_set);
97 
98 # define order_start_start(rsc1,rsc2, type) \
99  new_rsc_order(rsc1, CRMD_ACTION_START, rsc2, CRMD_ACTION_START, type, data_set)
100 # define order_stop_stop(rsc1, rsc2, type) \
101  new_rsc_order(rsc1, CRMD_ACTION_STOP, rsc2, CRMD_ACTION_STOP, type, data_set)
102 
103 extern void graph_element_from_action(action_t * action, pe_working_set_t * data_set);
104 extern void add_maintenance_update(pe_working_set_t *data_set);
105 xmlNode *pcmk__schedule_actions(pe_working_set_t *data_set, xmlNode *xml_input,
106  crm_time_t *now);
107 
108 extern gboolean show_scores;
109 extern int scores_log_level;
110 extern gboolean show_utilization;
111 extern int utilization_log_level;
112 extern const char *transition_idle_timeout;
113 
114 #endif
A dumping ground.
gboolean stage2(pe_working_set_t *data_set)
gboolean stage5(pe_working_set_t *data_set)
gboolean stage3(pe_working_set_t *data_set)
struct crm_time_s crm_time_t
Definition: iso8601.h:32
int utilization_log_level
gboolean stage0(pe_working_set_t *data_set)
void add_maintenance_update(pe_working_set_t *data_set)
resource_t * rsc_rh
gboolean unpack_constraints(xmlNode *xml_constraints, pe_working_set_t *data_set)
resource_t * rsc_lh
gboolean show_scores
xmlNode * pcmk__schedule_actions(pe_working_set_t *data_set, xmlNode *xml_input, crm_time_t *now)
gboolean stage8(pe_working_set_t *data_set)
const char * node_attribute
gboolean stage4(pe_working_set_t *data_set)
loss_ticket_policy_e
enum loss_ticket_policy_e loss_policy
ISO_8601 Date handling.
const char * transition_idle_timeout
ticket_t * ticket
void graph_element_from_action(action_t *action, pe_working_set_t *data_set)
int scores_log_level
gboolean show_utilization
gboolean stage7(pe_working_set_t *data_set)
pe_stop_fail
Cluster status and scheduling.
resource_t * rsc_lh
pe_weights
gboolean stage6(pe_working_set_t *data_set)
const char * id
int custom_action_order(resource_t *lh_rsc, char *lh_task, action_t *lh_action, resource_t *rh_rsc, char *rh_task, action_t *rh_action, enum pe_ordering type, pe_working_set_t *data_set)
gboolean stonith_constraints(node_t *node, action_t *stonith_op, pe_working_set_t *data_set)
gboolean update_action_states(GListPtr actions)
const char * id
gboolean probe_resources(pe_working_set_t *data_set)
GList * GListPtr
Definition: crm.h:192
gboolean shutdown_constraints(node_t *node, action_t *shutdown_op, pe_working_set_t *data_set)
pe_ordering
Definition: pe_types.h:437
struct lrm_agent_s lrm_agent_t
enum crm_ais_msg_types type
Definition: internal.h:85
gboolean summary(GListPtr resources)
int new_rsc_order(resource_t *lh_rsc, const char *lh_task, resource_t *rh_rsc, const char *rh_task, enum pe_ordering type, pe_working_set_t *data_set)