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


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

Message: 1
Date: Fri, 17 Feb 2006 06:30:39 -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/tengine


Modified Files:
        actions.c callbacks.c 


Log Message:


Logging changes, particualrly around the end of a transition.

===================================================================
RCS file: /home/cvs/linux-ha/linux-ha/crm/tengine/actions.c,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -3 -r1.9 -r1.10
--- actions.c   16 Feb 2006 15:20:32 -0000      1.9
+++ actions.c   17 Feb 2006 13:30:39 -0000      1.10
@@ -1,4 +1,4 @@
-/* $Id: actions.c,v 1.9 2006/02/16 15:20:32 andrew Exp $ */
+/* $Id: actions.c,v 1.10 2006/02/17 13:30:39 andrew Exp $ */
 /* 
  * Copyright (C) 2004 Andrew Beekhof <[EMAIL PROTECTED]>
  * 
@@ -397,7 +397,7 @@
 notify_crmd(crm_graph_t *graph)
 {      
        int log_level = LOG_DEBUG;
-       const char *abort_reason = "Poke";
+       const char *abort_reason = "Complete";
        enum transition_action completion_action = tg_restart;
        int id = -1;
        
@@ -417,35 +417,31 @@
                return;
        }
 
+       CRM_DEV_ASSERT(graph->complete);
+       
        completion_action = graph->completion_action;
        id = graph->id;
-       if(graph->abort_reason == NULL) {
-               abort_reason = "Complete";
-               
-       } else {
+       if(graph->abort_reason != NULL) {
                abort_reason = graph->abort_reason;
        }
-       
-       graph->complete = TRUE;
-       graph->abort_reason = NULL;
-       graph->completion_action = tg_restart;
-       
+
        switch(completion_action) {
                case tg_stop:
                        op = CRM_OP_TECOMPLETE;
                        log_level = LOG_INFO;
                        break;
+
                case tg_restart:
                        op = CRM_OP_TEABORT;
                        break;
+
                case tg_shutdown:
                        crm_info("Exiting after transition");
                        exit(LSB_EXIT_OK);
        }
 
-       te_log_action(
-               log_level, "Transition %d status: %s - %s",
-               id, op, abort_reason);
+       te_log_action(log_level, "Transition %d status: %s - %s",
+                     id, op, abort_reason);
 
        print_graph(log_level, graph);
        
@@ -457,4 +453,8 @@
        }
 
        send_ipc_message(crm_ch, cmd);
+
+       graph->abort_reason = NULL;
+       graph->completion_action = tg_restart;  
+
 }
===================================================================
RCS file: /home/cvs/linux-ha/linux-ha/crm/tengine/callbacks.c,v
retrieving revision 1.65
retrieving revision 1.66
diff -u -3 -r1.65 -r1.66
--- callbacks.c 16 Feb 2006 15:20:32 -0000      1.65
+++ callbacks.c 17 Feb 2006 13:30:39 -0000      1.66
@@ -1,4 +1,4 @@
-/* $Id: callbacks.c,v 1.65 2006/02/16 15:20:32 andrew Exp $ */
+/* $Id: callbacks.c,v 1.66 2006/02/17 13:30:39 andrew Exp $ */
 /* 
  * Copyright (C) 2004 Andrew Beekhof <[EMAIL PROTECTED]>
  * 
@@ -448,8 +448,9 @@
 
        if(graph_rc != transition_complete) {
                crm_crit("Transition failed: %s", transition_status(graph_rc));
+               print_graph(LOG_WARNING, transition_graph);
        }
-
+       
        notify_crmd(transition_graph);
 
        return TRUE;    




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

Message: 2
Date: Fri, 17 Feb 2006 06:30:40 -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 


Log Message:


Logging changes, particualrly around the end of a transition.

===================================================================
RCS file: /home/cvs/linux-ha/linux-ha/lib/crm/transition/graph.c,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -3 -r1.2 -r1.3
--- graph.c     16 Feb 2006 15:20:33 -0000      1.2
+++ graph.c     17 Feb 2006 13:30:39 -0000      1.3
@@ -1,4 +1,4 @@
-/* $Id: graph.c,v 1.2 2006/02/16 15:20:33 andrew Exp $ */
+/* $Id: graph.c,v 1.3 2006/02/17 13:30:39 andrew Exp $ */
 /* 
  * Copyright (C) 2004 Andrew Beekhof <[EMAIL PROTECTED]>
  * 
@@ -76,20 +76,21 @@
                crm_debug_3("Processing action %d", action->id);
                
                if(action->id == action_id) {
-                       crm_debug("Marking action %d of synapse %d confirmed",
-                                 action_id, synapse->id);
+                       crm_info("Confirmed: Action %d of Synapse %d",
+                                action_id, synapse->id);
                        action->confirmed = TRUE;
                        updates = TRUE;
 
                } else if(action->confirmed == FALSE) {
                        is_confirmed = FALSE;
-                       crm_debug("Synapse %d still not confirmed after action 
%d",
-                                 synapse->id, action_id);
+                       crm_debug_2("Synapse %d still not confirmed after 
action %d",
+                                   synapse->id, action_id);
                }
                
                );
 
-       if(is_confirmed) {
+       if(is_confirmed && synapse->confirmed == FALSE) {
+               crm_debug("Confirmed: Synapse %d", synapse->id);
                synapse->confirmed = TRUE;
                updates = TRUE;
        }
@@ -263,11 +264,18 @@
                        num_complete++;
                        
                } else if (synapse->executed) {
-                       crm_debug_3("Synapse %d executed", synapse->id);
+                       int pending_log = LOG_DEBUG_2;
+                       if(synapse->priority <= graph->abort_priority) {
+                               pending_log = LOG_INFO;
+                       } 
+                       crm_log_maybe(pending_log,
+                                     "Synapse %d: confirmation pending",
+                                     synapse->id);
                        num_pending++;
                        
                } else if(synapse->priority <= graph->abort_priority) {
-                       crm_debug("Skipping synapse %d: aborting", synapse->id);
+                       crm_debug_2("Skipping synapse %d: aborting",
+                                   synapse->id);
                        num_skipped++;
                        
                } else {
@@ -285,24 +293,26 @@
                );
 
        if(num_pending == 0 && num_fired == 0) {
+               graph->complete = TRUE;
                stat_log_level = LOG_INFO;
                pass_result = transition_complete;
+
                if(num_incomplete != 0) {
-                       stat_log_level = LOG_ERR;
+                       stat_log_level = LOG_WARNING;
                        pass_result = transition_terminated;
 
                } else if(num_skipped != 0) {
                        stat_log_level = LOG_NOTICE;
                }
-               print_graph(stat_log_level+2, graph);
-               crm_log_maybe(stat_log_level+2,
-                             "==============================================");
        }
        
-       crm_log_maybe(stat_log_level, "Transition %d Complete: %d, Pending: %d,"
+       crm_log_maybe(stat_log_level,
+                     "Transition %d Complete: %d, Pending: %d,"
                      " Fired: %d, Skipped: %d, Incomplete: %d",
                      graph->id, num_complete, num_pending, num_fired,
                      num_skipped, num_incomplete);
+       crm_log_maybe(stat_log_level+1,
+                     "====================================================");
 
        
        return pass_result;




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

Message: 3
Date: Fri, 17 Feb 2006 06:32:08 -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:
        unpack.c 


Log Message:
Use the #define

===================================================================
RCS file: /home/cvs/linux-ha/linux-ha/lib/crm/transition/unpack.c,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -3 -r1.1 -r1.2
--- unpack.c    14 Feb 2006 11:32:12 -0000      1.1
+++ unpack.c    17 Feb 2006 13:32:07 -0000      1.2
@@ -1,4 +1,4 @@
-/* $Id: unpack.c,v 1.1 2006/02/14 11:32:12 andrew Exp $ */
+/* $Id: unpack.c,v 1.2 2006/02/17 13:32:07 andrew Exp $ */
 /* 
  * Copyright (C) 2004 Andrew Beekhof <[EMAIL PROTECTED]>
  * 
@@ -107,7 +107,7 @@
        crm_malloc0(new_synapse, sizeof(synapse_t));
        new_synapse->id = crm_parse_int(ID(xml_synapse), NULL);
 
-       value = crm_element_value(xml_synapse, "priority");
+       value = crm_element_value(xml_synapse, XML_CIB_ATTR_PRIORITY);
        if(value != NULL) {
                new_synapse->priority = crm_parse_int(value, NULL);
        }




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

_______________________________________________
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 75
********************************************

Reply via email to