Send Linux-ha-cvs mailing list submissions to
        [email protected]

To subscribe or unsubscribe via the World Wide Web, visit
        http://lists.community.tummy.com/mailman/listinfo/linux-ha-cvs
or, via email, send a message with subject or body 'help' to
        [EMAIL PROTECTED]

You can reach the person managing the list at
        [EMAIL PROTECTED]

When replying, please edit your Subject line so it is more specific
than "Re: Contents of Linux-ha-cvs digest..."


Today's Topics:

   1. Linux-HA CVS: crm by andrew from 
      ([email protected])


----------------------------------------------------------------------

Message: 1
Date: Tue, 30 May 2006 03:24:04 -0600 (MDT)
From: [email protected]
Subject: [Linux-ha-cvs] Linux-HA CVS: crm by andrew from 
To: [EMAIL PROTECTED]
Message-ID: <[EMAIL PROTECTED]>

linux-ha CVS committal

Author  : andrew
Host    : 
Project : linux-ha
Module  : crm

Dir     : linux-ha/crm/pengine


Modified Files:
        complex.c graph.c rules.c stages.c unpack.c utils.c 


Log Message:


Logging changes to make debug level 2 usable. 

===================================================================
RCS file: /home/cvs/linux-ha/linux-ha/crm/pengine/complex.c,v
retrieving revision 1.94
retrieving revision 1.95
diff -u -3 -r1.94 -r1.95
--- complex.c   30 May 2006 08:54:32 -0000      1.94
+++ complex.c   30 May 2006 09:24:03 -0000      1.95
@@ -1,4 +1,4 @@
-/* $Id: complex.c,v 1.94 2006/05/30 08:54:32 andrew Exp $ */
+/* $Id: complex.c,v 1.95 2006/05/30 09:24:03 andrew Exp $ */
 /* 
  * Copyright (C) 2004 Andrew Beekhof <[EMAIL PROTECTED]>
  * 
@@ -500,7 +500,7 @@
                return;
        }
        
-       crm_debug_2("Adding attributes from %s", pair->name);
+       crm_debug_3("Adding attributes from %s", pair->name);
        attributes = cl_get_struct(pair->attr_set, XML_TAG_ATTRS);
        populate_hash(attributes, unpack_data->hash,
                      unpack_data->attrs, unpack_data->attrs_length);
@@ -534,7 +534,7 @@
                return;
        }
 
-       crm_debug_2("Checking for attributes");
+       crm_debug_4("Checking for attributes");
        xml_child_iter_filter(
                xml_obj, attr_set, set_name,
 
===================================================================
RCS file: /home/cvs/linux-ha/linux-ha/crm/pengine/graph.c,v
retrieving revision 1.94
retrieving revision 1.95
diff -u -3 -r1.94 -r1.95
--- graph.c     25 May 2006 10:26:49 -0000      1.94
+++ graph.c     30 May 2006 09:24:03 -0000      1.95
@@ -1,4 +1,4 @@
-/* $Id: graph.c,v 1.94 2006/05/25 10:26:49 andrew Exp $ */
+/* $Id: graph.c,v 1.95 2006/05/30 09:24:03 andrew Exp $ */
 /* 
  * Copyright (C) 2004 Andrew Beekhof <[EMAIL PROTECTED]>
  * 
@@ -468,7 +468,7 @@
                }
        }
        
-       crm_log_xml_debug_2(action_xml, "dumped action");
+       crm_log_xml_debug_4(action_xml, "dumped action");
        
        return action_xml;
 }
===================================================================
RCS file: /home/cvs/linux-ha/linux-ha/crm/pengine/rules.c,v
retrieving revision 1.25
retrieving revision 1.26
diff -u -3 -r1.25 -r1.26
--- rules.c     17 May 2006 12:06:47 -0000      1.25
+++ rules.c     30 May 2006 09:24:03 -0000      1.26
@@ -1,4 +1,4 @@
-/* $Id: rules.c,v 1.25 2006/05/17 12:06:47 andrew Exp $ */
+/* $Id: rules.c,v 1.26 2006/05/30 09:24:03 andrew Exp $ */
 /* 
  * Copyright (C) 2004 Andrew Beekhof <[EMAIL PROTECTED]>
  * 
@@ -126,7 +126,10 @@
                        accept = FALSE;
        }
                
-       crm_debug_2("Expression %s %s", ID(expr), accept?"passed":"failed");
+       crm_debug_2("Expression %s %s on %s for %s",
+                   ID(expr), accept?"passed":"failed",
+                   node?node->details->uname:"all ndoes",
+                   rsc?rsc->id:"all resources");
        return accept;
 }
 
===================================================================
RCS file: /home/cvs/linux-ha/linux-ha/crm/pengine/stages.c,v
retrieving revision 1.101
retrieving revision 1.102
diff -u -3 -r1.101 -r1.102
--- stages.c    30 May 2006 08:55:43 -0000      1.101
+++ stages.c    30 May 2006 09:24:03 -0000      1.102
@@ -1,4 +1,4 @@
-/* $Id: stages.c,v 1.101 2006/05/30 08:55:43 andrew Exp $ */
+/* $Id: stages.c,v 1.102 2006/05/30 09:24:03 andrew Exp $ */
 /* 
  * Copyright (C) 2004 Andrew Beekhof <[EMAIL PROTECTED]>
  * 
@@ -511,7 +511,7 @@
        node_t *chosen = NULL;
        int multiple = 0;
 
-       crm_debug_2("Choosing node for color %d", color->id);
+       crm_debug_3("Choosing node for color %d", color->id);
        color->details->candidate_nodes = g_list_sort(nodes, sort_node_weight);
        nodes = color->details->candidate_nodes;
 
@@ -540,8 +540,8 @@
        }
 
        slist_iter(candidate, node_t, nodes, lpc, 
-                  crm_debug("Color %d, Node %s: %d", color->id,
-                            candidate->details->uname, candidate->weight);
+                  crm_debug_2("Color %d, Node[%d] %s: %d", color->id, lpc,
+                              candidate->details->uname, candidate->weight);
                   if(chosen->weight > 0
                      && candidate->details->unclean == FALSE
                      && candidate->weight == chosen->weight) {
@@ -574,7 +574,6 @@
         * new resource count
         */
 
