12 #include <sys/param.h> 73 xmlNode *section = NULL;
113 crm_warn(
"Fencing and resource management disabled due to lack of quorum");
142 crm_trace(
"Cluster resource count: %d (%d disabled, %d blocked)",
163 pe_free_resources(GList *resources)
166 GList *iterator = resources;
168 while (iterator != NULL) {
170 iterator = iterator->next;
173 if (resources != NULL) {
174 g_list_free(resources);
179 pe_free_actions(GList *actions)
181 GList *iterator = actions;
183 while (iterator != NULL) {
185 iterator = iterator->next;
187 if (actions != NULL) {
188 g_list_free(actions);
193 pe_free_nodes(GList *nodes)
195 for (GList *iterator = nodes; iterator != NULL; iterator = iterator->next) {
233 pe__free_ordering(GList *constraints)
235 GList *iterator = constraints;
237 while (iterator != NULL) {
240 iterator = iterator->next;
246 if (constraints != NULL) {
247 g_list_free(constraints);
252 pe__free_location(GList *constraints)
254 GList *iterator = constraints;
256 while (iterator != NULL) {
259 iterator = iterator->next;
265 if (constraints != NULL) {
266 g_list_free(constraints);
344 crm_trace(
"Deleting %d ordering constraints",
349 crm_trace(
"Deleting %d location constraints",
354 crm_trace(
"Deleting %d colocation constraints",
359 crm_trace(
"Deleting %d ticket constraints",
401 for (rIter = rsc_list;
id && rIter; rIter = rIter->next) {
429 GList *gIter = nodes;
431 for (; gIter != NULL; gIter = gIter->next) {
445 GList *gIter = nodes;
447 for (; gIter != NULL; gIter = gIter->next) {
#define CRM_CHECK(expr, failure_action)
pe_node_t * pe_find_node(GList *nodes, const char *uname)
enum pe_quorum_policy no_quorum_policy
#define pe_flag_stop_action_orphans
bool pe__is_guest_or_remote_node(const pe_node_t *node)
pe_node_t * pe_find_node_any(GList *nodes, const char *id, const char *uname)
void set_working_set_defaults(pe_working_set_t *data_set)
pe_resource_t * pe_find_resource_with_flags(GList *rsc_list, const char *id, enum pe_find flags)
G_GNUC_INTERNAL gboolean unpack_remote_nodes(xmlNode *xml_resources, pe_working_set_t *data_set)
#define pe_flag_concurrent_fencing
#define pe_flag_symmetric_cluster
pe_resource_t * pe_find_resource(GList *rsc_list, const char *id)
resource_object_functions_t * fns
G_GNUC_INTERNAL gboolean unpack_status(xmlNode *status, pe_working_set_t *data_set)
#define pe_flag_no_counts
Don't count total, disabled and blocked resource instances.
#define pe_flag_have_status
int order_id
Deprecated (will be removed in a future release)
void cleanup_calculations(pe_working_set_t *data_set)
Reset working set to default state without freeing it or constraints.
#define XML_CIB_TAG_NODES
#define pe_flag_have_quorum
xmlNode * get_xpath_object(const char *xpath, xmlNode *xml_obj, int error_level)
#define PCMK__CONCURRENT_FENCING_DEFAULT
#define XML_CIB_TAG_RESOURCES
G_GNUC_INTERNAL gboolean unpack_tags(xmlNode *xml_tags, pe_working_set_t *data_set)
GList * ticket_constraints
#define crm_warn(fmt, args...)
pe_find
Determine behavior of pe_find_resource_with_flags()
G_GNUC_INTERNAL gboolean unpack_nodes(xmlNode *xml_nodes, pe_working_set_t *data_set)
char * crm_element_value_copy(const xmlNode *data, const char *name)
Retrieve a copy of the value of an XML attribute.
#define crm_trace(fmt, args...)
#define pcmk_is_set(g, f)
Convenience alias for pcmk_all_flags_set(), to check single flag.
pe_node_t * pe_find_node_id(GList *nodes, const char *id)
struct pe_node_shared_s * details
G_GNUC_INTERNAL gboolean unpack_resources(xmlNode *xml_resources, pe_working_set_t *data_set)
#define XML_ATTR_HAVE_QUORUM
pe_working_set_t * data_set
Wrappers for and extensions to libxml2.
xmlNode * create_xml_node(xmlNode *parent, const char *name)
void(* free)(pe_resource_t *)
void free_xml(xmlNode *child)
void pe__free_param_checks(pe_working_set_t *data_set)
match resource ID or LRM history ID
#define pe_flag_quick_location
void pe_free_working_set(pe_working_set_t *data_set)
Free a working set.
gboolean cluster_status(pe_working_set_t *data_set)
GList * ordering_constraints
crm_time_t * crm_time_new(const char *string)
#define XML_CIB_TAG_CRMCONFIG
#define XML_CIB_TAG_RSCCONFIG
GList * colocation_constraints
#define pe__set_working_set_flags(working_set, flags_to_set)
GHashTable * digest_cache
cache of calculated resource digests
GList * placement_constraints
#define XML_CIB_TAG_STATUS
bool pcmk__xe_attr_is_true(xmlNodePtr node, const char *name)
G_GNUC_INTERNAL gboolean unpack_config(xmlNode *config, pe_working_set_t *data_set)
#define XML_CIB_TAG_OPCONFIG
#define pe__clear_working_set_flags(working_set, flags_to_clear)
GHashTable * template_rsc_sets
pe_working_set_t * pe_new_working_set()
Create a new working set.
void pe_reset_working_set(pe_working_set_t *data_set)
Reset a working set to default state without freeing it.
void pe_free_action(pe_action_t *action)
void crm_time_free(crm_time_t *dt)
#define pe_flag_stop_rsc_orphans