10 #include <sys/param.h> 36 if (data_set != NULL) {
50 if (data_set != NULL) {
82 if (data_set->
input == NULL) {
86 if (data_set->
now == NULL) {
90 if (data_set->
dc_uuid == NULL) {
108 crm_warn(
"Fencing and resource management disabled due to lack of quorum");
140 pe_free_resources(
GListPtr resources)
145 while (iterator != NULL) {
147 iterator = iterator->next;
150 if (resources != NULL) {
151 g_list_free(resources);
160 while (iterator != NULL) {
162 iterator = iterator->next;
164 if (actions != NULL) {
165 g_list_free(actions);
172 for (GList *iterator = nodes; iterator != NULL; iterator = iterator->next) {
210 pe__free_ordering(
GListPtr constraints)
214 while (iterator != NULL) {
217 iterator = iterator->next;
223 if (constraints != NULL) {
224 g_list_free(constraints);
229 pe__free_location(
GListPtr constraints)
233 while (iterator != NULL) {
236 iterator = iterator->next;
242 if (constraints != NULL) {
243 g_list_free(constraints);
258 if (data_set == NULL) {
272 g_hash_table_destroy(data_set->
tickets);
279 if (data_set->
tags) {
280 g_hash_table_destroy(data_set->
tags);
289 pe_free_actions(data_set->
actions);
292 pe_free_nodes(data_set->
nodes);
317 if (data_set == NULL) {
321 crm_trace(
"Deleting %d ordering constraints",
326 crm_trace(
"Deleting %d location constraints",
331 crm_trace(
"Deleting %d colocation constraints",
336 crm_trace(
"Deleting %d ticket constraints",
353 data_set->
flags = 0x0ULL;
370 for (rIter = rsc_list;
id && rIter; rIter = rIter->next) {
391 crm_trace(
"Looking up %s via its uname instead", uname);
400 for (; gIter != NULL; gIter = gIter->next) {
416 for (; gIter != NULL; gIter = gIter->next) {
gboolean unpack_config(xmlNode *config, pe_working_set_t *data_set)
#define CRM_CHECK(expr, failure_action)
enum pe_quorum_policy no_quorum_policy
void set_working_set_defaults(pe_working_set_t *data_set)
resource_t * pe_find_resource_with_flags(GListPtr rsc_list, const char *id, enum pe_find flags)
resource_object_functions_t * fns
#define pe_flag_stop_rsc_orphans
node_t * pe_find_node_any(GListPtr nodes, const char *id, const char *uname)
match resource ID or LRM history ID
void cleanup_calculations(pe_working_set_t *data_set)
Reset working set to default state without freeing it or constraints.
#define clear_bit(word, bit)
#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
gboolean is_remote_node(node_t *node)
gboolean unpack_status(xmlNode *status, pe_working_set_t *data_set)
#define crm_warn(fmt, args...)
#define set_bit(word, bit)
char * crm_element_value_copy(const xmlNode *data, const char *name)
Retrieve a copy of the value of an XML attribute.
const char * crm_element_value(const xmlNode *data, const char *name)
Retrieve the value of an XML attribute.
gboolean unpack_nodes(xmlNode *xml_nodes, pe_working_set_t *data_set)
#define crm_trace(fmt, args...)
gboolean unpack_remote_nodes(xmlNode *xml_resources, pe_working_set_t *data_set)
struct pe_node_shared_s * details
pe_find
Determine behavior of pe_find_resource_with_flags()
#define XML_ATTR_HAVE_QUORUM
Wrappers for and extensions to libxml2.
xmlNode * create_xml_node(xmlNode *parent, const char *name)
void(* free)(pe_resource_t *)
node_t * pe_find_node(GListPtr nodes, const char *uname)
void free_xml(xmlNode *child)
void pe__free_param_checks(pe_working_set_t *data_set)
GListPtr ordering_constraints
GListPtr colocation_constraints
resource_t * pe_find_resource(GListPtr rsc_list, const char *id)
node_t * pe_find_node_id(GListPtr nodes, const char *id)
void pe_free_working_set(pe_working_set_t *data_set)
Free a working set.
gboolean cluster_status(pe_working_set_t *data_set)
#define pe_flag_have_status
#define pe_flag_quick_location
GListPtr ticket_constraints
crm_time_t * crm_time_new(const char *string)
#define XML_CIB_TAG_CRMCONFIG
#define XML_CIB_TAG_RSCCONFIG
GHashTable * digest_cache
cache of calculated resource digests
void pe_free_action(action_t *action)
#define pe_flag_have_quorum
#define XML_CIB_TAG_STATUS
#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)
#define safe_str_eq(a, b)
pe_resource_t *(* find_rsc)(pe_resource_t *parent, const char *search, const pe_node_t *node, int flags)
#define XML_CIB_TAG_OPCONFIG
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 crm_time_free(crm_time_t *dt)