-       crm_debug_2("assigned %s to color %d",chosen->details->uname,color->id);
        chosen->details->num_resources += color->details->num_resources;
        color->details->chosen_node = node_copy(chosen);
        
===================================================================
RCS file: /home/cvs/linux-ha/linux-ha/crm/pengine/unpack.c,v
retrieving revision 1.198
retrieving revision 1.199
diff -u -3 -r1.198 -r1.199
--- unpack.c    30 May 2006 08:54:33 -0000      1.198
+++ unpack.c    30 May 2006 09:24:03 -0000      1.199
@@ -1,4 +1,4 @@
-/* $Id: unpack.c,v 1.198 2006/05/30 08:54:33 andrew Exp $ */
+/* $Id: unpack.c,v 1.199 2006/05/30 09:24:03 andrew Exp $ */
 /* 
  * Copyright (C) 2004 Andrew Beekhof <[EMAIL PROTECTED]>
  * 
@@ -1021,21 +1021,21 @@
                           interval_s = get_interval(rsc_op);
                           interval = crm_parse_int(interval_s, "0");
                           if(interval == 0) {
-                                  crm_debug_3("Skipping %s/%s: non-recurring",
+                                  crm_debug_4("Skipping %s/%s: non-recurring",
                                               id, node->details->uname);
                                   continue;
                           }
 
                           status = crm_element_value(rsc_op, 
XML_LRM_ATTR_OPSTATUS);
                           if(safe_str_eq(status, "-1")) {
-                                  crm_debug_3("Skipping %s/%s: status",
+                                  crm_debug_4("Skipping %s/%s: status",
                                               id, node->details->uname);
                                   continue;
                           }
                           task = crm_element_value(rsc_op, XML_LRM_ATTR_TASK);
                           /* create the action */
                           key = generate_op_key(rsc->id, task, interval);
-                          crm_debug_2("Creating %s/%s", key, 
node->details->uname);
+                          crm_debug_3("Creating %s/%s", key, 
node->details->uname);
                           custom_action(rsc, key, task, node,
                                         TRUE, TRUE, data_set);
                        );
