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: Sat, 18 Mar 2006 10:23:48 -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/testcases
Modified Files:
orphan-1.exp
Log Message:
Replace calls to CRM_DEV_ASSERT with CRM_CHECK which requires a recovery
action if the condition fails.
===================================================================
RCS file: /home/cvs/linux-ha/linux-ha/crm/pengine/testcases/orphan-1.exp,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -3 -r1.4 -r1.5
--- orphan-1.exp 8 Mar 2006 15:51:36 -0000 1.4
+++ orphan-1.exp 18 Mar 2006 17:23:48 -0000 1.5
@@ -30,7 +30,7 @@
<action_set>
<rsc_op id="3" rsc_id="rsc_c001n02" operation="cancel"
operation_key="rsc_c001n02_monitor_5000" on_node="c001n02"
on_node_uuid="e9bdfde9-01b0-421f-acd8-8a65a53e775f">
<primitive id="rsc_c001n02" class="ocf" provider="heartbeat"
type="IPaddr" is_managed="1"/>
- <attributes crm_feature_set="1.0.4" is_managed="1" ip="127.0.0.12"/>
+ <attributes crm_feature_set="1.0.4" interval="5000" task="monitor"
is_managed="1" ip="127.0.0.12"/>
</rsc_op>
</action_set>
<inputs/>
@@ -66,7 +66,7 @@
<action_set>
<rsc_op id="4" rsc_id="rsc_c001n03" operation="cancel"
operation_key="rsc_c001n03_monitor_5000" on_node="c001n03"
on_node_uuid="5d9a8c11-8684-43ea-9180-5e221530c193">
<primitive id="rsc_c001n03" class="ocf" provider="heartbeat"
type="IPaddr" is_managed="1"/>
- <attributes crm_feature_set="1.0.4" is_managed="1" ip="127.0.0.13"/>
+ <attributes crm_feature_set="1.0.4" interval="5000" task="monitor"
is_managed="1" ip="127.0.0.13"/>
</rsc_op>
</action_set>
<inputs/>
------------------------------
Message: 2
Date: Sat, 18 Mar 2006 10:23:49 -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 callbacks.c events.c fsa.c fsa_data.c utils.c
Log Message:
Replace calls to CRM_DEV_ASSERT with CRM_CHECK which requires a recovery
action if the condition fails.
===================================================================
RCS file: /home/cvs/linux-ha/linux-ha/crm/tengine/callbacks.c,v
retrieving revision 1.71
retrieving revision 1.72
diff -u -3 -r1.71 -r1.72
--- callbacks.c 16 Mar 2006 23:33:21 -0000 1.71
+++ callbacks.c 18 Mar 2006 17:23:48 -0000 1.72
@@ -1,4 +1,4 @@
-/* $Id: callbacks.c,v 1.71 2006/03/16 23:33:21 andrew Exp $ */
+/* $Id: callbacks.c,v 1.72 2006/03/18 17:23:48 andrew Exp $ */
/*
* Copyright (C) 2004 Andrew Beekhof <[EMAIL PROTECTED]>
*
@@ -50,8 +50,8 @@
start_global_timer(crm_action_timer_t *timer, int timeout)
{
CRM_ASSERT(timer != NULL);
- CRM_DEV_ASSERT(timer > 0);
- CRM_DEV_ASSERT(timer->source_id == 0);
+ CRM_CHECK(timer > 0, return FALSE);
+ CRM_CHECK(timer->source_id == 0, return FALSE);
if(timeout <= 0) {
crm_err("Tried to start timer with period: %d", timeout);
@@ -188,21 +188,22 @@
}
#else
xml_obj = xml_data;
- CRM_DEV_ASSERT(safe_str_eq(crm_element_name(xml_obj),
XML_TAG_CIB));
+ CRM_CHECK(xml_obj != NULL,
+ crm_log_message_adv(LOG_ERR, "Invalid (N)ACK", msg);
+ return FALSE);
#endif
- CRM_DEV_ASSERT(xml_obj != NULL);
- if(xml_obj != NULL) {
- xml_obj = get_object_root(XML_CIB_TAG_STATUS, xml_obj);
- CRM_DEV_ASSERT(xml_obj != NULL);
- }
- if(xml_obj != NULL) {
- crm_log_message_adv(LOG_DEBUG_2, "Processing NACK
Reply", msg);
- crm_debug("Processing NACK from %s", from);
- extract_event(xml_obj);
- } else {
- crm_log_message_adv(LOG_ERR, "Invalid NACK Reply", msg);
- }
-
+ CRM_CHECK(xml_obj != NULL,
+ crm_log_message_adv(LOG_ERR, "Invalid (N)ACK", msg);
+ return FALSE);
+ xml_obj = get_object_root(XML_CIB_TAG_STATUS, xml_obj);
+
+ CRM_CHECK(xml_obj != NULL,
+ crm_log_message_adv(LOG_ERR, "Invalid (N)ACK", msg);
+ return FALSE);
+
+ crm_log_message_adv(LOG_DEBUG_2, "Processing (N)ACK", msg);
+ crm_debug("Processing (N)ACK from %s", from);
+ extract_event(xml_obj);
} else if(safe_str_eq(type, XML_ATTR_RESPONSE)) {
crm_err("Message was a response not a request. Discarding");
@@ -257,7 +258,7 @@
(char *)op->node_list, op->private_data);
/* this will mark the event complete if a match is found */
- CRM_DEV_ASSERT(op->private_data != NULL);
+ CRM_CHECK(op->private_data != NULL, return);
/* filter out old STONITH actions */
decodeNVpair(op->private_data, ';', &call_id, &op_key);
@@ -326,7 +327,7 @@
#if 0
crm_err("Fencing daemon has left us: Shutting down...NOW");
/* shutdown properly later */
- CRM_DEV_ASSERT(FALSE/* fencing daemon died */);
+ CRM_CHECK(FALSE/* fencing daemon died */);
#else
crm_err("Fencing daemon has left us");
#endif
@@ -381,7 +382,6 @@
trigger_graph();
- CRM_DEV_ASSERT(rc == cib_ok);
if(rc < cib_ok) {
crm_err("Update for action %d (%s) FAILED: %s",
action->id, task_uuid, cib_error2string(rc));
@@ -406,7 +406,7 @@
transition_graph->abort_priority,
transition_graph->complete?"true":"false");
- CRM_DEV_ASSERT(timer->action != NULL);
+ CRM_CHECK(timer->action != NULL, return FALSE);
if(transition_graph->complete) {
crm_err("Ignoring timeout while not in transition");
@@ -473,7 +473,7 @@
transition_graph->abort_priority,
transition_graph->complete?"true":"false");
- CRM_DEV_ASSERT(timer->action == NULL);
+ CRM_CHECK(timer->action == NULL, return FALSE);
if(transition_graph->complete) {
crm_err("Ignoring timeout while not in transition");
@@ -499,7 +499,6 @@
te_graph_trigger(gpointer user_data)
{
int timeout = 0;
- int pending_updates = 0;
enum transition_status graph_rc = -1;
if(transition_graph->complete) {
@@ -523,10 +522,6 @@
return TRUE;
}
-
- pending_updates = num_cib_op_callbacks();
- CRM_DEV_ASSERT(pending_updates == 0);
-
if(graph_rc != transition_complete) {
crm_err("Transition failed: %s", transition_status(graph_rc));
print_graph(LOG_WARNING, transition_graph);
===================================================================
RCS file: /home/cvs/linux-ha/linux-ha/crm/tengine/events.c,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -3 -r1.4 -r1.5
--- events.c 16 Feb 2006 18:20:33 -0000 1.4
+++ events.c 18 Mar 2006 17:23:48 -0000 1.5
@@ -1,4 +1,4 @@
-/* $Id: events.c,v 1.4 2006/02/16 18:20:33 andrew Exp $ */
+/* $Id: events.c,v 1.5 2006/03/18 17:23:48 andrew Exp $ */
/*
* Copyright (C) 2004 Andrew Beekhof <[EMAIL PROTECTED]>
*
@@ -188,20 +188,20 @@
int op_rc_i = -3;
int transition_i = -1;
- CRM_DEV_ASSERT(event != NULL);
+ CRM_CHECK(event != NULL, return -1);
crm_debug_3("Processing \"%s\" change", crm_element_name(event));
update_event = crm_element_value(event, XML_ATTR_ID);
magic = crm_element_value(event, XML_ATTR_TRANSITION_MAGIC);
- CRM_DEV_ASSERT(magic != NULL);
+ CRM_CHECK(magic != NULL, return -2);
this_action = crm_element_value(action->xml, XML_LRM_ATTR_TASK);
this_uname = crm_element_value(action->xml, XML_LRM_ATTR_TARGET);
this_event = crm_element_value(action->xml, XML_LRM_ATTR_TASK_KEY);
this_node = crm_element_value(action->xml, XML_LRM_ATTR_TARGET_UUID);
- CRM_DEV_ASSERT(this_event != NULL);
+ CRM_CHECK(this_event != NULL, return -2);
if(safe_str_neq(this_event, update_event)) {
crm_debug_2("Action %d : Event mismatch %s vs. %s",
@@ -217,9 +217,9 @@
crm_debug("Matched action (%d) %s", action->id, this_event);
- CRM_DEV_ASSERT(decode_transition_magic(
+ CRM_CHECK(decode_transition_magic(
magic, &update_te_uuid,
- &transition_i, &op_status_i, &op_rc_i));
+ &transition_i, &op_status_i, &op_rc_i), return
-2);
if(transition_i == -1) {
/* we never expect these - recompute */
===================================================================
RCS file: /home/cvs/linux-ha/linux-ha/crm/tengine/fsa.c,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -3 -r1.2 -r1.3
--- fsa.c 14 Jun 2005 11:38:26 -0000 1.2
+++ fsa.c 18 Mar 2006 17:23:48 -0000 1.3
@@ -1,4 +1,4 @@
-/* $Id: fsa.c,v 1.2 2005/06/14 11:38:26 davidlee Exp $ */
+/* $Id: fsa.c,v 1.3 2006/03/18 17:23:48 andrew Exp $ */
/*
* Copyright (C) 2004 Andrew Beekhof <[EMAIL PROTECTED]>
*
@@ -57,7 +57,7 @@
do_dc_command(enum te_fsa_state_t fsa_state, te_input_t *fsa_input)
{
struct te_data_command_s *data = fsa_data->data;
- CRM_DEV_ASSERT(fsa_input->ops->type() == te_data_command);
+ CRM_CHECK(fsa_input->ops->type() == te_data_command);
process_te_message(data->msg, data->xml);
}
@@ -66,7 +66,7 @@
do_cib_callback(enum te_fsa_state_t fsa_state, te_input_t *fsa_input)
{
struct te_data_cib_s *data = fsa_data->data;
- CRM_DEV_ASSERT(fsa_input->ops->type() == te_data_cib);
+ CRM_CHECK(fsa_input->ops->type() == te_data_cib);
cib_action_updated(data->msg, data->call_id, data->rc,
data->output, data->user_data);
}
@@ -76,7 +76,7 @@
do_cib_notify(enum te_fsa_state_t fsa_state, te_input_t *fsa_input)
{
struct te_data_command_s *data = fsa_data->data;
- CRM_DEV_ASSERT(fsa_input->ops->type() == te_data_command);
+ CRM_CHECK(fsa_input->ops->type() == te_data_command);
te_update_confirm(NULL, data->msg);
}
@@ -84,6 +84,6 @@
do_notify_dc(enum te_fsa_state_t fsa_state, te_input_t *fsa_input)
{
struct te_data_complete_s *data = fsa_data->data;
- CRM_DEV_ASSERT(fsa_input->ops->type() == te_data_complete);
+ CRM_CHECK(fsa_input->ops->type() == te_data_complete);
send_complete(data->text, data->msg, data->reason, data->input);
}
===================================================================
RCS file: /home/cvs/linux-ha/linux-ha/crm/tengine/fsa_data.c,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -3 -r1.3 -r1.4
--- fsa_data.c 14 Jun 2005 11:38:26 -0000 1.3
+++ fsa_data.c 18 Mar 2006 17:23:48 -0000 1.4
@@ -1,4 +1,4 @@
-/* $Id: fsa_data.c,v 1.3 2005/06/14 11:38:26 davidlee Exp $ */
+/* $Id: fsa_data.c,v 1.4 2006/03/18 17:23:48 andrew Exp $ */
/*
* Copyright (C) 2004 Andrew Beekhof <[EMAIL PROTECTED]>
*
@@ -96,7 +96,7 @@
te_input_t* te_input_copy(te_input_t *fsa_data)
{
te_input_t *a_copy = NULL;
- CRM_DEV_ASSERT(fsa_data != NULL); if(crm_assert_failed) {return NULL;}
+ CRM_CHECK(fsa_data != NULL); if(crm_assert_failed) {return NULL;}
crm_malloc0(a_copy, sizeof(te_input_t));
*a_copy = *fsa_data;
a_copy->data = NULL;
@@ -161,7 +161,7 @@
void te_data_command_free(te_input_t *fsa_data)
{
struct te_data_command_s *data = fsa_data->data;
- CRM_DEV_ASSERT(fsa_data->ops->type() == te_data_command);
+ CRM_CHECK(fsa_data->ops->type() == te_data_command);
ha_msg_del(data->msg);
free_xml(data->xml);
crm_free(data);
@@ -171,7 +171,7 @@
{
struct te_data_command_s *data = fsa_data->data;
struct te_data_command_s *copy_data = NULL;
- CRM_DEV_ASSERT(fsa_data->ops->type() == te_data_command);
+ CRM_CHECK(fsa_data->ops->type() == te_data_command);
crm_malloc0(a_copy->data, sizeof(struct te_data_command_s));
copy_data = a_copy->data;
@@ -192,7 +192,7 @@
void te_data_cib_free(te_input_t *fsa_data)
{
struct te_data_cib_s *data = fsa_data->data;
- CRM_DEV_ASSERT(fsa_data->ops->type() == te_data_cib);
+ CRM_CHECK(fsa_data->ops->type() == te_data_cib);
ha_msg_del(data->msg);
free_xml(data->xml);
crm_free(data);
@@ -202,7 +202,7 @@
{
struct te_data_cib_s *data = fsa_data->data;
struct te_data_cib_s *copy_data = NULL;
- CRM_DEV_ASSERT(fsa_data->ops->type() == te_data_cib);
+ CRM_CHECK(fsa_data->ops->type() == te_data_cib);
crm_malloc0(a_copy->data, sizeof(struct te_data_cib_s));
copy_data = a_copy->data;
@@ -224,7 +224,7 @@
void te_data_complete_free(te_input_t *fsa_data)
{
struct te_data_complete_s *data = fsa_data->data;
- CRM_DEV_ASSERT(fsa_data->ops->type() == te_data_complete);
+ CRM_CHECK(fsa_data->ops->type() == te_data_complete);
ha_msg_del(data->msg);
free_xml(data->xml);
crm_free(data);
@@ -234,7 +234,7 @@
{
struct te_data_complete_s *data = fsa_data->data;
struct te_data_complete_s *copy_data = NULL;
- CRM_DEV_ASSERT(fsa_data->ops->type() == te_data_complete);
+ CRM_CHECK(fsa_data->ops->type() == te_data_complete);
crm_malloc0(a_copy->data, sizeof(struct te_data_complete_s));
copy_data = a_copy->data;
===================================================================
RCS file: /home/cvs/linux-ha/linux-ha/crm/tengine/utils.c,v
retrieving revision 1.57
retrieving revision 1.58
diff -u -3 -r1.57 -r1.58
--- utils.c 27 Feb 2006 09:55:57 -0000 1.57
+++ utils.c 18 Mar 2006 17:23:48 -0000 1.58
@@ -1,4 +1,4 @@
-/* $Id: utils.c,v 1.57 2006/02/27 09:55:57 andrew Exp $ */
+/* $Id: utils.c,v 1.58 2006/03/18 17:23:48 andrew Exp $ */
/*
* Copyright (C) 2004 Andrew Beekhof <[EMAIL PROTECTED]>
*
@@ -83,11 +83,17 @@
gboolean
stop_te_timer(crm_action_timer_t *timer)
{
+ const char *timer_desc = "action timer";
+
if(timer == NULL) {
return FALSE;
}
+ if(timer->reason == timeout_abort) {
+ timer_desc = "global timer";
+ }
if(timer->source_id != 0) {
+ crm_debug("Stopping %s", timer_desc);
Gmain_timeout_remove(timer->source_id);
timer->source_id = 0;
------------------------------
_______________________________________________
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 40
********************************************