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


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

Message: 1
Date: Thu,  1 Jun 2006 08:48:07 -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:
        events.c 


Log Message:
Look for pending actions on failed/stopped nodes and fail them 

===================================================================
RCS file: /home/cvs/linux-ha/linux-ha/crm/tengine/events.c,v
retrieving revision 1.18
retrieving revision 1.19
diff -u -3 -r1.18 -r1.19
--- events.c    25 May 2006 14:20:26 -0000      1.18
+++ events.c    1 Jun 2006 14:48:07 -0000       1.19
@@ -1,4 +1,4 @@
-/* $Id: events.c,v 1.18 2006/05/25 14:20:26 andrew Exp $ */
+/* $Id: events.c,v 1.19 2006/06/01 14:48:07 andrew Exp $ */
 /* 
  * Copyright (C) 2004 Andrew Beekhof <[EMAIL PROTECTED]>
  * 
@@ -71,6 +71,45 @@
        return NULL;
 }
 
+static gboolean
+fail_incompletable_actions(crm_graph_t *graph, const char *down_node) 
+{
+       const char *target = NULL;
+       crm_data_t *last_action = NULL;
+
+       slist_iter(
+               synapse, synapse_t, graph->synapses, lpc,
+               if (synapse->confirmed) {
+                       continue;
+               }
+
+               slist_iter(
+                       action, crm_action_t, synapse->actions, lpc,
+
+                       if(action->type == action_type_pseudo || 
action->confirmed) {
+                               continue;
+                       }
+                       
+                       target = crm_element_value(action->xml, 
XML_LRM_ATTR_TARGET);
+                       if(safe_str_eq(target, down_node)) {
+                               action->failed = TRUE;
+                               last_action = action->xml;
+                               update_graph(graph, action);
+                               crm_notice("Action %d (%s) is scheduled for %s 
(offline)",
+                                          action->id, ID(action->xml), 
down_node);
+                       }
+                       
+                       );
+               );
+
+       if(last_action != NULL) {
+               crm_warn("Node %s shutdown resulted in un-runnable actions", 
down_node);
+               abort_transition(INFINITY, tg_restart, "Node failure", 
last_action);
+               return TRUE;
+       }
+       
+       return FALSE;
+}
 
 gboolean
 extract_event(crm_data_t *msg)
@@ -146,7 +185,8 @@
                                crm_info("Stonith/shutdown event not matched");
                                abort_transition(INFINITY, tg_restart,
                                                 "Node failure", node_state);
-                       }
+                       }                       
+                       fail_incompletable_actions(transition_graph, 
event_node);
                }
 
                shutdown = 0;
@@ -294,7 +334,8 @@
        stop_te_timer(action->timer);
        action->confirmed = TRUE;
 
-       target_rc_s = 
g_hash_table_lookup(action->params,crm_meta_name(XML_ATTR_TE_TARGET_RC));
+       target_rc_s = g_hash_table_lookup(
+               action->params,crm_meta_name(XML_ATTR_TE_TARGET_RC));
        if(target_rc_s != NULL) {
                crm_debug_2("Target rc: %s vs. %d", target_rc_s, op_rc_i);
                target_rc = crm_parse_int(target_rc_s, NULL);




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

Message: 2
Date: Thu,  1 Jun 2006 09:40:47 -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/testcases


Modified Files:
        master-10.exp rec-node-2.exp 


Log Message:
use transition_idle_timeout to populate a default action timeout when none
  is specified. 
rename transition_idle_timeout to default_action_timeout to better reflect
  what it does (fall back to the old name if no value is present)

===================================================================
RCS file: /home/cvs/linux-ha/linux-ha/crm/pengine/testcases/master-10.exp,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -3 -r1.6 -r1.7
--- master-10.exp       1 Jun 2006 11:31:41 -0000       1.6
+++ master-10.exp       1 Jun 2006 15:40:46 -0000       1.7
@@ -50,7 +50,7 @@
      <action_set>
        <rsc_op id="16" operation="monitor" 
operation_key="child_rsc1:2_monitor_11000" on_node="node1" on_node_uuid="uuid1">
          <primitive id="child_rsc1:2" long-id="rsc1:child_rsc1:2" 
class="heartbeat" type="apache"/>
-         <attributes crm_feature_set="1.0.6" CRM_meta_role="Master" 
CRM_meta_stateful="true" CRM_meta_id="mon-2" CRM_meta_op_target_rc="8" 
CRM_meta_name="monitor" CRM_meta_interval="11000" CRM_meta_clone="2" 
CRM_meta_clone_max="5" CRM_meta_clone_node_max="2" CRM_meta_master_max="2" 
CRM_meta_master_node_max="1"/>
+         <attributes crm_feature_set="1.0.6" CRM_meta_role="Master" 
CRM_meta_stateful="true" CRM_meta_id="mon-2" CRM_meta_timeout="60000" 
CRM_meta_op_target_rc="8" CRM_meta_name="monitor" CRM_meta_interval="11000" 
CRM_meta_clone="2" CRM_meta_clone_max="5" CRM_meta_clone_node_max="2" 
CRM_meta_master_max="2" CRM_meta_master_node_max="1"/>
        </rsc_op>
      </action_set>
      <inputs>
@@ -158,7 +158,7 @@
      <action_set>
        <rsc_op id="19" operation="monitor" 
operation_key="child_rsc1:3_monitor_11000" on_node="node2" on_node_uuid="uuid2">
          <primitive id="child_rsc1:3" long-id="rsc1:child_rsc1:3" 
class="heartbeat" type="apache"/>
-         <attributes crm_feature_set="1.0.6" CRM_meta_role="Master" 
CRM_meta_stateful="true" CRM_meta_id="mon-2" CRM_meta_op_target_rc="8" 
CRM_meta_name="monitor" CRM_meta_interval="11000" CRM_meta_clone="3" 
CRM_meta_clone_max="5" CRM_meta_clone_node_max="2" CRM_meta_master_max="2" 
CRM_meta_master_node_max="1"/>
+         <attributes crm_feature_set="1.0.6" CRM_meta_role="Master" 
CRM_meta_stateful="true" CRM_meta_id="mon-2" CRM_meta_timeout="60000" 
CRM_meta_op_target_rc="8" CRM_meta_name="monitor" CRM_meta_interval="11000" 
CRM_meta_clone="3" CRM_meta_clone_max="5" CRM_meta_clone_node_max="2" 
CRM_meta_master_max="2" CRM_meta_master_node_max="1"/>
        </rsc_op>
      </action_set>
      <inputs>
@@ -250,7 +250,7 @@
      <action_set>
        <rsc_op id="21" operation="monitor" 
operation_key="child_rsc1:0_monitor_1000" on_node="node1" on_node_uuid="uuid1">
          <primitive id="child_rsc1:0" long-id="rsc1:child_rsc1:0" 
class="heartbeat" type="apache"/>
-         <attributes crm_feature_set="1.0.6" CRM_meta_role="Slave" 
CRM_meta_stateful="true" CRM_meta_id="mon-1" CRM_meta_name="monitor" 
CRM_meta_interval="1000" CRM_meta_clone="0" CRM_meta_clone_max="5" 
CRM_meta_clone_node_max="2" CRM_meta_master_max="2" 
CRM_meta_master_node_max="1"/>
+         <attributes crm_feature_set="1.0.6" CRM_meta_role="Slave" 
CRM_meta_stateful="true" CRM_meta_id="mon-1" CRM_meta_timeout="60000" 
CRM_meta_name="monitor" CRM_meta_interval="1000" CRM_meta_clone="0" 
CRM_meta_clone_max="5" CRM_meta_clone_node_max="2" CRM_meta_master_max="2" 
CRM_meta_master_node_max="1"/>
        </rsc_op>
      </action_set>
      <inputs>
@@ -339,7 +339,7 @@
      <action_set>
        <rsc_op id="23" operation="monitor" 
operation_key="child_rsc1:1_monitor_1000" on_node="node2" on_node_uuid="uuid2">
          <primitive id="child_rsc1:1" long-id="rsc1:child_rsc1:1" 
class="heartbeat" type="apache"/>
-         <attributes crm_feature_set="1.0.6" CRM_meta_role="Slave" 
CRM_meta_stateful="true" CRM_meta_id="mon-1" CRM_meta_name="monitor" 
CRM_meta_interval="1000" CRM_meta_clone="1" CRM_meta_clone_max="5" 
CRM_meta_clone_node_max="2" CRM_meta_master_max="2" 
CRM_meta_master_node_max="1"/>
+         <attributes crm_feature_set="1.0.6" CRM_meta_role="Slave" 
CRM_meta_stateful="true" CRM_meta_id="mon-1" CRM_meta_timeout="60000" 
CRM_meta_name="monitor" CRM_meta_interval="1000" CRM_meta_clone="1" 
CRM_meta_clone_max="5" CRM_meta_clone_node_max="2" CRM_meta_master_max="2" 
CRM_meta_master_node_max="1"/>
        </rsc_op>
      </action_set>
      <inputs>
===================================================================
RCS file: /home/cvs/linux-ha/linux-ha/crm/pengine/testcases/rec-node-2.exp,v
retrieving revision 1.22
retrieving revision 1.23
diff -u -3 -r1.22 -r1.23
--- rec-node-2.exp      26 May 2006 14:54:00 -0000      1.22
+++ rec-node-2.exp      1 Jun 2006 15:40:46 -0000       1.23
@@ -49,7 +49,7 @@
    <synapse id="4">
      <action_set>
        <pseudo_event id="13" operation="start" operation_key="group1_start_0">
-         <attributes crm_feature_set="1.0.6" CRM_meta_id="1" 
CRM_meta_name="start" CRM_meta_prereq="quorum"/>
+         <attributes crm_feature_set="1.0.6" CRM_meta_id="1" 
CRM_meta_timeout="60000" CRM_meta_name="start" CRM_meta_prereq="quorum"/>
        </pseudo_event>
      </action_set>
      <inputs>
@@ -120,7 +120,7 @@
    <synapse id="10">
      <action_set>
        <pseudo_event id="19" operation="start" operation_key="group2_start_0">
-         <attributes crm_feature_set="1.0.6" CRM_meta_id="2" 
CRM_meta_name="start" CRM_meta_prereq="fencing"/>
+         <attributes crm_feature_set="1.0.6" CRM_meta_id="2" 
CRM_meta_timeout="60000" CRM_meta_name="start" CRM_meta_prereq="fencing"/>
        </pseudo_event>
      </action_set>
      <inputs>




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

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


End of Linux-ha-cvs Digest, Vol 31, Issue 5
*******************************************

Reply via email to