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: Tue, 6 Jun 2006 14:59:17 -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:
Have the TE look for transient node attribute *deletions* as well
===================================================================
RCS file: /home/cvs/linux-ha/linux-ha/crm/tengine/callbacks.c,v
retrieving revision 1.82
retrieving revision 1.83
diff -u -3 -r1.82 -r1.83
--- callbacks.c 25 May 2006 14:45:53 -0000 1.82
+++ callbacks.c 6 Jun 2006 20:59:17 -0000 1.83
@@ -1,4 +1,4 @@
-/* $Id: callbacks.c,v 1.82 2006/05/25 14:45:53 andrew Exp $ */
+/* $Id: callbacks.c,v 1.83 2006/06/06 20:59:17 andrew Exp $ */
/*
* Copyright (C) 2004 Andrew Beekhof <[EMAIL PROTECTED]>
*
@@ -115,7 +115,7 @@
log_cib_diff(LOG_DEBUG_2, diff, op);
set_name = "diff-added";
- if(diff != NULL && aborted == NULL) {
+ if(diff != NULL) {
crm_data_t *section = NULL;
crm_data_t *change_set = find_xml_node(diff, set_name, FALSE);
change_set = find_xml_node(change_set, XML_TAG_CIB, FALSE);
@@ -134,13 +134,32 @@
set_name = "diff-removed";
if(diff != NULL && aborted == NULL) {
+ crm_data_t *attrs = NULL;
+ crm_data_t *status = NULL;
crm_data_t *change_set = find_xml_node(diff, set_name, FALSE);
change_set = find_xml_node(change_set, XML_TAG_CIB, FALSE);
crm_debug_2("Checking change set: %s", set_name);
- aborted = need_abort(change_set);
- }
+ aborted = need_abort(change_set);
+ if(aborted == NULL && change_set != NULL) {
+ status = get_object_root(XML_CIB_TAG_STATUS,
change_set);
+
+ xml_child_iter_filter(
+ status, node_state, XML_CIB_TAG_STATE,
+
+ attrs = find_xml_node(
+ node_state,
XML_TAG_TRANSIENT_NODEATTRS, FALSE);
+
+ if(attrs != NULL) {
+ crm_info("Aborting on
"XML_TAG_TRANSIENT_NODEATTRS" deletions");
+ abort_transition(INFINITY, tg_restart,
+
XML_TAG_TRANSIENT_NODEATTRS, attrs);
+ }
+ );
+ }
+ }
+
if(aborted != NULL) {
abort_transition(
INFINITY, tg_restart, "Non-status change", NULL);
------------------------------
Message: 2
Date: Wed, 7 Jun 2006 01:34:39 -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
Added Files:
rec-node-13.dot rec-node-13.exp rec-node-13.xml
Log Message:
Fix the transition graph (and add a regression test for) when a node wants
to shut down *and* has a failed resource.
------------------------------
Message: 3
Date: Wed, 7 Jun 2006 01:34:39 -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:
graph.c pengine.h stages.c
Log Message:
Fix the transition graph (and add a regression test for) when a node wants
to shut down *and* has a failed resource.
===================================================================
RCS file: /home/cvs/linux-ha/linux-ha/crm/pengine/graph.c,v
retrieving revision 1.95
retrieving revision 1.96
diff -u -3 -r1.95 -r1.96
--- graph.c 30 May 2006 09:24:03 -0000 1.95
+++ graph.c 7 Jun 2006 07:34:38 -0000 1.96
@@ -1,4 +1,4 @@
-/* $Id: graph.c,v 1.95 2006/05/30 09:24:03 andrew Exp $ */
+/* $Id: graph.c,v 1.96 2006/06/07 07:34:38 andrew Exp $ */
/*
* Copyright (C) 2004 Andrew Beekhof <[EMAIL PROTECTED]>
*
@@ -198,31 +198,14 @@
}
gboolean
-stonith_constraints(node_t *node,
- action_t *stonith_op, action_t *shutdown_op,
- pe_working_set_t *data_set)
+stonith_constraints(
+ node_t *node, action_t *stonith_op, pe_working_set_t *data_set)
{
+ char *key = NULL;
GListPtr action_list = NULL;
-
- if(shutdown_op != NULL && stonith_op != NULL) {
- /* stop everything we can via shutdown_constraints() and then
- * shoot the node... the shutdown has been superceeded
- */
- shutdown_op->pseudo = TRUE;
- shutdown_op->runnable = TRUE;
-
- /* shutdown before stonith */
- /* Give any resources a chance to shutdown normally */
- crm_debug_4("Adding shutdown (%d) as an input to stonith (%d)",
- shutdown_op->id, stonith_op->id);
-
- custom_action_order(
- NULL, crm_strdup(CRM_OP_SHUTDOWN), shutdown_op,
- NULL, crm_strdup(CRM_OP_FENCE), stonith_op,
- pe_ordering_manditory, data_set);
-
- }
+ CRM_CHECK(stonith_op != NULL, return FALSE);
+
/*
* Make sure the stonith OP occurs before we start any shared resources
*/
@@ -241,66 +224,67 @@
if(rsc->is_managed == FALSE) {
crm_debug_2("Skipping fencing constraints for unmanaged
resource: %s", rsc->id);
+ continue;
- } else if(stonith_op != NULL) {
- char *key = stop_key(rsc);
- action_list = find_actions(rsc->actions, key, node);
- crm_free(key);
-
- slist_iter(
- action, action_t, action_list, lpc2,
- if(node->details->online == FALSE
- || rsc->failed) {
- resource_t *parent = NULL;
- crm_info("Stop of failed resource %s is"
- " implict after %s is fenced",
- rsc->id, node->details->uname);
- /* the stop would never complete and is
- * now implied by the stonith operation
- */
- action->pseudo = TRUE;
- action->runnable = TRUE;
- if(action->optional) {
- /* does this case ever happen?
*/
- custom_action_order(
- NULL,
crm_strdup(CRM_OP_FENCE),stonith_op,
- rsc, start_key(rsc),
NULL,
- pe_ordering_manditory,
data_set);
- } else {
- custom_action_order(
- NULL,
crm_strdup(CRM_OP_FENCE),stonith_op,
- rsc, NULL, action,
- pe_ordering_manditory,
data_set);
- }
-
- /* find the top-most resource */
- parent = rsc->parent;
- while(parent != NULL && parent->parent
!= NULL) {
- parent = parent->parent;
- }
-
- if(parent) {
- crm_info("Re-creating actions
for %s",
- parent->id);
- parent->fns->create_actions(
- parent, data_set);
- }
-
- } else {
- crm_info("Moving healthy resource %s"
- " off %s before fencing",
- rsc->id, node->details->uname);
-
- /* stop healthy resources before the
- * stonith op
- */
+ }
+
+ key = stop_key(rsc);
+ action_list = find_actions(rsc->actions, key, node);
+ crm_free(key);
+
+ slist_iter(
+ action, action_t, action_list, lpc2,
+ if(node->details->online == FALSE || rsc->failed) {
+ resource_t *parent = NULL;
+ crm_info("Stop of failed resource %s is"
+ " implict after %s is fenced",
+ rsc->id, node->details->uname);
+ /* the stop would never complete and is
+ * now implied by the stonith operation
+ */
+ action->pseudo = TRUE;
+ action->runnable = TRUE;
+ if(action->optional) {
+ /* does this case ever happen? */
+ custom_action_order(
+ NULL,
crm_strdup(CRM_OP_FENCE),stonith_op,
+ rsc, start_key(rsc), NULL,
+ pe_ordering_manditory,
data_set);
+ } else {
custom_action_order(
- rsc, stop_key(rsc), NULL,
-
NULL,crm_strdup(CRM_OP_FENCE),stonith_op,
+ NULL,
crm_strdup(CRM_OP_FENCE),stonith_op,
+ rsc, NULL, action,
pe_ordering_manditory,
data_set);
}
- );
-
+
+ /* find the top-most resource */
+ parent = rsc->parent;
+ while(parent != NULL && parent->parent != NULL)
{
+ parent = parent->parent;
+ }
+
+ if(parent) {
+ crm_info("Re-creating actions for %s",
+ parent->id);
+ parent->fns->create_actions(
+ parent, data_set);
+ }
+
+ } else {
+ crm_info("Moving healthy resource %s"
+ " off %s before fencing",
+ rsc->id, node->details->uname);
+
+ /* stop healthy resources before the
+ * stonith op
+ */
+ custom_action_order(
+ rsc, stop_key(rsc), NULL,
+
NULL,crm_strdup(CRM_OP_FENCE),stonith_op,
+ pe_ordering_manditory, data_set);
+ }
+ );
+
key = demote_key(rsc);
action_list = find_actions(rsc->actions, key, node);
crm_free(key);
@@ -341,7 +325,6 @@
/* /\* nothing to do here *\/ */
/* pe_err("SHARED RESOURCE %s IS NOT PROTECTED", rsc->id);
*/
/* continue; */
- }
);
return TRUE;
===================================================================
RCS file: /home/cvs/linux-ha/linux-ha/crm/pengine/pengine.h,v
retrieving revision 1.112
retrieving revision 1.113
diff -u -3 -r1.112 -r1.113
--- pengine.h 23 May 2006 07:45:37 -0000 1.112
+++ pengine.h 7 Jun 2006 07:34:38 -0000 1.113
@@ -1,4 +1,4 @@
-/* $Id: pengine.h,v 1.112 2006/05/23 07:45:37 andrew Exp $ */
+/* $Id: pengine.h,v 1.113 2006/06/07 07:34:38 andrew Exp $ */
/*
* Copyright (C) 2004 Andrew Beekhof <[EMAIL PROTECTED]>
*
@@ -440,8 +440,7 @@
node_t *node, action_t *shutdown_op, pe_working_set_t *data_set);
extern gboolean stonith_constraints(
- node_t *node, action_t *stonith_op, action_t *shutdown_op,
- pe_working_set_t *data_set);
+ node_t *node, action_t *stonith_op, pe_working_set_t *data_set);
extern gboolean custom_action_order(
resource_t *lh_rsc, char *lh_task, action_t *lh_action,
===================================================================
RCS file: /home/cvs/linux-ha/linux-ha/crm/pengine/stages.c,v
retrieving revision 1.103
retrieving revision 1.104
diff -u -3 -r1.103 -r1.104
--- stages.c 1 Jun 2006 16:41:23 -0000 1.103
+++ stages.c 7 Jun 2006 07:34:38 -0000 1.104
@@ -1,4 +1,4 @@
-/* $Id: stages.c,v 1.103 2006/06/01 16:41:23 andrew Exp $ */
+/* $Id: stages.c,v 1.104 2006/06/07 07:34:38 andrew Exp $ */
/*
* Copyright (C) 2004 Andrew Beekhof <[EMAIL PROTECTED]>
*
@@ -300,38 +300,16 @@
gboolean
stage6(pe_working_set_t *data_set)
{
- action_t *down_op = NULL;
- action_t *stonith_op = NULL;
action_t *dc_down = NULL;
+ action_t *stonith_op = NULL;
crm_debug_3("Processing fencing and shutdown cases");
slist_iter(
node, node_t, data_set->nodes, lpc,
- if(node->details->online && node->details->shutdown) {
- crm_info("Scheduling Node %s for shutdown",
- node->details->uname);
-
- down_op = custom_action(
- NULL, crm_strdup(CRM_OP_SHUTDOWN),
- CRM_OP_SHUTDOWN, node, FALSE, TRUE, data_set);
- down_op->runnable = TRUE;
-
- shutdown_constraints(
- node, down_op, data_set);
-
- if(node->details->is_dc) {
- dc_down = down_op;
- }
- }
-
- if(node->details->unclean
- && data_set->stonith_enabled == FALSE) {
- pe_err("Node %s is unclean!", node->details->uname);
- pe_warn("YOUR RESOURCES ARE NOW LIKELY COMPROMISED");
- pe_warn("ENABLE STONITH TO KEEP YOUR RESOURCES SAFE");
- } else if(node->details->unclean && data_set->stonith_enabled
+ stonith_op = NULL;
+ if(node->details->unclean && data_set->stonith_enabled
&& (data_set->have_quorum
|| data_set->no_quorum_policy == no_quorum_ignore)) {
pe_warn("Scheduling Node %s for STONITH",
@@ -340,7 +318,6 @@
stonith_op = custom_action(
NULL, crm_strdup(CRM_OP_FENCE),
CRM_OP_FENCE, node, FALSE, TRUE, data_set);
- stonith_op->runnable = TRUE;
add_hash_param(
stonith_op->meta, XML_LRM_ATTR_TARGET,
@@ -354,20 +331,38 @@
stonith_op->meta, "stonith_action",
data_set->stonith_action);
- if(down_op != NULL) {
- down_op->failure_is_fatal = FALSE;
- }
+ stonith_constraints(node, stonith_op, data_set);
if(node->details->is_dc) {
dc_down = stonith_op;
}
+
+ } else if(node->details->online && node->details->shutdown) {
+ action_t *down_op = NULL;
+ crm_info("Scheduling Node %s for shutdown",
+ node->details->uname);
+
+ down_op = custom_action(
+ NULL, crm_strdup(CRM_OP_SHUTDOWN),
+ CRM_OP_SHUTDOWN, node, FALSE, TRUE, data_set);
+
+ shutdown_constraints(node, down_op, data_set);
+
+ if(node->details->is_dc) {
+ dc_down = down_op;
+ }
}
- if(node->details->unclean) {
- stonith_constraints(
- node, stonith_op, down_op, data_set);
+ if(node->details->unclean && stonith_op == NULL) {
+ pe_err("Node %s is unclean!", node->details->uname);
+ pe_warn("YOUR RESOURCES ARE NOW LIKELY COMPROMISED");
+ if(data_set->stonith_enabled == FALSE) {
+ pe_warn("ENABLE STONITH TO KEEP YOUR RESOURCES
SAFE");
+ } else {
+ CRM_CHECK(data_set->have_quorum == FALSE, ;);
+ crm_notice("Cannot fence until quorum is
attained (or no_quorum_policy is set to ignore)");
+ }
}
-
);
if(dc_down != NULL) {
@@ -375,24 +370,21 @@
data_set->actions, CRM_OP_SHUTDOWN, NULL);
crm_debug_2("Ordering shutdowns before %s on %s (DC)",
- down_op->task, down_op->node->details->uname);
+ dc_down->task, dc_down->node->details->uname);
add_hash_param(dc_down->meta, XML_ATTR_TE_NOWAIT,
XML_BOOLEAN_TRUE);
slist_iter(
- action, action_t, shutdown_matches, lpc,
- if(action->node->details->is_dc) {
+ node_stop, action_t, shutdown_matches, lpc,
+ if(node_stop->node->details->is_dc) {
continue;
}
crm_debug("Ordering shutdown on %s before %s on %s",
- action->node->details->uname,
+ node_stop->node->details->uname,
dc_down->task, dc_down->node->details->uname);
- custom_action_order(
- NULL, crm_strdup(action->task), action,
- NULL, crm_strdup(dc_down->task), dc_down,
- pe_ordering_manditory, data_set);
+ order_actions(node_stop, dc_down,
pe_ordering_manditory);
);
}
------------------------------
_______________________________________________
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 16
********************************************