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: lib by andrew from 
      ([email protected])
   2. Linux-HA CVS: crm by andrew from 
      ([email protected])
   3. Linux-HA CVS: lib by andrew from 
      ([email protected])


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

Message: 1
Date: Thu, 16 Feb 2006 08:20:34 -0700 (MST)
From: [email protected]
Subject: [Linux-ha-cvs] Linux-HA CVS: lib by andrew from 
To: [EMAIL PROTECTED]
Message-ID: <[EMAIL PROTECTED]>

linux-ha CVS committal

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

Dir     : linux-ha/lib/crm/transition


Modified Files:
        graph.c utils.c 


Log Message:
Remove a heap of crud from the TE
Update the graph with crm_action_t objects 
Dont mark anyone "ready" if they depend on a failed action
Always update the graph if we found a match for an event
Some logging improvements, complain about a few more things

===================================================================
RCS file: /home/cvs/linux-ha/linux-ha/lib/crm/transition/graph.c,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -3 -r1.1 -r1.2
--- graph.c     14 Feb 2006 11:32:12 -0000      1.1
+++ graph.c     16 Feb 2006 15:20:33 -0000      1.2
@@ -1,4 +1,4 @@
-/* $Id: graph.c,v 1.1 2006/02/14 11:32:12 andrew Exp $ */
+/* $Id: graph.c,v 1.2 2006/02/16 15:20:33 andrew Exp $ */
 /* 
  * Copyright (C) 2004 Andrew Beekhof <[EMAIL PROTECTED]>
  * 
@@ -64,27 +64,36 @@
 update_synapse_confirmed(synapse_t *synapse, int action_id) 
 {
        gboolean updates = FALSE;
+       gboolean is_confirmed = TRUE;
+       
        CRM_DEV_ASSERT(synapse->executed);
        CRM_DEV_ASSERT(synapse->confirmed == FALSE);
 
-       synapse->confirmed = TRUE;
+       is_confirmed = TRUE;
        slist_iter(
                action, crm_action_t, synapse->actions, lpc,
                
                crm_debug_3("Processing action %d", action->id);
                
                if(action->id == action_id) {
-                       crm_debug_2("Marking action %d of synapse %d confirmed",
-                                   action_id, synapse->id);
+                       crm_debug("Marking action %d of synapse %d confirmed",
+                                 action_id, synapse->id);
                        action->confirmed = TRUE;
                        updates = TRUE;
 
                } else if(action->confirmed == FALSE) {
-                       synapse->confirmed = FALSE;
+                       is_confirmed = FALSE;
+                       crm_debug("Synapse %d still not confirmed after action 
%d",
+                                 synapse->id, action_id);
                }
                
                );
 
+       if(is_confirmed) {
+               synapse->confirmed = TRUE;
+               updates = TRUE;
+       }
+       
        if(updates) {
                crm_debug("Updated synapse %d", synapse->id);
        }
@@ -92,7 +101,7 @@
 }
 
 gboolean
-update_graph(crm_graph_t *graph, int action_id) 
+update_graph(crm_graph_t *graph, crm_action_t *action) 
 {
        gboolean rc = FALSE;
        gboolean updates = FALSE;
@@ -103,16 +112,16 @@
                        
                } else if (synapse->executed) {
                        crm_debug_2("Synapse executed");
-                       rc = update_synapse_confirmed(synapse, action_id);
+                       rc = update_synapse_confirmed(synapse, action->id);
 
-               } else {
-                       rc = update_synapse_ready(synapse, action_id);
+               } else if(action->failed == FALSE) {
+                       rc = update_synapse_ready(synapse, action->id);
                }
                updates = updates || rc;
                );
        
        if(updates) {
-               crm_debug("Updated graph with completed action %d", action_id);
+               crm_debug("Updated graph with completed action %d", action->id);
        }
        return updates;
 }
@@ -238,13 +247,14 @@
        int stat_log_level = LOG_DEBUG;
        int pass_result = transition_active;
 
-       crm_debug("Entering graph callback");
        if(graph_fns == NULL) {
                set_default_graph_functions();
        }
        if(graph == NULL) {
                return transition_complete;
        }
+
+       crm_debug("Entering graph %d callback", graph->id);
        
        slist_iter(
                synapse, synapse_t, graph->synapses, lpc,
@@ -284,14 +294,16 @@
                } else if(num_skipped != 0) {
                        stat_log_level = LOG_NOTICE;
                }
-               crm_log_maybe(stat_log_level,
-                             "Transition %d complete", graph->id);
-
+               print_graph(stat_log_level+2, graph);
+               crm_log_maybe(stat_log_level+2,
+                             "==============================================");
        }
-       crm_log_maybe(stat_log_level, "Complete: %d, Pending: %d,"
+       
+       crm_log_maybe(stat_log_level, "Transition %d Complete: %d, Pending: %d,"
                      " Fired: %d, Skipped: %d, Incomplete: %d",
-                     num_complete, num_pending, num_fired,
+                     graph->id, num_complete, num_pending, num_fired,
                      num_skipped, num_incomplete);
+
        
        return pass_result;
 }
===================================================================
RCS file: /home/cvs/linux-ha/linux-ha/lib/crm/transition/utils.c,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -3 -r1.1 -r1.2
--- utils.c     14 Feb 2006 11:32:12 -0000      1.1
+++ utils.c     16 Feb 2006 15:20:33 -0000      1.2
@@ -1,4 +1,4 @@
-/* $Id: utils.c,v 1.1 2006/02/14 11:32:12 andrew Exp $ */
+/* $Id: utils.c,v 1.2 2006/02/16 15:20:33 andrew Exp $ */
 /* 
  * Copyright (C) 2004 Andrew Beekhof <[EMAIL PROTECTED]>
  * 
@@ -34,7 +34,7 @@
 {
        crm_debug("Dummy event handler: action %d executed", action->id);
        action->confirmed = TRUE;
-       update_graph(graph, action->id);
+       update_graph(graph, action);
        return TRUE;
 }
 




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

Message: 2
Date: Thu, 16 Feb 2006 08:22:09 -0700 (MST)
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/crmd


Modified Files:
        fsa_matrix.h 


Log Message:
This could happen but its harmless and doesnt need to be an error.

===================================================================
RCS file: /home/cvs/linux-ha/linux-ha/crm/crmd/fsa_matrix.h,v
retrieving revision 1.65
retrieving revision 1.66
diff -u -3 -r1.65 -r1.66
--- fsa_matrix.h        14 Feb 2006 11:55:07 -0000      1.65
+++ fsa_matrix.h        16 Feb 2006 15:22:09 -0000      1.66
@@ -1052,7 +1052,7 @@
                /* S_INTEGRATION        ==> */  A_ERROR|A_SHUTDOWN|O_RELEASE,
                /* S_FINALIZE_JOIN      ==> */  A_ERROR|A_SHUTDOWN|O_RELEASE,
                /* S_NOT_DC             ==> */  A_SHUTDOWN,
