 |
pacemaker
2.0.4-2deceaa3ae
Scalable High-Availability cluster resource manager
|
Go to the documentation of this file.
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) {
113 crm_warn(
"Fencing and resource management disabled due to lack of quorum");
130 for (GList *item = data_set->
resources; item != NULL;
152 pe_free_resources(
GListPtr resources)
157 while (iterator != NULL) {
159 iterator = iterator->next;
162 if (resources != NULL) {
163 g_list_free(resources);
172 while (iterator != NULL) {
174 iterator = iterator->next;
176 if (actions != NULL) {
177 g_list_free(actions);
184 for (GList *iterator = nodes; iterator != NULL; iterator = iterator->next) {
222 pe__free_ordering(
GListPtr constraints)
226 while (iterator != NULL) {
229 iterator = iterator->next;
235 if (constraints != NULL) {
236 g_list_free(constraints);
241 pe__free_location(
GListPtr constraints)
245 while (iterator != NULL) {
248 iterator = iterator->next;
254 if (constraints != NULL) {
255 g_list_free(constraints);
270 if (data_set == NULL) {
284 g_hash_table_destroy(data_set->
tickets);
291 if (data_set->
tags) {
292 g_hash_table_destroy(data_set->
tags);
301 pe_free_actions(data_set->
actions);
304 pe_free_nodes(data_set->
nodes);
329 if (data_set == NULL) {
333 crm_trace(
"Deleting %d ordering constraints",
338 crm_trace(
"Deleting %d location constraints",
343 crm_trace(
"Deleting %d colocation constraints",
348 crm_trace(
"Deleting %d ticket constraints",
365 data_set->
flags = 0x0ULL;
369 #ifdef DEFAULT_CONCURRENT_FENCING_TRUE
385 for (rIter = rsc_list;
id && rIter; rIter = rIter->next) {
415 for (; gIter != NULL; gIter = gIter->next) {
431 for (; gIter != NULL; gIter = gIter->next) {
void pe_free_action(pe_action_t *action)
G_GNUC_INTERNAL gboolean unpack_status(xmlNode *status, pe_working_set_t *data_set)
xmlNode * create_xml_node(xmlNode *parent, const char *name)
pe_resource_t * pe_find_resource(GListPtr rsc_list, const char *id)
xmlNode * get_xpath_object(const char *xpath, xmlNode *xml_obj, int error_level)
#define XML_CIB_TAG_OPCONFIG
#define CRM_CHECK(expr, failure_action)
#define pe_flag_have_status
#define clear_bit(word, bit)
GHashTable * digest_cache
cache of calculated resource digests
struct pe_node_shared_s * details
void pe_free_working_set(pe_working_set_t *data_set)
Free a working set.
G_GNUC_INTERNAL gboolean unpack_remote_nodes(xmlNode *xml_resources, pe_working_set_t *data_set)
#define pe_flag_stop_action_orphans
#define crm_trace(fmt, args...)
#define safe_str_eq(a, b)
#define XML_CIB_TAG_RESOURCES
gboolean pe__is_guest_or_remote_node(pe_node_t *node)
#define crm_warn(fmt, args...)
int order_id
Deprecated (will be removed in a future release)
void free_xml(xmlNode *child)
#define XML_CIB_TAG_RSCCONFIG
#define pe_flag_quick_location
Wrappers for and extensions to libxml2.
G_GNUC_INTERNAL gboolean unpack_tags(xmlNode *xml_tags, pe_working_set_t *data_set)
gboolean crm_is_true(const char *s)
#define XML_CIB_TAG_STATUS
#define set_bit(word, bit)
void(* free)(pe_resource_t *)
pe_node_t * pe_find_node(GListPtr nodes, const char *uname)
pe_node_t * pe_find_node_id(GListPtr nodes, const char *id)
#define XML_CIB_TAG_NODES
gboolean cluster_status(pe_working_set_t *data_set)
void set_working_set_defaults(pe_working_set_t *data_set)
GListPtr colocation_constraints
G_GNUC_INTERNAL gboolean unpack_resources(xmlNode *xml_resources, pe_working_set_t *data_set)
GListPtr ordering_constraints
G_GNUC_INTERNAL gboolean unpack_nodes(xmlNode *xml_nodes, pe_working_set_t *data_set)
const char * crm_element_value(const xmlNode *data, const char *name)
Retrieve the value of an XML attribute.
void pe_reset_working_set(pe_working_set_t *data_set)
Reset a working set to default state without freeing it.
GHashTable * template_rsc_sets
pe_working_set_t * pe_new_working_set()
Create a new working set.
GListPtr placement_constraints
@ pe_find_renamed
match resource ID or LRM history ID
#define XML_CIB_TAG_CRMCONFIG
#define pe_flag_concurrent_fencing
void pe__free_param_checks(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.
GListPtr ticket_constraints
pe_find
Determine behavior of pe_find_resource_with_flags()
crm_time_t * crm_time_new(const char *string)
void crm_time_free(crm_time_t *dt)
pe_resource_t * pe_find_resource_with_flags(GListPtr rsc_list, const char *id, enum pe_find flags)
enum pe_quorum_policy no_quorum_policy
#define pe_flag_symmetric_cluster
#define pe_flag_no_counts
Don't count total, disabled and blocked resource instances.
pe_node_t * pe_find_node_any(GListPtr nodes, const char *id, const char *uname)
pe_resource_t *(* find_rsc)(pe_resource_t *parent, const char *search, const pe_node_t *node, int flags)
#define pe_flag_stop_rsc_orphans
#define pe_flag_have_quorum
G_GNUC_INTERNAL gboolean unpack_config(xmlNode *config, pe_working_set_t *data_set)
resource_object_functions_t * fns
void cleanup_calculations(pe_working_set_t *data_set)
Reset working set to default state without freeing it or constraints.
#define XML_ATTR_HAVE_QUORUM