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: crm by andrew from 
      ([email protected])


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

Message: 1
Date: Wed, 26 Apr 2006 09:55:43 -0600 (MDT)
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:
        utils.c 


Log Message:
Fix printing of priority
Only print rsc actions once

===================================================================
RCS file: /home/cvs/linux-ha/linux-ha/lib/crm/transition/utils.c,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -3 -r1.8 -r1.9
--- utils.c     23 Apr 2006 19:50:19 -0000      1.8
+++ utils.c     26 Apr 2006 15:55:42 -0000      1.9
@@ -1,4 +1,4 @@
-/* $Id: utils.c,v 1.8 2006/04/23 19:50:19 andrew Exp $ */
+/* $Id: utils.c,v 1.9 2006/04/26 15:55:42 andrew Exp $ */
 /* 
  * Copyright (C) 2004 Andrew Beekhof <[EMAIL PROTECTED]>
  * 
@@ -106,6 +106,7 @@
 static void
 print_elem(int log_level, const char *prefix, gboolean as_input, crm_action_t 
*action) 
 {
+       int priority = 0;
        const char *key = NULL;
        const char *host = NULL;
        const char *class = "Action";
@@ -127,6 +128,10 @@
        if(as_input) {
                class = "Input";
        }
+
+       if(as_input == FALSE) {
+               priority = action->synapse->priority;
+       }
        
        key = crm_element_value(action->xml, XML_LRM_ATTR_TASK_KEY);
        host = crm_element_value(action->xml, XML_LRM_ATTR_TARGET);
@@ -137,25 +142,26 @@
                                      "%s[%s %d]: %s (id: %s, type: %s, 
priority: %d)",
                                      prefix, class, action->id, state, key,
                                      actiontype2text(action->type),
-                                     action->synapse->priority);
+                                     priority);
                        break;
                case action_type_rsc:
                        crm_log_maybe(log_level,
                                      "%s[%s %d]: %s (id: %s, loc: %s, 
priority: %d)",
                                      prefix, class, action->id, state, key, 
host,
-                                     action->synapse->priority);
+                                     priority);
+                       break;
                case action_type_crm:   
                        crm_log_maybe(log_level,
                                      "%s[%s %d]: %s (id: %s, loc: %s, type: 
%s, priority: %d)",
                                      prefix, class, action->id, state, key, 
host,
                                      actiontype2text(action->type),
-                                     action->synapse->priority);
+                                     priority);
                        break;
                default:
                        crm_err("%s[%s %d]: %s (id: %s, loc: %s, type: %s 
(unhandled), priority: %d)",
                                prefix, class, action->id, state, key, host,
                                actiontype2text(action->type),
-                               action->synapse->priority);
+                               priority);
        }
 
        if(as_input == FALSE) {




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

Message: 2
Date: Wed, 26 Apr 2006 09:56:06 -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/tengine


Modified Files:
        callbacks.c 


Log Message:
Actually obtain task first

===================================================================
RCS file: /home/cvs/linux-ha/linux-ha/crm/tengine/callbacks.c,v
retrieving revision 1.78
retrieving revision 1.79
diff -u -3 -r1.78 -r1.79
--- callbacks.c 26 Apr 2006 13:35:19 -0000      1.78
+++ callbacks.c 26 Apr 2006 15:56:05 -0000      1.79
@@ -1,4 +1,4 @@
-/* $Id: callbacks.c,v 1.78 2006/04/26 13:35:19 andrew Exp $ */
+/* $Id: callbacks.c,v 1.79 2006/04/26 15:56:05 andrew Exp $ */
 /* 
  * Copyright (C) 2004 Andrew Beekhof <[EMAIL PROTECTED]>
  * 
@@ -423,6 +423,7 @@
 unconfirmed_actions(gboolean send_updates)
 {
        int unconfirmed = 0;
+       const char *task = NULL;
        crm_debug_2("Unconfirmed actions...");
        slist_iter(
                synapse, synapse_t, transition_graph->synapses, lpc,
@@ -440,11 +441,12 @@
                        unconfirmed++;
                        crm_debug("Action %d: unconfirmed",action->id);
 
+                       task = crm_element_value(action->xml,XML_LRM_ATTR_TASK);
                        if(action->type != action_type_rsc) {
                                continue;
                        } else if(send_updates == FALSE) {
                                continue;
-                       }       if(safe_str_eq(task, "cancel")) {
+                       } else if(safe_str_eq(task, "cancel")) {
                                /* we dont need to update the CIB with these */
                                continue;
                        }




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

Message: 3
Date: Wed, 26 Apr 2006 09:57:05 -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:
        pengine.h native.c graph.c 


