12 #include <sys/param.h> 38 if (data_set != NULL) {
52 if (data_set != NULL) {
85 if (data_set->
input == NULL) {
89 if (data_set->
now == NULL) {
93 if (data_set->
dc_uuid == NULL) {
111 if (!pcmk_any_flags_set(data_set->
flags,
114 crm_warn(
"Fencing and resource management disabled due to lack of quorum");
131 for (GList *item = data_set->
resources; item != NULL;
153 pe_free_resources(
GListPtr resources)
158 while (iterator != NULL) {
160 iterator = iterator->next;
163 if (resources != NULL) {
164 g_list_free(resources);
173 while (iterator != NULL) {
175 iterator = iterator->next;
177 if (actions != NULL) {
178 g_list_free(actions);
185 for (GList *iterator = nodes; iterator != NULL; iterator = iterator->next) {
223 pe__free_ordering(
GListPtr constraints)
227 while (iterator != NULL) {
230 iterator = iterator->next;
236 if (constraints != NULL) {
237 g_list_free(constraints);
242 pe__free_location(
GListPtr constraints)
246 while (iterator != NULL) {
249 iterator = iterator->next;
255 if (constraints != NULL) {
256 g_list_free(constraints);
271 if (data_set == NULL) {
285 g_hash_table_destroy(data_set->
tickets);
292 if (data_set->
tags) {
293 g_hash_table_destroy(data_set->
tags);
302 pe_free_actions(data_set->
actions);
305 pe_free_nodes(data_set->
nodes);
330 if (data_set == NULL) {
334 crm_trace(
"Deleting %d ordering constraints",
339 crm_trace(
"Deleting %d location constraints",
344 crm_trace(
"Deleting %d colocation constraints",
349 crm_trace(
"Deleting %d ticket constraints",
366 data_set->
flags = 0x0ULL;
368 #ifdef DEFAULT_CONCURRENT_FENCING_TRUE 393 for (rIter = rsc_list;
id && rIter; rIter = rIter->next) {
423 for (; gIter != NULL; gIter = gIter->next) {
439 for (; gIter != NULL; gIter = gIter->next) {
#define CRM_CHECK(expr, failure_action)
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)
void set_working_set_defaults(pe_working_set_t *data_set)
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
resource_object_functions_t * fns
pe_node_t * pe_find_node_id(GListPtr nodes, const char *id)
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.
pe_node_t * pe_find_node_any(GListPtr nodes, const char *id, const char *uname)
#define XML_CIB_TAG_NODES
#define pe_flag_have_quorum
xmlNode * get_xpath_object(const char *xpath, xmlNode *xml_obj, int error_level)
GListPtr placement_constraints
#define XML_CIB_TAG_RESOURCES
G_GNUC_INTERNAL gboolean unpack_tags(xmlNode *xml_tags, pe_working_set_t *data_set)
#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.
const char * crm_element_value(const xmlNode *data, const char *name)
Retrieve 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.
struct pe_node_shared_s * details
G_GNUC_INTERNAL gboolean unpack_resources(xmlNode *xml_resources, pe_working_set_t *data_set)
pe_node_t * pe_find_node(GListPtr nodes, const char *uname)
#define XML_ATTR_HAVE_QUORUM
pe_resource_t * pe_find_resource(GListPtr rsc_list, const char *id)
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)
GListPtr ordering_constraints
GListPtr colocation_constraints
match resource ID or LRM history ID
pe_resource_t * pe_find_resource_with_flags(GListPtr rsc_list, const char *id, enum pe_find flags)
#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)
GListPtr ticket_constraints
crm_time_t * crm_time_new(const char *string)
#define XML_CIB_TAG_CRMCONFIG
#define XML_CIB_TAG_RSCCONFIG
#define pe__set_working_set_flags(working_set, flags_to_set)
GHashTable * digest_cache
cache of calculated resource digests
#define XML_CIB_TAG_STATUS
gboolean crm_is_true(const char *s)
G_GNUC_INTERNAL gboolean unpack_config(xmlNode *config, pe_working_set_t *data_set)
pe_resource_t *(* find_rsc)(pe_resource_t *parent, const char *search, const pe_node_t *node, int flags)
#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