pacemaker  2.0.4-2deceaa
Scalable High-Availability cluster resource manager
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
pcmki_sched_allocate.h
Go to the documentation of this file.
1 /*
2  * Copyright 2004-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 SCHED_ALLOCATE__H
11 # define SCHED_ALLOCATE__H
12 
13 # include <glib.h>
14 # include <crm/common/xml.h>
15 # include <crm/pengine/status.h>
16 # include <crm/pengine/complex.h>
17 # include <crm/pengine/internal.h>
18 # include <pcmki/pcmki_scheduler.h>
19 
21  GHashTable *(*merge_weights) (pe_resource_t *, const char *, GHashTable *, const char *, float,
22  enum pe_weights);
27 
32 
34 
37  pe_node_t *, enum pe_action_flags,
38  enum pe_action_flags,
39  enum pe_ordering,
40  pe_working_set_t *data_set);
41 
43  void (*append_meta) (pe_resource_t * rsc, xmlNode * xml);
44 };
45 
46 GHashTable *pcmk__native_merge_weights(pe_resource_t *rsc, const char *rhs,
47  GHashTable *nodes, const char *attr,
48  float factor, uint32_t flags);
49 
50 GHashTable *pcmk__group_merge_weights(pe_resource_t *rsc, const char *rhs,
51  GHashTable *nodes, const char *attr,
52  float factor, uint32_t flags);
53 
55  pe_working_set_t *data_set);
56 extern void native_create_actions(pe_resource_t * rsc, pe_working_set_t * data_set);
57 extern void native_internal_constraints(pe_resource_t * rsc, pe_working_set_t * data_set);
59  rsc_colocation_t *constraint,
60  pe_working_set_t *data_set);
62  rsc_colocation_t *constraint,
63  pe_working_set_t *data_set);
64 extern void rsc_ticket_constraint(pe_resource_t * lh_rsc, rsc_ticket_t * rsc_ticket,
65  pe_working_set_t * data_set);
67 
68 void native_rsc_location(pe_resource_t *rsc, pe__location_t *constraint);
69 extern void native_expand(pe_resource_t * rsc, pe_working_set_t * data_set);
70 extern gboolean native_create_probe(pe_resource_t * rsc, pe_node_t * node, pe_action_t * complete,
71  gboolean force, pe_working_set_t * data_set);
72 extern void native_append_meta(pe_resource_t * rsc, xmlNode * xml);
73 
75  pe_working_set_t *data_set);
76 extern void group_create_actions(pe_resource_t * rsc, pe_working_set_t * data_set);
77 extern void group_internal_constraints(pe_resource_t * rsc, pe_working_set_t * data_set);
79  rsc_colocation_t *constraint,
80  pe_working_set_t *data_set);
82  rsc_colocation_t *constraint,
83  pe_working_set_t *data_set);
85 void group_rsc_location(pe_resource_t *rsc, pe__location_t *constraint);
86 extern void group_expand(pe_resource_t * rsc, pe_working_set_t * data_set);
87 extern void group_append_meta(pe_resource_t * rsc, xmlNode * xml);
88 
90  pe_working_set_t *data_set);
92  pe_working_set_t *data_set);
94  pe_action_t *complete, gboolean force,
95  pe_working_set_t *data_set);
97  pe_working_set_t *data_set);
99  pe_resource_t *rh_rsc,
100  rsc_colocation_t *constraint,
101  pe_working_set_t *data_set);
103  pe_resource_t *rh_rsc,
104  rsc_colocation_t *constraint,
105  pe_working_set_t *data_set);
108  pe_node_t *node);
110 void pcmk__bundle_append_meta(pe_resource_t *rsc, xmlNode *xml);
111 
113  pe_working_set_t *data_set);
114 extern void clone_create_actions(pe_resource_t * rsc, pe_working_set_t * data_set);
115 extern void clone_internal_constraints(pe_resource_t * rsc, pe_working_set_t * data_set);
117  rsc_colocation_t *constraint,
118  pe_working_set_t *data_set);
120  rsc_colocation_t *constraint,
121  pe_working_set_t *data_set);
122 void clone_rsc_location(pe_resource_t *rsc, pe__location_t *constraint);
124 extern void clone_expand(pe_resource_t * rsc, pe_working_set_t * data_set);
125 extern gboolean clone_create_probe(pe_resource_t * rsc, pe_node_t * node, pe_action_t * complete,
126  gboolean force, pe_working_set_t * data_set);
127 extern void clone_append_meta(pe_resource_t * rsc, xmlNode * xml);
128 
131  pe_working_set_t *data_set);
136  rsc_colocation_t *constraint,
137  pe_working_set_t *data_set);
138 
139 /* extern resource_object_functions_t resource_variants[]; */
141 
142 extern gboolean unpack_rsc_order(xmlNode * xml_obj, pe_working_set_t * data_set);
143 
144 extern gboolean unpack_rsc_colocation(xmlNode * xml_obj, pe_working_set_t * data_set);
145 
146 extern gboolean unpack_location(xmlNode * xml_obj, pe_working_set_t * data_set);
147 
148 extern gboolean unpack_rsc_ticket(xmlNode * xml_obj, pe_working_set_t * data_set);
149 
150 void LogNodeActions(pe_working_set_t * data_set, gboolean terminal);
151 void LogActions(pe_resource_t * rsc, pe_working_set_t * data_set, gboolean terminal);
153  gboolean terminal);
154 
155 extern void rsc_stonith_ordering(pe_resource_t * rsc, pe_action_t * stonith_op,
156  pe_working_set_t * data_set);
157 
159  pe_node_t *node,
160  enum pe_action_flags flags,
161  enum pe_action_flags filter,
162  enum pe_ordering type,
163  pe_working_set_t *data_set);
165  pe_node_t *node,
166  enum pe_action_flags flags,
167  enum pe_action_flags filter,
168  enum pe_ordering type,
169  pe_working_set_t *data_set);
171  pe_action_t *then,
172  pe_node_t *node,
173  enum pe_action_flags flags,
174  enum pe_action_flags filter,
175  enum pe_ordering type,
176  pe_working_set_t *data_set);
177 
178 gboolean update_action_flags(pe_action_t * action, enum pe_action_flags flags, const char *source, int line);
179 gboolean update_action(pe_action_t *action, pe_working_set_t *data_set);
180 void complex_set_cmds(pe_resource_t * rsc);
181 void pcmk__log_transition_summary(const char *filename);
183  pe_resource_t * rsc, GListPtr children, notify_data_t **start_notify, notify_data_t **stop_notify, pe_working_set_t * data_set);
184 #endif
void group_append_meta(pe_resource_t *rsc, xmlNode *xml)
enum pe_action_flags clone_action_flags(pe_action_t *action, pe_node_t *node)
void clone_append_meta(pe_resource_t *rsc, xmlNode *xml)
gboolean(* create_probe)(pe_resource_t *, pe_node_t *, pe_action_t *, gboolean, pe_working_set_t *)
enum pe_action_flags pcmk__bundle_action_flags(pe_action_t *action, pe_node_t *node)
void complex_set_cmds(pe_resource_t *rsc)
void apply_master_prefs(pe_resource_t *rsc)
void pcmk__log_transition_summary(const char *filename)
gboolean unpack_rsc_order(xmlNode *xml_obj, pe_working_set_t *data_set)
gboolean unpack_rsc_ticket(xmlNode *xml_obj, pe_working_set_t *data_set)
void rsc_ticket_constraint(pe_resource_t *lh_rsc, rsc_ticket_t *rsc_ticket, pe_working_set_t *data_set)
void clone_rsc_colocation_lh(pe_resource_t *lh_rsc, pe_resource_t *rh_rsc, rsc_colocation_t *constraint, pe_working_set_t *data_set)
enum pe_action_flags(* action_flags)(pe_action_t *, pe_node_t *)
resource_alloc_functions_t resource_class_alloc_functions[]
void pcmk__bundle_log_actions(pe_resource_t *rsc, pe_working_set_t *data_set, gboolean terminal)
void(* rsc_colocation_lh)(pe_resource_t *, pe_resource_t *, rsc_colocation_t *, pe_working_set_t *)
void pcmk__bundle_rsc_colocation_rh(pe_resource_t *lh_rsc, pe_resource_t *rh_rsc, rsc_colocation_t *constraint, pe_working_set_t *data_set)
enum pe_graph_flags(* update_actions)(pe_action_t *, pe_action_t *, pe_node_t *, enum pe_action_flags, enum pe_action_flags, enum pe_ordering, pe_working_set_t *data_set)
void group_rsc_location(pe_resource_t *rsc, pe__location_t *constraint)
void(* append_meta)(pe_resource_t *rsc, xmlNode *xml)
enum pe_graph_flags native_update_actions(pe_action_t *first, pe_action_t *then, pe_node_t *node, enum pe_action_flags flags, enum pe_action_flags filter, enum pe_ordering type, pe_working_set_t *data_set)
void native_expand(pe_resource_t *rsc, pe_working_set_t *data_set)
void native_rsc_location(pe_resource_t *rsc, pe__location_t *constraint)
gboolean unpack_rsc_colocation(xmlNode *xml_obj, pe_working_set_t *data_set)
GHashTable * pcmk__native_merge_weights(pe_resource_t *rsc, const char *rhs, GHashTable *nodes, const char *attr, float factor, uint32_t flags)
const char * action
Definition: pcmk_fence.c:29
void(* rsc_colocation_rh)(pe_resource_t *, pe_resource_t *, rsc_colocation_t *, pe_working_set_t *)
void promotable_constraints(pe_resource_t *rsc, pe_working_set_t *data_set)
void group_rsc_colocation_lh(pe_resource_t *lh_rsc, pe_resource_t *rh_rsc, rsc_colocation_t *constraint, pe_working_set_t *data_set)
void native_rsc_colocation_lh(pe_resource_t *lh_rsc, pe_resource_t *rh_rsc, rsc_colocation_t *constraint, pe_working_set_t *data_set)
void native_internal_constraints(pe_resource_t *rsc, pe_working_set_t *data_set)
void LogActions(pe_resource_t *rsc, pe_working_set_t *data_set, gboolean terminal)
void native_create_actions(pe_resource_t *rsc, pe_working_set_t *data_set)
void(* create_actions)(pe_resource_t *, pe_working_set_t *)
void create_promotable_actions(pe_resource_t *rsc, pe_working_set_t *data_set)
void clone_expand(pe_resource_t *rsc, pe_working_set_t *data_set)
pe_action_flags
Definition: pe_types.h:276
pe_node_t * pcmk__clone_allocate(pe_resource_t *rsc, pe_node_t *preferred, pe_working_set_t *data_set)
enum pe_graph_flags group_update_actions(pe_action_t *first, pe_action_t *then, pe_node_t *node, enum pe_action_flags flags, enum pe_action_flags filter, enum pe_ordering type, pe_working_set_t *data_set)
void group_rsc_colocation_rh(pe_resource_t *lh_rsc, pe_resource_t *rh_rsc, rsc_colocation_t *constraint, pe_working_set_t *data_set)
gboolean update_action(pe_action_t *action, pe_working_set_t *data_set)
void promote_demote_constraints(pe_resource_t *rsc, pe_working_set_t *data_set)
void rsc_stonith_ordering(pe_resource_t *rsc, pe_action_t *stonith_op, pe_working_set_t *data_set)
GHashTable * pcmk__group_merge_weights(pe_resource_t *rsc, const char *rhs, GHashTable *nodes, const char *attr, float factor, uint32_t flags)
Wrappers for and extensions to libxml2.
void(* expand)(pe_resource_t *, pe_working_set_t *)
void LogNodeActions(pe_working_set_t *data_set, gboolean terminal)
pe_graph_flags
Definition: pe_types.h:268
gboolean native_create_probe(pe_resource_t *rsc, pe_node_t *node, pe_action_t *complete, gboolean force, pe_working_set_t *data_set)
gboolean update_action_flags(pe_action_t *action, enum pe_action_flags flags, const char *source, int line)
void group_internal_constraints(pe_resource_t *rsc, pe_working_set_t *data_set)
pe_node_t * pcmk__bundle_allocate(pe_resource_t *rsc, pe_node_t *preferred, pe_working_set_t *data_set)
void(* rsc_location)(pe_resource_t *, pe__location_t *)
gboolean pcmk__bundle_create_probe(pe_resource_t *rsc, pe_node_t *node, pe_action_t *complete, gboolean force, pe_working_set_t *data_set)
void group_create_actions(pe_resource_t *rsc, pe_working_set_t *data_set)
enum pe_action_flags group_action_flags(pe_action_t *action, pe_node_t *node)
Cluster status and scheduling.
void pcmk__bundle_rsc_location(pe_resource_t *rsc, pe__location_t *constraint)
void clone_rsc_location(pe_resource_t *rsc, pe__location_t *constraint)
void promotable_colocation_rh(pe_resource_t *lh_rsc, pe_resource_t *rh_rsc, rsc_colocation_t *constraint, pe_working_set_t *data_set)
void clone_rsc_colocation_rh(pe_resource_t *lh_rsc, pe_resource_t *rh_rsc, rsc_colocation_t *constraint, pe_working_set_t *data_set)
pe_weights
void clone_create_pseudo_actions(pe_resource_t *rsc, GListPtr children, notify_data_t **start_notify, notify_data_t **stop_notify, pe_working_set_t *data_set)
void clone_create_actions(pe_resource_t *rsc, pe_working_set_t *data_set)
void(* internal_constraints)(pe_resource_t *, pe_working_set_t *)
void pcmk__bundle_expand(pe_resource_t *rsc, pe_working_set_t *data_set)
gboolean clone_create_probe(pe_resource_t *rsc, pe_node_t *node, pe_action_t *complete, gboolean force, pe_working_set_t *data_set)
void native_append_meta(pe_resource_t *rsc, xmlNode *xml)
pe_node_t * pcmk__set_instance_roles(pe_resource_t *rsc, pe_working_set_t *data_set)
void clone_internal_constraints(pe_resource_t *rsc, pe_working_set_t *data_set)
GList * GListPtr
Definition: crm.h:214
void group_expand(pe_resource_t *rsc, pe_working_set_t *data_set)
void pcmk__bundle_create_actions(pe_resource_t *rsc, pe_working_set_t *data_set)
enum pe_action_flags native_action_flags(pe_action_t *action, pe_node_t *node)
gboolean unpack_location(xmlNode *xml_obj, pe_working_set_t *data_set)
enum pe_graph_flags pcmk__multi_update_actions(pe_action_t *first, pe_action_t *then, pe_node_t *node, enum pe_action_flags flags, enum pe_action_flags filter, enum pe_ordering type, pe_working_set_t *data_set)
void pcmk__bundle_internal_constraints(pe_resource_t *rsc, pe_working_set_t *data_set)
void pcmk__bundle_append_meta(pe_resource_t *rsc, xmlNode *xml)
pe_ordering
Definition: pe_types.h:461
uint64_t flags
Definition: remote.c:149
enum crm_ais_msg_types type
Definition: internal.h:83
void pcmk__bundle_rsc_colocation_lh(pe_resource_t *lh_rsc, pe_resource_t *rh_rsc, rsc_colocation_t *constraint, pe_working_set_t *data_set)
void native_rsc_colocation_rh(pe_resource_t *lh_rsc, pe_resource_t *rh_rsc, rsc_colocation_t *constraint, pe_working_set_t *data_set)
pe_node_t * pcmk__native_allocate(pe_resource_t *rsc, pe_node_t *preferred, pe_working_set_t *data_set)
pe_node_t * pcmk__group_allocate(pe_resource_t *rsc, pe_node_t *preferred, pe_working_set_t *data_set)