Log Message:
Set the priority of post notify event to INFINITY so we never skip them
  if the prereqs completed

===================================================================
RCS file: /home/cvs/linux-ha/linux-ha/crm/pengine/pengine.h,v
retrieving revision 1.108
retrieving revision 1.109
diff -u -3 -r1.108 -r1.109
--- pengine.h   27 Mar 2006 05:44:24 -0000      1.108
+++ pengine.h   26 Apr 2006 15:57:04 -0000      1.109
@@ -1,4 +1,4 @@
-/* $Id: pengine.h,v 1.108 2006/03/27 05:44:24 andrew Exp $ */
+/* $Id: pengine.h,v 1.109 2006/04/26 15:57:04 andrew Exp $ */
 /* 
  * Copyright (C) 2004 Andrew Beekhof <[EMAIL PROTECTED]>
  * 
@@ -345,6 +345,7 @@
 struct action_s 
 {
                int         id;
+               int         priority;
                resource_t *rsc;
                void       *rsc_opaque;
                node_t     *node;
===================================================================
RCS file: /home/cvs/linux-ha/linux-ha/crm/pengine/native.c,v
retrieving revision 1.129
retrieving revision 1.130
diff -u -3 -r1.129 -r1.130
--- native.c    20 Apr 2006 10:33:49 -0000      1.129
+++ native.c    26 Apr 2006 15:57:04 -0000      1.130
@@ -1,4 +1,4 @@
-/* $Id: native.c,v 1.129 2006/04/20 10:33:49 andrew Exp $ */
+/* $Id: native.c,v 1.130 2006/04/26 15:57:04 andrew Exp $ */
 /* 
  * Copyright (C) 2004 Andrew Beekhof <[EMAIL PROTECTED]>
  * 
@@ -1735,7 +1735,7 @@
        g_hash_table_replace(user_data, crm_strdup(key), crm_strdup(value));
 }
 
-static void
+static action_t *
 pe_notify(resource_t *rsc, node_t *node, action_t *op, action_t *confirm,
          notify_data_t *n_data, pe_working_set_t *data_set)
 {
@@ -1747,10 +1747,10 @@
        
        if(op == NULL || confirm == NULL) {
                crm_debug_2("Op=%p confirm=%p", op, confirm);
-               return;
+               return NULL;
        }
 
-       CRM_CHECK(node != NULL, return);
+       CRM_CHECK(node != NULL, return NULL);
 
        value = g_hash_table_lookup(op->extra, "notify_type");
        task = g_hash_table_lookup(op->extra, "notify_operation");
@@ -1801,6 +1801,7 @@
                trigger->actions_after = g_list_append(
                        trigger->actions_after, wrapper);
        }       
+       return trigger;
 }
 
 void
@@ -1816,9 +1817,15 @@
 pe_post_notify(resource_t *rsc, node_t *node, action_t *op, 
               notify_data_t *n_data, pe_working_set_t *data_set)
 {
+       action_t *notify = NULL;
        crm_debug_2("%s: %s", rsc->id, op->uuid);
-       pe_notify(rsc, node, op->post_notify, op->post_notified,
-                 n_data, data_set);
+       notify = pe_notify(rsc, node, op->post_notify, op->post_notified,
+                          n_data, data_set);
+
+       if(notify != NULL) {
+               notify->priority = INFINITY;
+       }
+       op->post_notify->priority = INFINITY;
 }
 
 
===================================================================
RCS file: /home/cvs/linux-ha/linux-ha/crm/pengine/graph.c,v
retrieving revision 1.84
retrieving revision 1.85
diff -u -3 -r1.84 -r1.85
--- graph.c     18 Apr 2006 11:15:37 -0000      1.84
+++ graph.c     26 Apr 2006 15:57:04 -0000      1.85
@@ -1,4 +1,4 @@
-/* $Id: graph.c,v 1.84 2006/04/18 11:15:37 andrew Exp $ */
+/* $Id: graph.c,v 1.85 2006/04/26 15:57:04 andrew Exp $ */
 /* 
  * Copyright (C) 2004 Andrew Beekhof <[EMAIL PROTECTED]>
  * 
@@ -515,7 +515,9 @@
        if(action->rsc != NULL) {
                synapse_priority = action->rsc->priority;
        }
-
+       if(action->priority > synapse_priority) {
+               synapse_priority = action->priority;
+       }
        if(synapse_priority > 0) {
                crm_xml_add_int(syn, XML_CIB_ATTR_PRIORITY, synapse_priority);
        }




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

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


End of Linux-ha-cvs Digest, Vol 29, Issue 137
*********************************************

Reply via email to