2 files changed, 9 insertions(+), 2 deletions(-)
crmd/messages.c |    8 +++++++-
crmd/tengine.c  |    3 ++-


# HG changeset patch
# User Andrew Beekhof <[EMAIL PROTECTED]>
# Date 1226591406 -3600
# Branch stable-1.0
# Node ID f5a2521a74509fdb1883ba601aa896cfce515a10
# Parent  26c25955ba906cb0b2268fc8085fcfe5a43cca07
Low: crmd: Improved logging of token identifying a PE computation

diff --git a/crmd/messages.c b/crmd/messages.c
--- a/crmd/messages.c
+++ b/crmd/messages.c
@@ -845,13 +845,19 @@ handle_response(xmlNode *stored_msg)
     } else if(AM_I_DC && strcmp(op, CRM_OP_PECALC) == 0) {
 	/* Check if the PE answer been superceeded by a subsequent request? */ 
 	const char *msg_ref = crm_element_value(stored_msg, XML_ATTR_REFERENCE);
-	if(msg_ref != NULL && safe_str_eq(msg_ref, fsa_pe_ref)) {
+	if(msg_ref == NULL) {
+	    crm_err("%s - Ignoring calculation with no reference", op);
+
+	} else if(safe_str_eq(msg_ref, fsa_pe_ref)) {
 	    ha_msg_input_t fsa_input;
 	    fsa_input.msg = stored_msg;
 	    register_fsa_input_later(C_IPC_MESSAGE, I_PE_SUCCESS, &fsa_input);			
 	    crm_debug_2("Completed: %s...", fsa_pe_ref);
 	    crm_free(fsa_pe_ref);
 	    fsa_pe_ref = NULL;
+
+	} else {
+	    crm_info("%s calculation %s is obsolete", op, msg_ref);
 	}
 		
     } else if(strcmp(op, CRM_OP_VOTE) == 0
diff --git a/crmd/tengine.c b/crmd/tengine.c
--- a/crmd/tengine.c
+++ b/crmd/tengine.c
@@ -202,6 +202,7 @@ do_te_invoke(long long action,
 		const char *value = NULL;
 		xmlNode *graph_data = NULL;
 		ha_msg_input_t *input = fsa_typed_data(fsa_dt_ha_msg);
+		const char *ref = crm_element_value(input->msg, XML_ATTR_REFERENCE);
 		const char *graph_file = crm_element_value(input->msg, F_CRM_TGRAPH);
 		const char *graph_input = crm_element_value(input->msg, F_CRM_TGRAPH_INPUT);
 
@@ -232,7 +233,7 @@ do_te_invoke(long long action,
 		destroy_graph(transition_graph);
 		transition_graph = unpack_graph(graph_data, graph_input);
 		CRM_CHECK(transition_graph != NULL, transition_graph = create_blank_graph(); return);
-		crm_info("Processing graph %d derived from %s", transition_graph->id, graph_input);
+		crm_info("Processing graph %d (ref=%s) derived from %s", transition_graph->id, ref, graph_input);
 		if(transition_graph->transition_timeout > 0) {
 		    start_global_timer(transition_timer, transition_graph->transition_timeout);
 		}
_______________________________________________
Pacemaker mailing list
[email protected]
http://list.clusterlabs.org/mailman/listinfo/pacemaker

Reply via email to