-               /* S_POLICY_ENGINE      ==> */  A_ERROR|A_SHUTDOWN|O_RELEASE,
+               /* S_POLICY_ENGINE      ==> */  A_WARN|A_SHUTDOWN|O_RELEASE,
                /* S_RECOVERY           ==> */  A_ERROR|A_SHUTDOWN|O_RELEASE,
                /* S_RELEASE_DC         ==> */  A_ERROR|A_SHUTDOWN|O_RELEASE,
                /* S_STARTING           ==> */  A_SHUTDOWN,




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

Message: 3
Date: Thu, 16 Feb 2006 08:24:31 -0700 (MST)
From: [email protected]
Subject: [Linux-ha-cvs] Linux-HA CVS: lib by andrew from 
To: [EMAIL PROTECTED]
Message-ID: <[EMAIL PROTECTED]>

linux-ha CVS committal

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

Dir     : linux-ha/lib/crm/common


Modified Files:
        xml.c 


Log Message:
Fix the id-collision logging
Never prune xml-diffs, especially "adds" (this is related to bug 1075)

===================================================================
RCS file: /home/cvs/linux-ha/linux-ha/lib/crm/common/xml.c,v
retrieving revision 1.56
retrieving revision 1.57
diff -u -3 -r1.56 -r1.57
--- xml.c       3 Feb 2006 09:00:31 -0000       1.56
+++ xml.c       16 Feb 2006 15:24:31 -0000      1.57
@@ -1,4 +1,4 @@
-/* $Id: xml.c,v 1.56 2006/02/03 09:00:31 andrew Exp $ */
+/* $Id: xml.c,v 1.57 2006/02/16 15:24:31 andrew Exp $ */
 /* 
  * Copyright (C) 2004 Andrew Beekhof <[EMAIL PROTECTED]>
  * 
@@ -1606,35 +1606,32 @@
        tmp1 = subtract_xml_object(old, new, suppress);
        if(tmp1 != NULL) {
                diff = create_xml_node(NULL, "diff");
+/*
                if(can_prune_leaf(tmp1)) {
                        ha_msg_del(tmp1);
                        tmp1 = NULL;
                } else {
-                       removed = create_xml_node(diff, "diff-removed");
-                       added = create_xml_node(diff, "diff-added");
-                       add_node_copy(removed, tmp1);
-               }
+*/
+               removed = create_xml_node(diff, "diff-removed");
+               added = create_xml_node(diff, "diff-added");
+               add_node_copy(removed, tmp1);
+
                free_xml(tmp1);
        }
        
        tmp1 = subtract_xml_object(new, old, suppress);
        if(tmp1 != NULL) {
+               /* never filter added nodes */
                if(diff == NULL) {
                        diff = create_xml_node(NULL, "diff");
                }
-               if(can_prune_leaf(tmp1)) {
-                       ha_msg_del(tmp1);
-                       tmp1 = NULL;
-
-               } else {
-                       if(removed == NULL) {
-                               removed = create_xml_node(diff, "diff-removed");
-                       }
-                       if(added == NULL) {
-                               added = create_xml_node(diff, "diff-added");
-                       }
-                       add_node_copy(added, tmp1);
+               if(removed == NULL) {
+                       removed = create_xml_node(diff, "diff-removed");
+               }
+               if(added == NULL) {
+                       added = create_xml_node(diff, "diff-added");
                }
+               add_node_copy(added, tmp1);
                free_xml(tmp1);
        }
 
@@ -2225,14 +2222,15 @@
                        lookup_id = crm_concat(tag_name, tag_id, '-');
                        lookup_value = g_hash_table_lookup(id_hash, lookup_id);
                        if(lookup_value != NULL) {
+                               char *old_id = crm_strdup(tag_id);
                                modified = TRUE;
-                               crm_err("\"id\" collision detected.");
-                               crm_err(" Multiple %s entries with id=\"%s\","
-                                       " assigned id=\"%s\"",
-                                       tag_name, lookup_value, tag_id);
                                assign_uuid(xml_obj);
                                tag_id = ID(xml_obj);
-                       } 
+                               crm_err("\"id\" collision detected..."
+                                       " Multiple '%s' entries with id=\"%s\","
+                                       " assigned id=\"%s\"",
+                                       tag_name, old_id, tag_id);
+                       }
                        g_hash_table_insert(
                                id_hash, lookup_id, crm_strdup(tag_id));
                        break;




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

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


End of Linux-ha-cvs Digest, Vol 27, Issue 69
********************************************

Reply via email to