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: mgmt by zhenh from
([email protected])
2. Linux-HA CVS: crm by andrew from
([email protected])
----------------------------------------------------------------------
Message: 1
Date: Mon, 10 Apr 2006 00:26:21 -0600 (MDT)
From: [email protected]
Subject: [Linux-ha-cvs] Linux-HA CVS: mgmt by zhenh from
To: [EMAIL PROTECTED]
Message-ID: <[EMAIL PROTECTED]>
linux-ha CVS committal
Author : zhenh
Host :
Project : linux-ha
Module : mgmt
Dir : linux-ha/mgmt/client
Modified Files:
haclient.py.in
Log Message:
change the transition_timeout to transition_idle_timeout
===================================================================
RCS file: /home/cvs/linux-ha/linux-ha/mgmt/client/haclient.py.in,v
retrieving revision 1.23
retrieving revision 1.24
diff -u -3 -r1.23 -r1.24
--- haclient.py.in 10 Apr 2006 02:19:20 -0000 1.23
+++ haclient.py.in 10 Apr 2006 06:26:21 -0000 1.24
@@ -596,7 +596,7 @@
def on_apply(self, widget):
glade = self.glade
new_crm_config = {}
- new_crm_config["transition_timeout"] =
glade.get_widget("transition_timeout").get_text()
+ new_crm_config["transition_idle_timeout"] =
glade.get_widget("transition_timeout").get_text()
new_crm_config["symmetric_cluster"] =
str(glade.get_widget("symmetric_cluster").get_active())
new_crm_config["stonith_enabled"] =
str(glade.get_widget("stonith_enabled").get_active())
new_crm_config["no_quorum_policy"] =
glade.get_widget("no_quorum_policy").child.get_text()
@@ -617,7 +617,7 @@
glade.get_widget("deadtime").set_text(config["deadtime"])
glade.get_widget("initdead").set_text(config["initdead"])
-
glade.get_widget("transition_timeout").set_text(config["transition_timeout"])
+
glade.get_widget("transition_timeout").set_text(config["transition_idle_timeout"])
glade.get_widget("symmetric_cluster").set_active("True"
== config["symmetric_cluster"])
glade.get_widget("stonith_enabled").set_active("True"
== config["stonith_enabled"])
glade.get_widget("no_quorum_policy").child.set_text(config["no_quorum_policy"])
@@ -1515,7 +1515,7 @@
"initdead","keepalive","logfacility","logfile",
"msgfmt","nice_failback","node","normalpoll",
"stonith","udpport","warntime","watchdog"]
- crm_attr_names =
["transition_timeout","symmetric_cluster","stonith_enabled",
+ crm_attr_names =
["transition_idle_timeout","symmetric_cluster","stonith_enabled",
"no_quorum_policy","default_resource_stickiness", "have_quorum"]
values = manager.query("hb_config")
------------------------------
Message: 2
Date: Mon, 10 Apr 2006 01:23:28 -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:
complex.c complex.h graph.c group.c native.c incarnation.c
regression.sh
Log Message:
Update regression tests with new CRM version number
Fix for 1102 - ordering of stonith operations when fencing resources
need to be started
===================================================================
RCS file: /home/cvs/linux-ha/linux-ha/crm/pengine/complex.c,v
retrieving revision 1.79
retrieving revision 1.80
diff -u -3 -r1.79 -r1.80
--- complex.c 6 Apr 2006 13:05:21 -0000 1.79
+++ complex.c 10 Apr 2006 07:23:27 -0000 1.80
@@ -1,4 +1,4 @@
-/* $Id: complex.c,v 1.79 2006/04/06 13:05:21 andrew Exp $ */
+/* $Id: complex.c,v 1.80 2006/04/10 07:23:27 andrew Exp $ */
/*
* Copyright (C) 2004 Andrew Beekhof <[EMAIL PROTECTED]>
*
@@ -57,6 +57,7 @@
native_rsc_location,
native_expand,
native_children,
+ native_stonith_ordering,
native_parameter,
native_print,
native_active,
@@ -80,6 +81,7 @@
group_rsc_location,
group_expand,
group_children,
+ group_stonith_ordering,
native_parameter,
group_print,
group_active,
@@ -103,6 +105,7 @@
clone_rsc_location,
clone_expand,
clone_children,
+ clone_stonith_ordering,
native_parameter,
clone_print,
clone_active,
@@ -126,6 +129,7 @@
clone_rsc_location,
clone_expand,
clone_children,
+ clone_stonith_ordering,
native_parameter,
clone_print,
clone_active,
===================================================================
RCS file: /home/cvs/linux-ha/linux-ha/crm/pengine/complex.h,v
retrieving revision 1.31
retrieving revision 1.32
diff -u -3 -r1.31 -r1.32
--- complex.h 21 Mar 2006 17:56:35 -0000 1.31
+++ complex.h 10 Apr 2006 07:23:27 -0000 1.32
@@ -1,4 +1,4 @@
-/* $Id: complex.h,v 1.31 2006/03/21 17:56:35 andrew Exp $ */
+/* $Id: complex.h,v 1.32 2006/04/10 07:23:27 andrew Exp $ */
/*
* Copyright (C) 2004 Andrew Beekhof <[EMAIL PROTECTED]>
*
@@ -86,6 +86,8 @@
void (*expand)(resource_t *, pe_working_set_t *);
GListPtr (*children)(resource_t *);
+ void (*stonith_ordering)(
+ resource_t *, action_t *, pe_working_set_t *);
/* parameter result must be free'd */
char *(*parameter)(
@@ -138,6 +140,8 @@
extern gboolean native_create_probe(
resource_t *rsc, node_t *node, action_t *complete, gboolean force,
pe_working_set_t *data_set);
+extern void native_stonith_ordering(
+ resource_t *rsc, action_t *stonith_op, pe_working_set_t *data_set);
extern void group_unpack(resource_t *rsc, pe_working_set_t *data_set);
extern GListPtr group_children(resource_t *rsc);
@@ -168,6 +172,8 @@
extern gboolean group_create_probe(
resource_t *rsc, node_t *node, action_t *complete, gboolean force,
pe_working_set_t *data_set);
+extern void group_stonith_ordering(
+ resource_t *rsc, action_t *stonith_op, pe_working_set_t *data_set);
extern void clone_unpack(resource_t *rsc, pe_working_set_t *data_set);
extern GListPtr clone_children(resource_t *rsc);
@@ -197,6 +203,8 @@
extern gboolean clone_create_probe(
resource_t *rsc, node_t *node, action_t *complete, gboolean force,
pe_working_set_t *data_set);
+extern void clone_stonith_ordering(
+ resource_t *rsc, action_t *stonith_op, pe_working_set_t *data_set);
extern void master_unpack(resource_t *rsc, pe_working_set_t *data_set);
extern void master_create_actions(resource_t *rsc, pe_working_set_t *data_set);
===================================================================
RCS file: /home/cvs/linux-ha/linux-ha/crm/pengine/graph.c,v
retrieving revision 1.79
retrieving revision 1.80
diff -u -3 -r1.79 -r1.80
--- graph.c 7 Apr 2006 14:28:12 -0000 1.79
+++ graph.c 10 Apr 2006 07:23:27 -0000 1.80
@@ -1,4 +1,4 @@
-/* $Id: graph.c,v 1.79 2006/04/07 14:28:12 andrew Exp $ */
+/* $Id: graph.c,v 1.80 2006/04/10 07:23:27 andrew Exp $ */
/*
* Copyright (C) 2004 Andrew Beekhof <[EMAIL PROTECTED]>
*
@@ -209,7 +209,6 @@
pe_working_set_t *data_set)
{
GListPtr stop_actions = NULL;
- gboolean run_unprotected = TRUE;
if(shutdown_op != NULL && stonith_op != NULL) {
/* stop everything we can via shutdown_constraints() and then
@@ -233,29 +232,12 @@
/*
* Make sure the stonith OP occurs before we start any shared resources
*/
- slist_iter(
- rsc, resource_t, data_set->resources, lpc,
-
- slist_iter(action, action_t, rsc->actions, lpc2,
- if(action->needs != rsc_req_stonith) {
- continue;
- }
- if(stonith_op != NULL) {
- custom_action_order(
- NULL, crm_strdup(CRM_OP_FENCE),
stonith_op,
- rsc, NULL, action,
- pe_ordering_manditory, data_set);
-
- } else if(run_unprotected == FALSE) {
- /* mark the start unrunnable */
- action->runnable = FALSE;
-
- } else {
- pe_err("SHARED RESOURCE %s IS NOT PROTECTED:"
- " Stonith disabled", rsc->id);
- }
+ if(stonith_op != NULL) {
+ slist_iter(
+ rsc, resource_t, data_set->resources, lpc,
+ rsc->fns->stonith_ordering(rsc, stonith_op, data_set);
);
- );
+ }
/* add the stonith OP as a stop pre-req and the mark the stop
* as a pseudo op - since its now redundant
===================================================================
RCS file: /home/cvs/linux-ha/linux-ha/crm/pengine/group.c,v
retrieving revision 1.59
retrieving revision 1.60
diff -u -3 -r1.59 -r1.60
--- group.c 9 Apr 2006 12:57:37 -0000 1.59
+++ group.c 10 Apr 2006 07:23:27 -0000 1.60
@@ -1,4 +1,4 @@
-/* $Id: group.c,v 1.59 2006/04/09 12:57:37 andrew Exp $ */
+/* $Id: group.c,v 1.60 2006/04/10 07:23:27 andrew Exp $ */
/*
* Copyright (C) 2004 Andrew Beekhof <[EMAIL PROTECTED]>
*
@@ -626,3 +626,22 @@
);
return any_created;
}
+
+void
+group_stonith_ordering(
+ resource_t *rsc, action_t *stonith_op, pe_working_set_t *data_set)
+{
+#if 0
+ /* I dont think it is a good idea to be poking inside groups */
+ group_variant_data_t *group_data = NULL;
+ get_group_variant_data(group_data, rsc);
+
+ slist_iter(
+ child_rsc, resource_t, group_data->child_list, lpc,
+
+ child_rsc->fns->stonith_ordering(
+ child_rsc, stonith_op, data_set);
+ );
+#endif
+ native_stonith_ordering(rsc, stonith_op, data_set);
+}
===================================================================
RCS file: /home/cvs/linux-ha/linux-ha/crm/pengine/native.c,v
retrieving revision 1.123
retrieving revision 1.124
diff -u -3 -r1.123 -r1.124
--- native.c 31 Mar 2006 15:33:16 -0000 1.123
+++ native.c 10 Apr 2006 07:23:27 -0000 1.124
@@ -1,4 +1,4 @@
-/* $Id: native.c,v 1.123 2006/03/31 15:33:16 andrew Exp $ */
+/* $Id: native.c,v 1.124 2006/04/10 07:23:27 andrew Exp $ */
/*
* Copyright (C) 2004 Andrew Beekhof <[EMAIL PROTECTED]>
*
@@ -208,6 +208,7 @@
const char *value = NULL;
CRM_CHECK(rsc != NULL, return NULL);
+ CRM_CHECK(name != NULL && strlen(name) != 0, return NULL);
crm_debug_2("Looking up %s in %s", name, rsc->id);
@@ -2057,3 +2058,43 @@
return TRUE;
}
+
+
+void
+native_stonith_ordering(
+ resource_t *rsc, action_t *stonith_op, pe_working_set_t *data_set)
+{
+ gboolean run_unprotected = TRUE;
+ const char *class = crm_element_value(rsc->xml, XML_AGENT_ATTR_CLASS);
+ crm_err("%s class: %s", rsc->id, class);
+
+ if(stonith_op != NULL && safe_str_eq(class, "stonith")) {
+ char *key = start_key(rsc);
+ crm_err("Ordering %s before stonith op", key);
+ custom_action_order(
+ rsc, key, NULL,
+ NULL, crm_strdup(CRM_OP_FENCE), stonith_op,
+ pe_ordering_optional, data_set);
+ return;
+ }
+
+ slist_iter(action, action_t, rsc->actions, lpc2,
+ if(action->needs != rsc_req_stonith) {
+ continue;
+ }
+ if(stonith_op != NULL) {
+ custom_action_order(
+ NULL, crm_strdup(CRM_OP_FENCE), stonith_op,
+ rsc, NULL, action,
+ pe_ordering_manditory, data_set);
+
+ } else if(run_unprotected == FALSE) {
+ /* mark the start unrunnable */
+ action->runnable = FALSE;
+
+ } else {
+ pe_err("SHARED RESOURCE %s IS NOT PROTECTED:"
+ " Stonith disabled", rsc->id);
+ }
+ );
+}
===================================================================
RCS file: /home/cvs/linux-ha/linux-ha/crm/pengine/incarnation.c,v
retrieving revision 1.77
retrieving revision 1.78
diff -u -3 -r1.77 -r1.78
--- incarnation.c 7 Apr 2006 14:28:12 -0000 1.77
+++ incarnation.c 10 Apr 2006 07:23:27 -0000 1.78
@@ -1,4 +1,4 @@
-/* $Id: incarnation.c,v 1.77 2006/04/07 14:28:12 andrew Exp $ */
+/* $Id: incarnation.c,v 1.78 2006/04/10 07:23:27 andrew Exp $ */
/*
* Copyright (C) 2004 Andrew Beekhof <[EMAIL PROTECTED]>
*
@@ -1420,3 +1420,33 @@
return any_created;
}
+
+void
+clone_stonith_ordering(
+ resource_t *rsc, action_t *stonith_op, pe_working_set_t *data_set)
+{
+ gboolean is_fencing = FALSE;
+ clone_variant_data_t *clone_data = NULL;
+ get_clone_variant_data(clone_data, rsc);
+
+ slist_iter(
+ child_rsc, resource_t, clone_data->child_list, lpc,
+
+ const char *class = crm_element_value(
+ child_rsc->xml, XML_AGENT_ATTR_CLASS);
+
+ if(safe_str_eq(class, "stonith")) {
+ is_fencing = TRUE;
+ break;
+ }
+ );
+
+ if(is_fencing && stonith_op != NULL) {
+ char *key = started_key(rsc);
+ crm_err("Ordering %s before stonith op", key);
+ custom_action_order(
+ rsc, key, NULL,
+ NULL, crm_strdup(CRM_OP_FENCE), stonith_op,
+ pe_ordering_optional, data_set);
+ }
+}
===================================================================
RCS file: /home/cvs/linux-ha/linux-ha/crm/pengine/regression.sh,v
retrieving revision 1.76
retrieving revision 1.77
diff -u -3 -r1.76 -r1.77
--- regression.sh 3 Apr 2006 10:10:46 -0000 1.76
+++ regression.sh 10 Apr 2006 07:23:27 -0000 1.77
@@ -132,6 +132,7 @@
do_test rec-node-9 "Node Recover - no quorum - stop "
do_test rec-node-10 "Node Recover - no quorum - stop w/fence"
do_test rec-node-11 "Node Recover - CRM down w/ group - fence "
+do_test rec-node-12 "Node Recover - nothing active - fence "
echo ""
do_test multi1 "Multiple Active (stop/start)"
------------------------------
_______________________________________________
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 52
********************************************