Send Linux-ha-cvs mailing list submissions to
        linux-ha-cvs@lists.linux-ha.org

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 
      (linux-ha-cvs@lists.linux-ha.org)
   2. Linux-HA CVS: crm by andrew from 
      (linux-ha-cvs@lists.linux-ha.org)


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

Message: 1
Date: Tue, 23 May 2006 01:41:25 -0600 (MDT)
From: linux-ha-cvs@lists.linux-ha.org
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:
        regression.core.sh regression.sh 


Log Message:
New test cases
Test case updates

===================================================================
RCS file: /home/cvs/linux-ha/linux-ha/crm/pengine/regression.core.sh,v
retrieving revision 1.19
retrieving revision 1.20
diff -u -3 -r1.19 -r1.20
--- regression.core.sh  17 May 2006 07:59:02 -0000      1.19
+++ regression.core.sh  23 May 2006 07:41:25 -0000      1.20
@@ -83,7 +83,7 @@
     fi
 
     rc=2
-    dot -Tpng $dot_output  2>/dev/null > $dot_png
+    #dot -Tpng $dot_output  2>/dev/null > $dot_png
     if [ -f $dot_expected ]; then
        diff $diff_opts $dot_expected $dot_output >/dev/null
        rc=$?
===================================================================
RCS file: /home/cvs/linux-ha/linux-ha/crm/pengine/regression.sh,v
retrieving revision 1.78
retrieving revision 1.79
diff -u -3 -r1.78 -r1.79
--- regression.sh       11 Apr 2006 07:27:20 -0000      1.78
+++ regression.sh       23 May 2006 07:41:25 -0000      1.79
@@ -65,6 +65,7 @@
 do_test master-7 "Promoted -> Fenced"
 do_test master-8 "Promoted -> Fenced -> Moved"
 do_test master-9 "Stopped + Promotable + No quorum"
+do_test master-10 "Stopped -> Promotable : notify with monitor"
 
 echo ""
 do_test rsc_dep1 "Must not     "




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

Message: 2
Date: Tue, 23 May 2006 01:45:38 -0600 (MDT)
From: linux-ha-cvs@lists.linux-ha.org
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 complex.h complex.c 


Log Message:
Blindly populate the meta attributes from the regular ones (rather than 
  trying to filter them and potentially getting it wrong)
Use the order_actions() util function in a few more places
Fix for Novell #177525: Monitoring causes mount/umounts
 - order the recurring monitors to start after the post_notification

