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


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

Message: 1
Date: Wed,  8 Mar 2006 08:47:51 -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/pengine


Modified Files:
        master.c 


Log Message:
Fix detection of the maximum number of masters 

===================================================================
RCS file: /home/cvs/linux-ha/linux-ha/crm/pengine/master.c,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -3 -r1.8 -r1.9
--- master.c    27 Jan 2006 11:15:49 -0000      1.8
+++ master.c    8 Mar 2006 15:47:50 -0000       1.9
@@ -1,4 +1,4 @@
-/* $Id: master.c,v 1.8 2006/01/27 11:15:49 andrew Exp $ */
+/* $Id: master.c,v 1.9 2006/03/08 15:47:50 andrew Exp $ */
 /* 
  * Copyright (C) 2004 Andrew Beekhof <[EMAIL PROTECTED]>
  * 
@@ -237,7 +237,6 @@
                rsc->parameters, XML_RSC_ATTR_MASTER_NODEMAX);
 
        int promoted = 0;
-       int max_nodes = 0;
        int master_max = crm_parse_int(master_max_s, "1");
        int master_node_max = crm_parse_int(master_node_max_s, "1");
 
@@ -255,7 +254,7 @@
                master_max = clone_data->max_nodes * clone_data->clone_node_max;
                crm_info("Limited to %d masters (potential slaves)",master_max);
        }
-       if(master_max >  max_nodes * master_node_max) {
+       if(master_max >  clone_data->max_nodes * master_node_max) {
                master_max = clone_data->max_nodes * master_node_max;
                crm_info("Limited to %d masters (available nodes)", master_max);
        }




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

Message: 2
Date: Wed,  8 Mar 2006 08:49:40 -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/pengine


Modified Files:
        pengine.c pengine.h stages.c unpack.c 


Log Message:
Fix for bug #113 : make the stonith type globally configurable

===================================================================
RCS file: /home/cvs/linux-ha/linux-ha/crm/pengine/pengine.c,v
retrieving revision 1.103
retrieving revision 1.104
diff -u -3 -r1.103 -r1.104
--- pengine.c   8 Feb 2006 09:21:31 -0000       1.103
+++ pengine.c   8 Mar 2006 15:49:39 -0000       1.104
@@ -1,4 +1,4 @@
-/* $Id: pengine.c,v 1.103 2006/02/08 09:21:31 andrew Exp $ */
+/* $Id: pengine.c,v 1.104 2006/03/08 15:49:39 andrew Exp $ */
 /* 
  * Copyright (C) 2004 Andrew Beekhof <[EMAIL PROTECTED]>
  * 
@@ -311,6 +311,7 @@
        free_xml(data_set->graph);
        free_ha_date(data_set->now);
        free_xml(data_set->input);
+       data_set->stonith_action = NULL;
 }
 
 
@@ -322,22 +323,23 @@
        data_set->graph = NULL;
        
        data_set->transition_idle_timeout = crm_strdup("60s");
-       data_set->dc_uuid           = NULL;
-       data_set->dc_node           = NULL;
-       data_set->have_quorum       = FALSE;
-       data_set->stonith_enabled   = FALSE;
-       data_set->symmetric_cluster = TRUE;
-       data_set->no_quorum_policy  = no_quorum_freeze;
+       data_set->dc_uuid            = NULL;
+       data_set->dc_node            = NULL;
+       data_set->have_quorum        = FALSE;
+       data_set->stonith_enabled    = FALSE;
+       data_set->stonith_action     = NULL;
+       data_set->symmetric_cluster  = TRUE;
        data_set->is_managed_default = TRUE;
+       data_set->no_quorum_policy   = no_quorum_freeze;
        
-       data_set->remove_after_stop = FALSE;
+       data_set->remove_after_stop   = FALSE;
        data_set->stop_action_orphans = TRUE;
-       data_set->stop_rsc_orphans = FALSE;
-       data_set->short_rsc_names = FALSE;
+       data_set->stop_rsc_orphans    = FALSE;
+       data_set->short_rsc_names     = FALSE;
        
        data_set->config_hash = NULL;
-       data_set->nodes     = NULL;
-       data_set->resources = NULL;
+       data_set->nodes       = NULL;
+       data_set->resources   = NULL;
        data_set->ordering_constraints  = NULL;
        data_set->placement_constraints = NULL;
 
@@ -345,10 +347,10 @@
        data_set->colors   = NULL;
        data_set->actions  = NULL;      
 
-       data_set->num_synapse = 0;
+       data_set->num_synapse     = 0;
        data_set->max_valid_nodes = 0;
-       data_set->order_id = 1;
-       data_set->action_id = 1;
-       data_set->color_id = 0;
+       data_set->order_id        = 1;
+       data_set->action_id       = 1;
+       data_set->color_id        = 0;
 
 }
===================================================================
RCS file: /home/cvs/linux-ha/linux-ha/crm/pengine/pengine.h,v
retrieving revision 1.105
retrieving revision 1.106
diff -u -3 -r1.105 -r1.106
--- pengine.h   27 Jan 2006 11:15:49 -0000      1.105
+++ pengine.h   8 Mar 2006 15:49:39 -0000       1.106
@@ -1,4 +1,4 @@
-/* $Id: pengine.h,v 1.105 2006/01/27 11:15:49 andrew Exp $ */
+/* $Id: pengine.h,v 1.106 2006/03/08 15:49:39 andrew Exp $ */
 /* 
  * Copyright (C) 2004 Andrew Beekhof <[EMAIL PROTECTED]>
  * 
@@ -92,6 +92,7 @@
                node_t *dc_node;
                gboolean have_quorum;
                gboolean stonith_enabled;
+               const char *stonith_action;
                gboolean symmetric_cluster;
                gboolean is_managed_default;
 
===================================================================
RCS file: /home/cvs/linux-ha/linux-ha/crm/pengine/stages.c,v
retrieving revision 1.86
retrieving revision 1.87
diff -u -3 -r1.86 -r1.87
--- stages.c    10 Feb 2006 05:18:22 -0000      1.86
+++ stages.c    8 Mar 2006 15:49:39 -0000       1.87
@@ -1,4 +1,4 @@
-/* $Id: stages.c,v 1.86 2006/02/10 05:18:22 andrew Exp $ */
+/* $Id: stages.c,v 1.87 2006/03/08 15:49:39 andrew Exp $ */
 /* 
  * Copyright (C) 2004 Andrew Beekhof <[EMAIL PROTECTED]>
  * 
@@ -347,6 +347,10 @@
                        add_hash_param(
                                stonith_op->extra, XML_LRM_ATTR_TARGET_UUID,
                                node->details->id);
+
+                       add_hash_param(
+                               stonith_op->extra, "stonith_action",
+                               data_set->stonith_action);
                        
                        if(down_op != NULL) {
                                down_op->failure_is_fatal = FALSE;
===================================================================
RCS file: /home/cvs/linux-ha/linux-ha/crm/pengine/unpack.c,v
retrieving revision 1.159
retrieving revision 1.160
diff -u -3 -r1.159 -r1.160
--- unpack.c    20 Feb 2006 12:11:28 -0000      1.159
+++ unpack.c    8 Mar 2006 15:49:40 -0000       1.160
@@ -1,4 +1,4 @@
-/* $Id: unpack.c,v 1.159 2006/02/20 12:11:28 andrew Exp $ */
+/* $Id: unpack.c,v 1.160 2006/03/08 15:49:40 andrew Exp $ */
 /* 
  * Copyright (C) 2004 Andrew Beekhof <[EMAIL PROTECTED]>
  * 
@@ -110,6 +110,7 @@
        param_value(config_hash, config, "remove_after_stop");
        param_value(config_hash, config, "is_managed_default");
        param_value(config_hash, config, "short_resource_names");
+       param_value(config_hash, config, "stonith_action");
 #endif
        get_cluster_pref("transition_idle_timeout");
        if(value != NULL) {
@@ -137,6 +138,13 @@
        }
        crm_info("STONITH of failed nodes is %s",
                 data_set->stonith_enabled?"enabled":"disabled");       
+
+       get_cluster_pref("stonith_action");
+       if(value == NULL || safe_str_neq(value, "poweroff")) {
+               value = "reboot";
+       }
+       data_set->stonith_action = value;
+       crm_info("STONITH will %s nodes", data_set->stonith_action);    
        
        get_cluster_pref("symmetric_cluster");
        if(value != NULL) {
@@ -1251,7 +1259,10 @@
                if(crm_assert_failed) { return FALSE; }
 
                CRM_DEV_ASSERT(task_id_i >= 0);
-               if(crm_assert_failed) { return FALSE; }
+               if(crm_assert_failed) {
+                       crm_err("%s: status=%d, task=%s", id, task_status_i, 
task_id);
+                       return FALSE;
+               }
 
                if(task_id_i == *max_call_id) {
                        crm_debug_2("Already processed this call");




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

Message: 3
Date: Wed,  8 Mar 2006 08:49:40 -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 


Log Message:
Fix for bug #113 : make the stonith type globally configurable

===================================================================
RCS file: /home/cvs/linux-ha/linux-ha/crm/tengine/actions.c,v
retrieving revision 1.16
retrieving revision 1.17
diff -u -3 -r1.16 -r1.17
--- actions.c   27 Feb 2006 09:55:57 -0000      1.16
+++ actions.c   8 Mar 2006 15:49:40 -0000       1.17
@@ -1,4 +1,4 @@
-/* $Id: actions.c,v 1.16 2006/02/27 09:55:57 andrew Exp $ */
+/* $Id: actions.c,v 1.17 2006/03/08 15:49:40 andrew Exp $ */
 /* 
  * Copyright (C) 2004 Andrew Beekhof <[EMAIL PROTECTED]>
  * 
@@ -110,16 +110,20 @@
        const char *id = NULL;
        const char *uuid = NULL;
        const char *target = NULL;
+       const char *type = NULL;
        stonith_ops_t * st_op = NULL;
        
        id = ID(action->xml);
        target = crm_element_value(action->xml, XML_LRM_ATTR_TARGET);
        uuid = crm_element_value(action->xml, XML_LRM_ATTR_TARGET_UUID);
+       type = g_hash_table_lookup(action->params, "stonith_action");
        
        CRM_DEV_ASSERT(id != NULL);
        CRM_DEV_ASSERT(uuid != NULL);
+       CRM_DEV_ASSERT(type != NULL);
        CRM_DEV_ASSERT(target != NULL);
-       if(crm_assert_failed) {
+
+       if(id == NULL || uuid == NULL || target == NULL) {
                /* error */
                te_log_action(LOG_ERR, "Corrupted command (id=%s): no node",
                              crm_str(id));
@@ -127,11 +131,17 @@
        }
        
        te_log_action(LOG_INFO,
-                     "Executing fencing operation (%s) on %s (timeout=%d)",
-                     id, target, transition_graph->transition_timeout / 2);
+                     "Executing %s fencing operation (%s) on %s (timeout=%d)",
+                     type, id, target,
+                     transition_graph->transition_timeout / 2);
 
        crm_malloc0(st_op, sizeof(stonith_ops_t));
-       st_op->optype = RESET;
+       if(safe_str_eq(type, "poweroff")) {
+               st_op->optype = POWEROFF;
+       } else {
+               st_op->optype = RESET;
+       }
+       
        st_op->timeout = transition_graph->transition_timeout / 2;
        st_op->node_name = crm_strdup(target);
        st_op->node_uuid = crm_strdup(uuid);




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

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


End of Linux-ha-cvs Digest, Vol 28, Issue 7
*******************************************

Reply via email to