 |
pacemaker
2.0.3-4b1f869f0f
Scalable High-Availability cluster resource manager
|
Go to the documentation of this file.
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");
125 for (GList *item = data_set->
resources; item != NULL;
147 pe_free_resources(
GListPtr resources)
152 while (iterator != NULL) {
154 iterator = iterator->next;
157 if (resources != NULL) {
158 g_list_free(resources);
167 while (iterator != NULL) {
169 iterator = iterator->next;
171 if (actions != NULL) {
172 g_list_free(actions);
179 for (GList *iterator = nodes; iterator != NULL; iterator = iterator->next) {
217 pe__free_ordering(
GListPtr constraints)
221 while (iterator != NULL) {
224 iterator = iterator->next;
230 if (constraints != NULL) {
231 g_list_free(constraints);
236 pe__free_location(
GListPtr constraints)
240 while (iterator != NULL) {
243 iterator = iterator->next;
249 if (constraints != NULL) {
250 g_list_free(constraints);
265 if (data_set == NULL) {
279 g_hash_table_destroy(data_set->
tickets);
286 if (data_set->
tags) {
287 g_hash_table_destroy(data_set->
tags);
296 pe_free_actions(data_set->
actions);
299 pe_free_nodes(data_set->
nodes);
324 if (data_set == NULL) {
328 crm_trace(
"Deleting %d ordering constraints",
333 crm_trace(
"Deleting %d location constraints",
338 crm_trace(
"Deleting %d colocation constraints",
343 crm_trace(
"Deleting %d ticket constraints",
360 data_set->
flags = 0x0ULL;
364 #ifdef DEFAULT_CONCURRENT_FENCING_TRUE
380 for (rIter = rsc_list;
id && rIter; rIter = rIter->next) {
410 for (; gIter != NULL; gIter = gIter->next) {
426 for (; gIter != NULL; gIter = gIter->next) {
node_t * pe_find_node_any(GListPtr nodes, const char *id, const char *uname)
xmlNode * create_xml_node(xmlNode *parent, const char *name)
gboolean unpack_tags(xmlNode *xml_tags, pe_working_set_t *data_set)
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.
node_t * pe_find_node_id(GListPtr nodes, const char *id)
#define pe_flag_stop_action_orphans
#define crm_trace(fmt, args...)
gboolean unpack_remote_nodes(xmlNode *xml_resources, pe_working_set_t *data_set)
#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...)
void free_xml(xmlNode *child)
#define XML_CIB_TAG_RSCCONFIG
#define pe_flag_quick_location
Wrappers for and extensions to libxml2.
node_t * pe_find_node(GListPtr nodes, const char *uname)
resource_t * pe_find_resource(GListPtr rsc_list, const char *id)
gboolean crm_is_true(const char *s)
#define XML_CIB_TAG_STATUS
#define set_bit(word, bit)
void(* free)(pe_resource_t *)
#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
GListPtr ordering_constraints
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)
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.
GListPtr ticket_constraints
pe_find
Determine behavior of pe_find_resource_with_flags()
resource_t * pe_find_resource_with_flags(GListPtr rsc_list, const char *id, enum pe_find flags)
crm_time_t * crm_time_new(const char *string)
gboolean unpack_resources(xmlNode *xml_resources, pe_working_set_t *data_set)
void crm_time_free(crm_time_t *dt)
gboolean unpack_config(xmlNode *config, pe_working_set_t *data_set)
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.
void pe_free_action(action_t *action)
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
resource_object_functions_t * fns
gboolean unpack_status(xmlNode *status, pe_working_set_t *data_set)
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