21 #include <sys/param.h>
32 #define MEMCHECK_STAGE_0 0
34 #define check_and_exit(stage) cleanup_calculations(data_set); \
35 crm_mem_stats(NULL); \
36 crm_err("Exiting: stage %d", stage); \
37 crm_exit(pcmk_err_generic);
66 if (data_set->
input == NULL) {
70 if (data_set->
now == NULL) {
74 if (data_set->
dc_uuid == NULL) {
92 crm_warn(
"Fencing and resource management disabled due to lack of quorum");
113 pe_free_resources(
GListPtr resources)
118 while (iterator != NULL) {
120 iterator = iterator->next;
123 if (resources != NULL) {
124 g_list_free(resources);
133 while (iterator != NULL) {
135 iterator = iterator->next;
137 if (actions != NULL) {
138 g_list_free(actions);
147 while (iterator != NULL) {
151 iterator = iterator->next;
156 if (details != NULL) {
157 crm_trace(
"%s is being deleted", details->uname);
158 if (details->attrs != NULL) {
159 g_hash_table_destroy(details->attrs);
161 if (details->utilization != NULL) {
162 g_hash_table_destroy(details->utilization);
164 if (details->digest_cache != NULL) {
165 g_hash_table_destroy(details->digest_cache);
167 g_list_free(details->running_rsc);
168 g_list_free(details->allocated_rsc);
182 if (data_set == NULL) {
196 g_hash_table_destroy(data_set->
tickets);
203 if (data_set->
tags) {
204 g_hash_table_destroy(data_set->
tags);
213 pe_free_actions(data_set->
actions);
216 pe_free_nodes(data_set->
nodes);
241 data_set->
flags = 0x0ULL;
259 for (rIter = rsc_list;
id && rIter; rIter = rIter->next) {
280 crm_trace(
"Looking up %s via its uname instead", uname);
289 for (; gIter != NULL; gIter = gIter->next) {
305 for (; gIter != NULL; gIter = gIter->next) {
gboolean unpack_config(xmlNode *config, pe_working_set_t *data_set)
#define CRM_CHECK(expr, failure_action)
void(* free)(resource_t *)
#define pe_flag_stop_rsc_orphans
char * crm_element_value_copy(xmlNode *data, const char *name)
void print_node(const char *pre_text, node_t *node, gboolean details)
node_t * pe_find_node(GListPtr node_list, const char *uname)
no_quorum_policy_t no_quorum_policy
#define clear_bit(word, bit)
resource_t *(* find_rsc)(resource_t *parent, const char *search, node_t *node, int flags)
#define XML_CIB_TAG_NODES
xmlNode * get_xpath_object(const char *xpath, xmlNode *xml_obj, int error_level)
gboolean unpack_resources(xmlNode *xml_resources, pe_working_set_t *data_set)
GListPtr placement_constraints
#define XML_CIB_TAG_RESOURCES
struct node_shared_s * details
gboolean unpack_status(xmlNode *status, pe_working_set_t *data_set)
#define crm_warn(fmt, args...)
void cleanup_calculations(pe_working_set_t *data_set)
#define set_bit(word, bit)
gboolean unpack_nodes(xmlNode *xml_nodes, pe_working_set_t *data_set)
resource_object_functions_t * fns
pe_working_set_t * pe_dataset
#define crm_trace(fmt, args...)
gboolean unpack_remote_nodes(xmlNode *xml_resources, pe_working_set_t *data_set)
void set_working_set_defaults(pe_working_set_t *data_set)
#define XML_ATTR_HAVE_QUORUM
Wrappers for and extensions to libxml2.
xmlNode * create_xml_node(xmlNode *parent, const char *name)
const char * crm_element_value(xmlNode *data, const char *name)
void free_xml(xmlNode *child)
GListPtr ordering_constraints
node_t * pe_find_node_any(GListPtr node_list, const char *id, const char *uname)
#define pe_flag_have_status
#define pe_flag_quick_location
gboolean cluster_status(pe_working_set_t *data_set)
crm_time_t * crm_time_new(const char *string)
#define XML_CIB_TAG_CRMCONFIG
#define XML_CIB_TAG_RSCCONFIG
resource_t * pe_find_resource_with_flags(GListPtr rsc_list, const char *id, enum pe_find flags)
node_t * pe_find_node_id(GListPtr node_list, const char *id)
void pe_free_action(action_t *action)
#define pe_flag_have_quorum
#define XML_CIB_TAG_STATUS
#define pe_flag_is_managed_default
#define pe_flag_stop_action_orphans
gboolean crm_is_true(const char *s)
#define pe_flag_symmetric_cluster
gboolean unpack_tags(xmlNode *xml_tags, pe_working_set_t *data_set)
resource_t * pe_find_resource(GListPtr rsc_list, const char *id_rh)
#define safe_str_eq(a, b)
#define XML_CIB_TAG_OPCONFIG
GHashTable * template_rsc_sets
void crm_time_free(crm_time_t *dt)