===================================================================
RCS file: /home/cvs/linux-ha/linux-ha/crm/pengine/pengine.h,v
retrieving revision 1.111
retrieving revision 1.112
diff -u -3 -r1.111 -r1.112
--- pengine.h   22 May 2006 08:27:33 -0000      1.111
+++ pengine.h   23 May 2006 07:45:37 -0000      1.112
@@ -1,4 +1,4 @@
-/* $Id: pengine.h,v 1.111 2006/05/22 08:27:33 andrew Exp $ */
+/* $Id: pengine.h,v 1.112 2006/05/23 07:45:37 andrew Exp $ */
 /* 
  * Copyright (C) 2004 Andrew Beekhof <[EMAIL PROTECTED]>
  * 
@@ -484,6 +484,7 @@
        action_t *action, pe_working_set_t *data_set);
 extern void set_working_set_defaults(pe_working_set_t *data_set);
 extern void cleanup_calculations(pe_working_set_t *data_set);
+extern void order_actions(action_t *lh_action, action_t *rh_action, enum 
pe_ordering order);
 
 extern const char* transition_idle_timeout;
 extern gboolean was_processing_error;
===================================================================
RCS file: /home/cvs/linux-ha/linux-ha/crm/pengine/native.c,v
retrieving revision 1.134
retrieving revision 1.135
diff -u -3 -r1.134 -r1.135
--- native.c    22 May 2006 08:27:33 -0000      1.134
+++ native.c    23 May 2006 07:45:37 -0000      1.135
@@ -1,4 +1,4 @@
-/* $Id: native.c,v 1.134 2006/05/22 08:27:33 andrew Exp $ */
+/* $Id: native.c,v 1.135 2006/05/23 07:45:37 andrew Exp $ */
 /* 
  * Copyright (C) 2004 Andrew Beekhof <[EMAIL PROTECTED]>
  * 
@@ -830,7 +830,7 @@
                                lh_action_iter, rh_rsc, order);
 
                } else if(order->rh_action) {
-                       order_actions(lh_action_iter, order->rh_action, order); 
+                       order_actions(lh_action_iter, order->rh_action, 
order->type); 
 
                }
                );
@@ -875,7 +875,7 @@
        slist_iter(
                rh_action_iter, action_t, rh_actions, lpc,
 
-               order_actions(lh_action, rh_action_iter, order); 
+               order_actions(lh_action, rh_action_iter, order->type); 
                );
 
        pe_free_shallow_adv(rh_actions, FALSE);
@@ -1744,7 +1744,6 @@
 {
        char *key = NULL;
        action_t *trigger = NULL;
-       action_wrapper_t *wrapper = NULL;
        const char *value = NULL;
        const char *task = NULL;
        
@@ -1771,17 +1770,7 @@
        crm_debug_3("Ordering %s before %s (%d->%d)",
                op->uuid, trigger->uuid, trigger->id, op->id);
 
-       crm_malloc0(wrapper, sizeof(action_wrapper_t));
-       wrapper->action = op;
-       wrapper->type = pe_ordering_manditory;
-       trigger->actions_before=g_list_append(trigger->actions_before, wrapper);
-
-       wrapper = NULL;
-       crm_malloc0(wrapper, sizeof(action_wrapper_t));
-       wrapper->action = trigger;
-       wrapper->type = pe_ordering_manditory;
-       op->actions_after = g_list_append(op->actions_after, wrapper);
-
+       order_actions(op, trigger, pe_ordering_manditory);
        
        value = g_hash_table_lookup(op->meta, "notify_confirm");
        if(crm_is_true(value)) {
@@ -1790,19 +1779,7 @@
                            trigger->uuid, confirm->uuid,
                            confirm->id, trigger->id);
 
-               wrapper = NULL;
-               crm_malloc0(wrapper, sizeof(action_wrapper_t));
-               wrapper->action = trigger;
-               wrapper->type = pe_ordering_manditory;
-               confirm->actions_before = g_list_append(
-                       confirm->actions_before, wrapper);
-
-               wrapper = NULL;
-               crm_malloc0(wrapper, sizeof(action_wrapper_t));
-               wrapper->action = confirm;
-               wrapper->type = pe_ordering_manditory;
-               trigger->actions_after = g_list_append(
-                       trigger->actions_after, wrapper);
+               order_actions(trigger, confirm, pe_ordering_manditory);
        }       
        return trigger;
 }
@@ -1827,6 +1804,20 @@
 
        if(notify != NULL) {
                notify->priority = INFINITY;
+               slist_iter(
+                       mon, action_t, rsc->actions, lpc,
+
+                       const char *interval = g_hash_table_lookup(mon->meta, 
"interval");
+                       if(interval == NULL || safe_str_eq(interval, "0")) {
+                               crm_debug_3("Skipping %s: interval", 
mon->uuid); 
+                               continue;
+                       } else if(safe_str_eq(mon->task, "cancel")) {
+                               crm_debug_3("Skipping %s: cancel", mon->uuid); 
+                               continue;
+                       }
+
+                       order_actions(notify, mon, pe_ordering_optional);
+                       );
        }
        op->post_notify->priority = INFINITY;
 }
===================================================================
RCS file: /home/cvs/linux-ha/linux-ha/crm/pengine/complex.h,v
retrieving revision 1.34
retrieving revision 1.35
diff -u -3 -r1.34 -r1.35
--- complex.h   22 May 2006 08:27:33 -0000      1.34
+++ complex.h   23 May 2006 07:45:37 -0000      1.35
@@ -1,4 +1,4 @@
-/* $Id: complex.h,v 1.34 2006/05/22 08:27:33 andrew Exp $ */
+/* $Id: complex.h,v 1.35 2006/05/23 07:45:37 andrew Exp $ */
 /* 
  * Copyright (C) 2004 Andrew Beekhof <[EMAIL PROTECTED]>
  * 
@@ -227,7 +227,6 @@
 extern gboolean native_constraint_violated(
        resource_t *rsc_lh, resource_t *rsc_rh, rsc_colocation_t *constraint);
 
-extern void order_actions(action_t *lh, action_t *rh, order_constraint_t 
*order);
 extern void common_agent_constraints(
        GListPtr node_list, lrm_agent_t *agent, const char *id);
 
===================================================================
RCS file: /home/cvs/linux-ha/linux-ha/crm/pengine/complex.c,v
retrieving revision 1.89
retrieving revision 1.90
diff -u -3 -r1.89 -r1.90
--- complex.c   22 May 2006 08:27:33 -0000      1.89
+++ complex.c   23 May 2006 07:45:37 -0000      1.90
@@ -1,4 +1,4 @@
-/* $Id: complex.c,v 1.89 2006/05/22 08:27:33 andrew Exp $ */
+/* $Id: complex.c,v 1.90 2006/05/23 07:45:37 andrew Exp $ */
 /* 
  * Copyright (C) 2004 Andrew Beekhof <[EMAIL PROTECTED]>
  * 
@@ -30,7 +30,6 @@
 gboolean is_active(rsc_to_node_t *cons);
 gboolean constraint_violated(
        resource_t *rsc_lh, resource_t *rsc_rh, rsc_colocation_t *constraint);
-void order_actions(action_t *lh, action_t *rh, order_constraint_t *order);
 
 extern gboolean rsc_colocation_new(const char *id, enum con_strength strength,
                                   resource_t *rsc_lh, resource_t *rsc_rh);
@@ -176,19 +175,6 @@
        const char *value = NULL;
        const char *id    = crm_element_value(xml_obj, XML_ATTR_ID);
 
-#if CRM_DEPRECATED_SINCE_2_0_5
-       const char *allowed_attrs[] = {
-               XML_CIB_ATTR_PRIORITY,
-               XML_RSC_ATTR_INCARNATION_MAX,
-               XML_RSC_ATTR_INCARNATION_NODEMAX,
-               XML_RSC_ATTR_MASTER_MAX,
-               XML_RSC_ATTR_MASTER_NODEMAX,
-               XML_RSC_ATTR_STICKINESS,
-               XML_RSC_ATTR_FAIL_STICKINESS,
-               XML_RSC_ATTR_TARGET_ROLE,
-               XML_RSC_ATTR_NOTIFY,
-       };
-#endif
        crm_log_xml_debug_3(xml_obj, "Processing resource input...");
        
        if(id == NULL) {
@@ -255,11 +241,12 @@
                g_hash_table_foreach(parent->meta, dup_attr, (*rsc)->meta);
        }       
 
-#if CRM_DEPRECATED_SINCE_2_0_5
+       /* populate from the regular attributes until the GUI can create
+        * meta attributes
+        */
        unpack_instance_attributes(
                xml_obj, XML_TAG_ATTR_SETS, NULL, (*rsc)->meta,
-               allowed_attrs, DIMOF(allowed_attrs), data_set);
-#endif
+               NULL, 0, data_set);
 
        if(parent != NULL) {
                g_hash_table_foreach(parent->parameters, dup_attr, 
(*rsc)->parameters);
@@ -387,13 +374,13 @@
 
 void
 order_actions(
-       action_t *lh_action, action_t *rh_action, order_constraint_t *order) 
+       action_t *lh_action, action_t *rh_action, enum pe_ordering order) 
 {
        action_wrapper_t *wrapper = NULL;
        GListPtr list = NULL;
        
-       crm_debug_2("Ordering %d: Action %d before %d",
-                 order?order->id:-1, lh_action->id, rh_action->id);
+       crm_debug_2("Ordering Action %s before %s",
+                 lh_action->uuid, rh_action->uuid);
 
        log_action(LOG_DEBUG_4, "LH (order_actions)", lh_action, FALSE);
        log_action(LOG_DEBUG_4, "RH (order_actions)", rh_action, FALSE);
@@ -402,18 +389,18 @@
        crm_malloc0(wrapper, sizeof(action_wrapper_t));
        if(wrapper != NULL) {
                wrapper->action = rh_action;
-               wrapper->type = order->type;
+               wrapper->type = order;
                
                list = lh_action->actions_after;
                list = g_list_append(list, wrapper);
                lh_action->actions_after = list;
                wrapper = NULL;
        }
-       if(order->type != pe_ordering_recover) {
+       if(order != pe_ordering_recover) {
                crm_malloc0(wrapper, sizeof(action_wrapper_t));
                if(wrapper != NULL) {
                        wrapper->action = lh_action;
-                       wrapper->type = order->type;
+                       wrapper->type = order;
                        list = rh_action->actions_before;
                        list = g_list_append(list, wrapper);
                        rh_action->actions_before = list;




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

_______________________________________________
Linux-ha-cvs mailing list
Linux-ha-cvs@lists.linux-ha.org
http://lists.community.tummy.com/mailman/listinfo/linux-ha-cvs


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

Reply via email to