@@ -1131,17 +1131,17 @@
                sort_return(0);
 
        } else if(a_call_id >= 0 && a_call_id < b_call_id) {
-               crm_debug_2("%s (%d) < %s (%d) : call id",
+               crm_debug_4("%s (%d) < %s (%d) : call id",
                            ID(a), a_call_id, ID(b), b_call_id);
                sort_return(-1);
 
        } else if(b_call_id >= 0 && a_call_id > b_call_id) {
-               crm_debug_2("%s (%d) > %s (%d) : call id",
+               crm_debug_4("%s (%d) > %s (%d) : call id",
                            ID(a), a_call_id, ID(b), b_call_id);
                sort_return(1);
        }
 
-       crm_debug_3("%s (%d) == %s (%d) : continuing",
+       crm_debug_5("%s (%d) == %s (%d) : continuing",
                    ID(a), a_call_id, ID(b), b_call_id);
        
        /* now process pending ops */
@@ -1183,12 +1183,12 @@
                }
                
        } else if((a_id >= 0 && a_id < b_id) || b_id == -1) {
-               crm_debug_2("%s (%d) < %s (%d) : transition",
+               crm_debug_3("%s (%d) < %s (%d) : transition",
                            ID(a), a_id, ID(b), b_id);
                sort_return(-1);
 
        } else if((b_id >= 0 && a_id > b_id) || a_id == -1) {
-               crm_debug_2("%s (%d) > %s (%d) : transition",
+               crm_debug_3("%s (%d) > %s (%d) : transition",
                            ID(a), a_id, ID(b), b_id);
                sort_return(1);
        }
@@ -1404,11 +1404,8 @@
        } else if(safe_str_eq(task, CRMD_ACTION_STOP)) {
                crm_debug_2("Ignoring stop params: %s", id);
 
-       } else if(is_probe || safe_str_eq(task, CRMD_ACTION_START)) {
-               crm_debug_2("Checking resource definition: %s", rsc->id);
-               check_action_definition(rsc, node, xml_op, data_set);
-               
-       } else if(interval > 0) {
+       } else if(is_probe || safe_str_eq(task, CRMD_ACTION_START) || interval 
> 0) {
+               crm_debug_3("Checking resource definition: %s", rsc->id);
                check_action_definition(rsc, node, xml_op, data_set);
        }
        
@@ -1519,7 +1516,7 @@
                                rsc->role = RSC_ROLE_SLAVE;
                                
                        } else if(rsc->role < RSC_ROLE_STARTED) {
-                               crm_debug_2("%s active on %s",
+                               crm_debug_3("%s active on %s",
                                            rsc->id, node->details->uname);
                                rsc->role = RSC_ROLE_STARTED;
                        }
@@ -1579,7 +1576,7 @@
                        break;
        }
 
-       crm_debug_2("Resource %s after %s: role=%s",
+       crm_debug_3("Resource %s after %s: role=%s",
                    rsc->id, task, role2text(rsc->role));
 
        pe_free_action(action);
@@ -1963,7 +1960,7 @@
        boolean = crm_element_value(rule_xml, XML_RULE_ATTR_BOOLEAN_OP);
        role = crm_element_value(rule_xml, XML_RULE_ATTR_ROLE);
 
-       crm_debug_2("processing rule: %s", rule_id);
+       crm_debug_2("Processing rule: %s", rule_id);
 
        if(role != NULL && text2role(role) == RSC_ROLE_UNKNOWN) {
                pe_err("Bad role specified for %s: %s", rule_id, role);
@@ -2073,7 +2070,7 @@
                return NULL;
        } 
 
-       crm_debug_2("%s: %d nodes matched",
+       crm_debug_3("%s: %d nodes matched",
                    rule_id, g_list_length(location_rule->node_list_rh));
        crm_action_debug_3(print_rsc_to_node("Added", location_rule, FALSE));
        return location_rule;
===================================================================
RCS file: /home/cvs/linux-ha/linux-ha/crm/pengine/utils.c,v
retrieving revision 1.139
retrieving revision 1.140
diff -u -3 -r1.139 -r1.140
--- utils.c     30 May 2006 08:54:33 -0000      1.139
+++ utils.c     30 May 2006 09:24:03 -0000      1.140
@@ -1,4 +1,4 @@
-/* $Id: utils.c,v 1.139 2006/05/30 08:54:33 andrew Exp $ */
+/* $Id: utils.c,v 1.140 2006/05/30 09:24:03 andrew Exp $ */
 /* 
  * Copyright (C) 2004 Andrew Beekhof <[EMAIL PROTECTED]>
  * 
@@ -626,14 +626,14 @@
        }
 
        if(node1_weight > node2_weight) {
-               crm_debug_2("%s (%d) > %s (%d) : weight",
+               crm_debug_3("%s (%d) > %s (%d) : weight",
                            node1->details->uname, node1_weight,
                            node2->details->uname, node2_weight);
                return -1;
        }
        
        if(node1_weight < node2_weight) {
-               crm_debug_2("%s (%d) < %s (%d) : weight",
+               crm_debug_3("%s (%d) < %s (%d) : weight",
                            node1->details->uname, node1_weight,
                            node2->details->uname, node2_weight);
                return 1;
@@ -646,14 +646,14 @@
        /* now try to balance resources across the cluster */
        if(node1->details->num_resources
           < node2->details->num_resources) {
-               crm_debug_2("%s (%d) < %s (%d) : resources",
+               crm_debug_3("%s (%d) < %s (%d) : resources",
                            node1->details->uname, 
node1->details->num_resources,
                            node2->details->uname, 
node2->details->num_resources);
                return -1;
                
        } else if(node1->details->num_resources
                  > node2->details->num_resources) {
-               crm_debug_2("%s (%d) > %s (%d) : resources",
+               crm_debug_3("%s (%d) > %s (%d) : resources",
                            node1->details->uname, 
node1->details->num_resources,
                            node2->details->uname, 
node2->details->num_resources);
                return 1;
@@ -694,10 +694,12 @@
        }
 
        if(action == NULL) {
-               crm_debug_2("Creating action %d: %s for %s on %s",
-                           data_set->action_id, task, rsc?rsc->id:"<NULL>",
-                           on_node?on_node->details->uname:"<NULL>");
-
+               if(save_action) {
+                       crm_debug_2("Creating%s action %d: %s for %s on %s",
+                                   optional?"":" manditory", 
data_set->action_id, key, rsc?rsc->id:"<NULL>",
+                                   on_node?on_node->details->uname:"<NULL>");
+               }
+               
                crm_malloc0(action, sizeof(action_t));
                if(action != NULL) {
                        if(save_action) {
@@ -717,7 +719,7 @@
                        action->dumped     = FALSE;
                        action->runnable   = TRUE;
                        action->processed  = FALSE;
-                       action->optional   = TRUE;
+                       action->optional   = optional;
                        action->seen_count = 0;
                        
                        action->extra = g_hash_table_new_full(
@@ -746,7 +748,9 @@
                                                rsc->actions, action);
                                }
                        }
-                       crm_debug_4("Action %d created", action->id);
+                       if(save_action) {
+                               crm_debug_4("Action %d created", action->id);
+                       }
                }
        }
 
@@ -798,7 +802,7 @@
                        }
                        
                } else if(action->needs == rsc_req_nothing) {
-                       crm_debug_2("Action %s doesnt require anything",
+                       crm_debug_3("Action %s doesnt require anything",
                                  action->uuid);
                        action->runnable = TRUE;
 #if 0
@@ -807,7 +811,7 @@
                         * - if we dont have quorum we cant stonith anyway
                         */
                } else if(action->needs == rsc_req_stonith) {
-                       crm_debug_2("Action %s requires only stonith", 
action->uuid);
+                       crm_debug_3("Action %s requires only stonith", 
action->uuid);
                        action->runnable = TRUE;
 #endif
                } else if(data_set->have_quorum == FALSE
@@ -819,7 +823,7 @@
                        
                } else if(data_set->have_quorum == FALSE
                        && data_set->no_quorum_policy == no_quorum_freeze) {
-                       crm_debug_2("Check resource is already active");
+                       crm_debug_3("Check resource is already active");
                        if(rsc->fns->active(rsc, TRUE) == FALSE) {
                                action->runnable = FALSE;
                                crm_debug("%s\t%s %s (cancelled : quorum 
freeze)",
@@ -828,7 +832,7 @@
                        }
 
                } else {
-                       crm_debug_2("Action %s is runnable", action->uuid);
+                       crm_debug_3("Action %s is runnable", action->uuid);
                        action->runnable = TRUE;
                }
 
@@ -900,7 +904,7 @@
                action->needs = rsc_req_quorum;
                value = "quorum (default)";
        }
-       crm_debug_2("\tAction %s requires: %s", action->task, value);
+       crm_debug_3("\tAction %s requires: %s", action->task, value);
 
        value = NULL;
        if(xml_obj != NULL) {
@@ -973,7 +977,7 @@
                value = "restart (and possibly migrate) (default)";
        }
        
-       crm_debug_2("\t%s failure handling: %s", action->task, value);
+       crm_debug_3("\t%s failure handling: %s", action->task, value);
 
        value = NULL;
        if(xml_obj != NULL) {
@@ -990,7 +994,7 @@
                        action->fail_role = RSC_ROLE_STARTED;
                }
        }
-       crm_debug_2("\t%s failure results in: %s",
+       crm_debug_3("\t%s failure results in: %s",
                    action->task, role2text(action->fail_role));
        
        if(xml_obj == NULL) {
@@ -1066,7 +1070,7 @@
                        return op;
                }
                );
-       crm_debug_2("No match for %s", key);
+       crm_debug_3("No match for %s", key);
        return op;
 }
 




------------------------------

_______________________________________________
Linux-ha-cvs mailing list
[email protected]
http://lists.community.tummy.com/mailman/listinfo/linux-ha-cvs


End of Linux-ha-cvs Digest, Vol 30, Issue 103
*********************************************

Reply via email to