16 #define VARIANT_GROUP 1    26     group_variant_data_t *group_data = NULL;
    28     get_group_variant_data(group_data, rsc);
    34         pe_rsc_debug(rsc, 
"Dependency loop detected involving %s", rsc->
id);
    38     if (group_data->first_child == NULL) {
    45     rsc->
role = group_data->first_child->role;
    47     group_data->first_child->rsc_cons =
    48         g_list_concat(group_data->first_child->rsc_cons, rsc->
rsc_cons);
    51     group_data->last_child->rsc_cons_lhs =
    52         g_list_concat(group_data->last_child->rsc_cons_lhs, rsc->
rsc_cons_lhs);
    58     for (; gIter != NULL; gIter = gIter->next) {
    62                      rsc->
id, child_rsc->
id);
    63         node = child_rsc->
cmds->
allocate(child_rsc, prefer, data_set);
    64         if (group_node == NULL) {
    69     rsc->
next_role = group_data->first_child->next_role;
    72     if (group_data->colocated) {
    84     const char *value = NULL;
    89     for (; gIter != NULL; gIter = gIter->next) {
   130     group_variant_data_t *group_data = NULL;
   132     get_group_variant_data(group_data, parent);
   134     if (group_data->ordered == FALSE) {
   139     if (group_data->child_stopping && group_data->child_starting) {
   143     for (; gIter != NULL; gIter = gIter->next) {
   152             group_data->child_stopping = TRUE;
   157             group_data->child_starting = TRUE;
   170     group_variant_data_t *group_data = NULL;
   172     get_group_variant_data(group_data, rsc);
   178     for (; gIter != NULL; gIter = gIter->next) {
   188         if (last_rsc == NULL) {
   189             if (group_data->ordered) {
   194         } 
else if (group_data->colocated) {
   196                                child_rsc, last_rsc, NULL, NULL, data_set);
   219         if (group_data->ordered == FALSE) {
   226         } 
else if (last_rsc != NULL) {
   258             if (group_data->ordered
   263             last_active = child_rsc;
   266         last_rsc = child_rsc;
   269     if (group_data->ordered && last_rsc != NULL) {
   289     group_variant_data_t *group_data = NULL;
   291     if (rsc_lh == NULL) {
   292         pe_err(
"rsc_lh was NULL for %s", constraint->
id);
   295     } 
else if (rsc_rh == NULL) {
   296         pe_err(
"rsc_rh was NULL for %s", constraint->
id);
   299     if (constraint->
score == 0) {
   304     pe_rsc_trace(rsc_lh, 
"Processing constraints from %s", rsc_lh->
id);
   306     get_group_variant_data(group_data, rsc_lh);
   308     if (group_data->colocated) {
   309         group_data->first_child->cmds->rsc_colocation_lh(group_data->first_child,
   316                          "between non-colocated group and %s",
   317                          rsc_lh->
id, rsc_rh->
id);
   321     for (; gIter != NULL; gIter = gIter->next) {
   335     group_variant_data_t *group_data = NULL;
   337     get_group_variant_data(group_data, rsc_rh);
   340     if (constraint->
score == 0) {
   343     pe_rsc_trace(rsc_rh, 
"Processing RH %s of constraint %s (LH is %s)",
   344                  rsc_rh->
id, constraint->
id, rsc_lh->
id);
   349     } 
else if (group_data->colocated && group_data->first_child) {
   352             group_data->last_child->cmds->rsc_colocation_rh(rsc_lh,
   353                                                             group_data->last_child,
   358             group_data->first_child->cmds->rsc_colocation_rh(rsc_lh,
   359                                                              group_data->first_child,
   368                          " non-colocated group %s", rsc_lh->
id, rsc_rh->
id);
   372     for (; gIter != NULL; gIter = gIter->next) {
   386     for (gIter = 
action->rsc->children; gIter != NULL; gIter = gIter->next) {
   437     for (; gIter != NULL; gIter = gIter->next) {
   457     gboolean reset_scores = TRUE;
   458     group_variant_data_t *group_data = NULL;
   460     get_group_variant_data(group_data, rsc);
   462     pe_rsc_debug(rsc, 
"Processing rsc_location %s for %s", constraint->
id, rsc->
id);
   466     for (; gIter != NULL; gIter = gIter->next) {
   470         if (group_data->colocated && reset_scores) {
   471             reset_scores = FALSE;
   477     g_list_free_full(zero, free);
   497                           GHashTable *nodes, 
const char *attr, 
float factor,
   501     group_variant_data_t *group_data = NULL;
   503     get_group_variant_data(group_data, rsc);
   506         pe_rsc_info(rsc, 
"Breaking dependency loop with %s at %s", rsc->
id, rhs);
   513         group_data->first_child->cmds->merge_weights(group_data->first_child, rhs, nodes, attr,
   516     for (; gIter != NULL; gIter = gIter->next) {
   519         if (constraint->
score == 0) {
 GList * pcmk__copy_node_list(const GList *list, bool reset)
 
#define CRM_CHECK(expr, failure_action)
 
gboolean rsc_colocation_new(const char *id, const char *node_attr, int score, pe_resource_t *rsc_lh, pe_resource_t *rsc_rh, const char *state_lh, const char *state_rh, pe_working_set_t *data_set)
 
const char * task2text(enum action_tasks task)
 
#define pe_rsc_debug(rsc, fmt, args...)
 
#define pe__set_action_flags(action, flags_to_set)
 
#define stop_action(rsc, node, optional)
 
GHashTable * pcmk__group_merge_weights(pe_resource_t *rsc, const char *rhs, GHashTable *nodes, const char *attr, float factor, uint32_t flags)
 
resource_alloc_functions_t * cmds
 
void group_rsc_colocation_rh(pe_resource_t *rsc_lh, pe_resource_t *rsc_rh, rsc_colocation_t *constraint, pe_working_set_t *data_set)
 
#define pcmk__config_err(fmt...)
 
enum pe_graph_flags(* update_actions)(pe_action_t *, pe_action_t *, pe_node_t *, enum pe_action_flags, enum pe_action_flags, enum pe_ordering, pe_working_set_t *data_set)
 
enum rsc_role_e next_role
 
#define pe__show_node_weights(level, rsc, text, nodes)
 
void group_rsc_location(pe_resource_t *rsc, pe__location_t *constraint)
 
void(* internal_constraints)(pe_resource_t *, pe_working_set_t *)
 
enum pe_graph_flags native_update_actions(pe_action_t *first, pe_action_t *then, pe_node_t *node, enum pe_action_flags flags, enum pe_action_flags filter, enum pe_ordering type, pe_working_set_t *data_set)
 
void native_expand(pe_resource_t *rsc, pe_working_set_t *data_set)
 
void native_rsc_location(pe_resource_t *rsc, pe__location_t *constraint)
 
pe_node_t *(* allocate)(pe_resource_t *, pe_node_t *, pe_working_set_t *)
 
GHashTable * pcmk__native_merge_weights(pe_resource_t *rsc, const char *rhs, GHashTable *nodes, const char *attr, float factor, uint32_t flags)
 
#define pe__set_resource_flags(resource, flags_to_set)
 
void group_update_pseudo_status(pe_resource_t *parent, pe_resource_t *child)
 
#define pe_rsc_provisional
 
#define XML_RSC_ATTR_PROMOTABLE
 
#define order_stop_stop(rsc1, rsc2, type)
 
pe_resource_t * uber_parent(pe_resource_t *rsc)
 
void(* rsc_colocation_rh)(pe_resource_t *, pe_resource_t *, rsc_colocation_t *, pe_working_set_t *)
 
void group_internal_constraints(pe_resource_t *rsc, pe_working_set_t *data_set)
 
void group_rsc_colocation_lh(pe_resource_t *rsc_lh, pe_resource_t *rsc_rh, rsc_colocation_t *constraint, pe_working_set_t *data_set)
 
const char * node_attribute
 
#define pe__clear_action_flags(action, flags_to_clear)
 
enum action_tasks get_complex_task(pe_resource_t *rsc, const char *name, gboolean allow_non_atomic)
 
#define pcmk_is_set(g, f)
Convenience alias for pcmk_all_flags_set(), to check single flag.
 
#define pe_rsc_promotable
 
void(* expand)(pe_resource_t *, pe_working_set_t *)
 
enum pe_restart restart_type
 
void group_create_actions(pe_resource_t *rsc, pe_working_set_t *data_set)
 
enum pe_action_flags(* action_flags)(pe_action_t *, pe_node_t *)
 
#define pe_rsc_allocating
 
enum pe_obj_types variant
 
int new_rsc_order(pe_resource_t *lh_rsc, const char *lh_task, pe_resource_t *rh_rsc, const char *rh_task, enum pe_ordering type, pe_working_set_t *data_set)
 
void(* rsc_colocation_lh)(pe_resource_t *, pe_resource_t *, rsc_colocation_t *, pe_working_set_t *)
 
#define promoted_key(rsc)
 
#define start_action(rsc, node, optional)
 
pe_node_t * pcmk__group_allocate(pe_resource_t *rsc, pe_node_t *prefer, pe_working_set_t *data_set)
 
void(* rsc_location)(pe_resource_t *, pe__location_t *)
 
void group_expand(pe_resource_t *rsc, pe_working_set_t *data_set)
 
#define pe__clear_resource_flags(resource, flags_to_clear)
 
void(* create_actions)(pe_resource_t *, pe_working_set_t *)
 
void group_append_meta(pe_resource_t *rsc, xmlNode *xml)
 
enum pe_graph_flags group_update_actions(pe_action_t *first, pe_action_t *then, pe_node_t *node, enum pe_action_flags flags, enum pe_action_flags filter, enum pe_ordering type, pe_working_set_t *data_set)
 
#define order_start_start(rsc1, rsc2, type)
 
gboolean crm_is_true(const char *s)
 
#define pe_rsc_trace(rsc, fmt, args...)
 
#define pe__set_order_flags(order_flags, flags_to_set)
 
pe_action_t * find_first_action(GListPtr input, const char *uuid, const char *task, pe_node_t *on_node)
 
#define pe__clear_raw_action_flags(action_flags, action_name, flags_to_clear)
 
enum crm_ais_msg_types type
 
#define pe_rsc_info(rsc, fmt, args...)
 
pe_action_t * custom_action(pe_resource_t *rsc, char *key, const char *task, pe_node_t *on_node, gboolean optional, gboolean foo, pe_working_set_t *data_set)
 
GHashTable * allowed_nodes
 
enum pe_action_flags group_action_flags(pe_action_t *action, pe_node_t *node)