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])
----------------------------------------------------------------------
Message: 1
Date: Wed, 11 Jan 2006 06:06:13 -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 match.c tengine.c unpack.c utils.c
Log Message:
Logging enhancements
===================================================================
RCS file: /home/cvs/linux-ha/linux-ha/crm/tengine/actions.c,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -3 -r1.4 -r1.5
--- actions.c 22 Nov 2005 02:46:30 -0000 1.4
+++ actions.c 11 Jan 2006 13:06:11 -0000 1.5
@@ -1,4 +1,4 @@
-/* $Id: actions.c,v 1.4 2005/11/22 02:46:30 andrew Exp $ */
+/* $Id: actions.c,v 1.5 2006/01/11 13:06:11 andrew Exp $ */
/*
* Copyright (C) 2004 Andrew Beekhof <[EMAIL PROTECTED]>
*
@@ -474,8 +474,8 @@
return;
}
- crm_info("Initiating action %d: %s %s on %s",
- action->id, task_uuid, rsc_id, on_node);
+ crm_info("Initiating action %d: %s on %s",
+ action->id, task_uuid, on_node);
if(rsc_op != NULL) {
crm_log_xml_debug_2(rsc_op, "Performing");
@@ -493,12 +493,12 @@
action->invoked = TRUE;
value = g_hash_table_lookup(action->params, XML_ATTR_TE_NOWAIT);
if(crm_is_true(value)) {
- crm_info("Skipping wait for %d", action->id);
+ crm_debug("Skipping wait for %d", action->id);
action->complete = TRUE;
process_trigger(action->id);
} else if(action->timeout > 0) {
- crm_debug_3("Setting timer for action %d",action->id);
+ crm_debug_3("Setting timer for action %s", task_uuid);
action->timer->reason = timeout_action_warn;
start_te_timer(action->timer);
}
===================================================================
RCS file: /home/cvs/linux-ha/linux-ha/crm/tengine/callbacks.c,v
retrieving revision 1.57
retrieving revision 1.58
diff -u -3 -r1.57 -r1.58
--- callbacks.c 19 Dec 2005 16:54:44 -0000 1.57
+++ callbacks.c 11 Jan 2006 13:06:11 -0000 1.58
@@ -1,4 +1,4 @@
-/* $Id: callbacks.c,v 1.57 2005/12/19 16:54:44 andrew Exp $ */
+/* $Id: callbacks.c,v 1.58 2006/01/11 13:06:11 andrew Exp $ */
/*
* Copyright (C) 2004 Andrew Beekhof <[EMAIL PROTECTED]>
*
@@ -78,7 +78,7 @@
&diff_add_admin_epoch, &diff_add_epoch, &diff_add_updates,
&diff_del_admin_epoch, &diff_del_epoch, &diff_del_updates);
- crm_debug("Processing diff (%s): %d.%d.%d -> %d.%d.%d", op,
+ crm_info("Processing diff (%s): %d.%d.%d -> %d.%d.%d", op,
diff_del_admin_epoch,diff_del_epoch,diff_del_updates,
diff_add_admin_epoch,diff_add_epoch,diff_add_updates);
log_cib_diff(LOG_DEBUG_2, diff, op);
@@ -300,8 +300,8 @@
const char *op = cl_get_string(msg, F_CRM_TASK);
const char *type = cl_get_string(msg, F_CRM_MSG_TYPE);
+ crm_debug_2("Processing %s (%s) message", op, ref);
crm_log_message(LOG_DEBUG_3, msg);
- crm_debug("Processing %s (%s) message", op, ref);
if(op == NULL){
/* error */
@@ -340,7 +340,7 @@
CRM_DEV_ASSERT(xml_obj != NULL);
}
if(xml_obj != NULL) {
- crm_log_message_adv(LOG_DEBUG, "Processing NACK Reply",
msg);
+ crm_log_message_adv(LOG_DEBUG_2, "Processing NACK
Reply", msg);
extract_event(xml_obj);
} else {
crm_log_message_adv(LOG_ERR, "Invalid NACK Reply", msg);
@@ -363,19 +363,19 @@
te_fsa_state =
te_state_matrix[i_transition][te_fsa_state];
CRM_DEV_ASSERT(te_fsa_state == s_in_transition);
if(te_fsa_state != last_state) {
- crm_debug("State change %d->%d", last_state,
te_fsa_state);
+ crm_debug_2("State change %d->%d",
+ last_state, te_fsa_state);
}
initialize_graph();
unpack_graph(xml_data);
- crm_debug("Initiating transition...");
if(initiate_transition() == FALSE) {
/* nothing to be done.. means we're done. */
crm_info("No actions to be taken..."
" transition compelte.");
}
} else {
- crm_info("Ignoring transition: abort in progress");
+ crm_info("Ignoring new transition: abort in progress");
}
} else if(strcmp(op, CRM_OP_TE_HALT) == 0) {
@@ -387,6 +387,7 @@
} else if(strcmp(op, CRM_OP_QUIT) == 0) {
crm_info("Received quit message, terminating");
/* wait for pending actions to complete? */
+ print_state(LOG_INFO);
exit(0);
} else {
===================================================================
RCS file: /home/cvs/linux-ha/linux-ha/crm/tengine/match.c,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -3 -r1.2 -r1.3
--- match.c 22 Nov 2005 02:45:47 -0000 1.2
+++ match.c 11 Jan 2006 13:06:11 -0000 1.3
@@ -1,4 +1,4 @@
-/* $Id: match.c,v 1.2 2005/11/22 02:45:47 andrew Exp $ */
+/* $Id: match.c,v 1.3 2006/01/11 13:06:11 andrew Exp $ */
/*
* Copyright (C) 2004 Andrew Beekhof <[EMAIL PROTECTED]>
*
@@ -40,6 +40,7 @@
int
match_graph_event(action_t *action, crm_data_t *event, const char *event_node)
{
+ int target_rc = 0;
const char *target_rc_s = NULL;
const char *allow_fail = NULL;
const char *this_action = NULL;
@@ -135,16 +136,16 @@
target_rc_s = g_hash_table_lookup(match->params,XML_ATTR_TE_TARGET_RC);
if(target_rc_s != NULL) {
- int target_rc = crm_parse_int(target_rc_s, NULL);
+ target_rc = crm_parse_int(target_rc_s, NULL);
if(target_rc == op_rc_i) {
- crm_info("Target rc: == %d", op_rc_i);
+ crm_debug_2("Target rc: == %d", op_rc_i);
if(op_status_i != LRM_OP_DONE) {
crm_debug("Re-mapping op status to"
" LRM_OP_DONE for %s", update_event);
op_status_i = LRM_OP_DONE;
}
} else {
- crm_info("Target rc: != %d", op_rc_i);
+ crm_debug_2("Target rc: != %d", op_rc_i);
if(op_status_i != LRM_OP_ERROR) {
crm_info("Re-mapping op status to"
" LRM_OP_ERROR for %s", update_event);
@@ -171,8 +172,8 @@
case LRM_OP_TIMEOUT:
case LRM_OP_NOTSUPPORTED:
match->failed = TRUE;
- crm_warn("Action %s on %s failed: %s",
- update_event, event_node,
+ crm_warn("Action %s on %s failed (rc: %d vs. %d): %s",
+ update_event, event_node, target_rc, op_rc_i,
op_status2text(op_status_i));
if(FALSE == crm_is_true(allow_fail)) {
send_complete("Action failed", event,
@@ -284,7 +285,7 @@
const char *op_status = NULL;
if(event == NULL) {
- crm_debug("a transition is starting");
+ crm_debug_2("a transition is starting");
process_trigger(action_id);
check_for_completion();
@@ -299,16 +300,16 @@
op_status_i = crm_parse_int(op_status, NULL);
if(op_status_i == -1) {
/* just information that the action was sent */
- crm_debug("Ignoring TE initiated updates");
+ crm_debug_2("Ignoring TE initiated updates");
return TRUE;
}
}
if(magic == NULL) {
- crm_log_xml_debug(event, "Skipping \"non-change\"");
+ crm_log_xml_debug_2(event, "Skipping \"non-change\"");
action_id = -3;
} else {
- crm_debug("Processing CIB update: %s on %s: %s",
+ crm_debug_2("Processing CIB update: %s on %s: %s",
rsc_id, event_node, magic);
}
@@ -328,7 +329,7 @@
}
);
if(action_id != -1) {
- crm_debug("Terminating search: %d", action_id);
+ crm_debug_2("Terminating search: %d", action_id);
break;
}
);
@@ -358,10 +359,10 @@
}
if(action_id > -1) {
- crm_log_xml_debug_3(event, "Event found");
+ crm_log_xml_debug_2(event, "Event found");
} else if(action_id == -2) {
- crm_log_xml_info(event, "Event failed");
+ crm_log_xml_debug(event, "Event failed");
#if 0
} else if(action_id == -3) {
@@ -374,7 +375,7 @@
} else {
/* unexpected event, trigger a pe-recompute */
/* possibly do this only for certain types of actions */
- crm_debug("Search terminated: %d", action_id);
+ crm_debug_2("Search terminated: %d", action_id);
send_complete("Event not matched", event, te_update, i_cancel);
return FALSE;
}
===================================================================
RCS file: /home/cvs/linux-ha/linux-ha/crm/tengine/tengine.c,v
retrieving revision 1.107
retrieving revision 1.108
diff -u -3 -r1.107 -r1.108
--- tengine.c 22 Nov 2005 02:46:30 -0000 1.107
+++ tengine.c 11 Jan 2006 13:06:11 -0000 1.108
@@ -1,4 +1,4 @@
-/* $Id: tengine.c,v 1.107 2005/11/22 02:46:30 andrew Exp $ */
+/* $Id: tengine.c,v 1.108 2006/01/11 13:06:11 andrew Exp $ */
/*
* Copyright (C) 2004 Andrew Beekhof <[EMAIL PROTECTED]>
*
@@ -247,7 +247,7 @@
);
- crm_debug("Synapse %d complete", synapse->id);
+ crm_debug_2("Synapse %d fired", synapse->id);
}
gboolean
===================================================================
RCS file: /home/cvs/linux-ha/linux-ha/crm/tengine/unpack.c,v
retrieving revision 1.52
retrieving revision 1.53
diff -u -3 -r1.52 -r1.53
--- unpack.c 10 Jan 2006 13:46:41 -0000 1.52
+++ unpack.c 11 Jan 2006 13:06:11 -0000 1.53
@@ -1,4 +1,4 @@
-/* $Id: unpack.c,v 1.52 2006/01/10 13:46:41 andrew Exp $ */
+/* $Id: unpack.c,v 1.53 2006/01/11 13:06:11 andrew Exp $ */
/*
* Copyright (C) 2004 Andrew Beekhof <[EMAIL PROTECTED]>
*
@@ -157,6 +157,8 @@
crm_info("Unpacked %d actions in %d synapses",
num_actions, num_synapses);
+ print_state(LOG_DEBUG);
+
if(num_actions > 0) {
return TRUE;
} else {
@@ -275,7 +277,7 @@
/* Transient node attribute changes... */
event_node = crm_element_value(node_state, XML_ATTR_ID);
- crm_info("Processing state update from %s", event_node);
+ crm_debug("Processing state update from %s", event_node);
crm_log_xml_debug_3(node_state,"Processing");
if(blob.text == NULL) {
===================================================================
RCS file: /home/cvs/linux-ha/linux-ha/crm/tengine/utils.c,v
retrieving revision 1.46
retrieving revision 1.47
diff -u -3 -r1.46 -r1.47
--- utils.c 22 Nov 2005 02:40:24 -0000 1.46
+++ utils.c 11 Jan 2006 13:06:11 -0000 1.47
@@ -1,4 +1,4 @@
-/* $Id: utils.c,v 1.46 2005/11/22 02:40:24 andrew Exp $ */
+/* $Id: utils.c,v 1.47 2006/01/11 13:06:11 andrew Exp $ */
/*
* Copyright (C) 2004 Andrew Beekhof <[EMAIL PROTECTED]>
*
@@ -55,7 +55,9 @@
}
);
);
-
+ if(unconfirmed > 0) {
+ crm_info("Waiting on %d unconfirmed actions", unconfirmed);
+ }
return unconfirmed;
}
@@ -75,15 +77,15 @@
te_fsa_state_t last_state = te_fsa_state;
te_fsa_state = te_state_matrix[input][te_fsa_state];
if(te_fsa_state != last_state) {
- crm_debug("State change %d->%d", last_state, te_fsa_state);
+ crm_debug_2("State change %d->%d", last_state, te_fsa_state);
}
if(te_fsa_state == s_abort_pending
&& (unconfirmed == 0 || reason == te_timeout || reason ==
te_abort_timeout)) {
- crm_debug("Faking i_cmd_complete: %d/%d", last_state, input);
+ crm_debug_2("Faking i_cmd_complete: %d/%d", last_state, input);
te_fsa_state = te_state_matrix[i_cmd_complete][te_fsa_state];
- crm_debug("State change %d->%d", last_state, te_fsa_state);
- crm_debug("Stopping abort timer");
+ crm_debug_2("State change %d->%d", last_state, te_fsa_state);
+ crm_debug_2("Stopping abort timer");
stop_te_timer(abort_timer);
} else if(te_fsa_state ==s_abort_pending && te_fsa_state !=last_state) {
@@ -93,9 +95,9 @@
}
if(te_fsa_state == s_updates_pending && pending_callbacks == 0) {
- crm_debug("Faking i_cib_complete: %d/%d", last_state, input);
+ crm_debug_2("Faking i_cib_complete: %d/%d", last_state, input);
te_fsa_state = te_state_matrix[i_cib_complete][te_fsa_state];
- crm_debug("State change %d->%d", last_state, te_fsa_state);
+ crm_debug_2("State change %d->%d", last_state, te_fsa_state);
}
if(te_fsa_state == last_state
@@ -301,7 +303,8 @@
void
print_input(const char *prefix, action_t *input, int log_level)
{
- do_crm_log(log_level, __FILE__, __FUNCTION__, "%s[Input %d] %s (%s)",
+ do_crm_log(log_level, __FILE__, __FUNCTION__,
+ "%s[Input %d] %s (action-type: %s)",
prefix, input->id,
input->complete?"Satisfied":"Pending",
actiontype2text(input->type));
------------------------------
_______________________________________________
Linux-ha-cvs mailing list
[email protected]
http://lists.community.tummy.com/mailman/listinfo/linux-ha-cvs
End of Linux-ha-cvs Digest, Vol 26, Issue 19
********************************************