6 files changed, 22 insertions(+), 7 deletions(-)
autogen.sh          |    3 ++-
crmd/messages.c     |    8 +++++++-
crmd/pengine.c      |   11 +++++++++--
crmd/te_callbacks.c |    3 +--
crmd/tengine.c      |    3 ++-
lib/ais/plugin.c    |    1 +


# HG changeset patch
# User Dejan Muhamedagic <[EMAIL PROTECTED]>
# Date 1226592643 -3600
# Branch stable-1.0
# Node ID 117b9b85a4e0db5c8090728b2637e47450933024
# Parent  7b4c650ef8293150306bf1269ad9b41d705593f5
# Parent  2f7341971579c8743459ee29011d11cc9dbbbbef
merge with andrew

diff --git a/autogen.sh b/autogen.sh
--- a/autogen.sh
+++ b/autogen.sh
@@ -235,7 +235,8 @@ fi
 
 rm -rf libltdl libltdl.tar
 echo $libtoolize --ltdl --force --copy
-$libtoolize --ltdl --force --copy
+# Unset GREP_OPTIONS as any coloring can mess up the AC_CONFIG_AUX_DIR matching patterns
+GREP_OPTIONS= $libtoolize --ltdl --force --copy
 
 echo $aclocal $ACLOCAL_FLAGS
 $aclocal $ACLOCAL_FLAGS
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/pengine.c b/crmd/pengine.c
--- a/crmd/pengine.c
+++ b/crmd/pengine.c
@@ -251,9 +251,14 @@ do_pe_invoke(long long action,
 		return;		
 	}
 	
-	crm_debug("Requesting the current CIB: %s",fsa_state2string(fsa_state));
 	fsa_pe_query = fsa_cib_conn->cmds->query(
 		fsa_cib_conn, NULL, NULL, cib_scope_local);
+
+	crm_info("Query %d: Requesting the current CIB: %s", fsa_pe_query, fsa_state2string(fsa_state));
+
+	/* Make sure any queued calculations are discarded */
+	crm_free(fsa_pe_ref);
+	fsa_pe_ref = NULL;
 
 	fsa_cib_conn->cmds->register_callback(
 	    fsa_cib_conn, fsa_pe_query, 60, FALSE, NULL,
@@ -269,6 +274,7 @@ do_pe_invoke_callback(xmlNode *msg, int 
 	if(rc != cib_ok) {
 	    crm_err("Cant retrieve the CIB: %s", cib_error2string(rc));
 	    register_fsa_error_adv(C_FSA_INTERNAL, I_ERROR, NULL, NULL, __FUNCTION__);
+	    return;
 
 	} else if(call_id != fsa_pe_query) {
 		crm_debug_2("Skipping superceeded CIB query: %d (current=%d)",
@@ -295,6 +301,7 @@ do_pe_invoke_callback(xmlNode *msg, int 
 
 	} else if(fsa_state != S_POLICY_ENGINE) {
 	    crm_err("Invoking PE in state: %s", fsa_state2string(fsa_state));
+	    return;
 	}
 
 	CRM_DEV_ASSERT(output != NULL);
@@ -320,7 +327,7 @@ do_pe_invoke_callback(xmlNode *msg, int 
 	    register_fsa_error_adv(C_FSA_INTERNAL, I_ERROR, NULL, NULL, __FUNCTION__);
 	}
 	
-	crm_debug("Invoking the PE: ref=%s, seq=%llu, quorate=%d",
+	crm_info("Invoking the PE: ref=%s, seq=%llu, quorate=%d",
 		  fsa_pe_ref, crm_peer_seq, fsa_has_quorum);
 	free_xml(cmd);
 }
diff --git a/crmd/te_callbacks.c b/crmd/te_callbacks.c
--- a/crmd/te_callbacks.c
+++ b/crmd/te_callbacks.c
@@ -199,13 +199,12 @@ te_update_diff(const char *event, xmlNod
 	if(xpathObj && xpathObj->nodesetval->nodeNr > 0) {
 	    int updates = xpathObj->nodesetval->nodeNr;
 	    xmlXPathFreeObject(xpathObj); xpathObj = NULL;
-	    crm_info("Detected events for %d lrm resources", updates);
 	    
 	    if(updates > 1) {
 		/* Updates by, or in response to, TE actions will never contain updates
 		 * for more than one resource at a time
 		 */
-		crm_info("Detected LRM refresh: Skipping all resource events");
+		crm_info("Detected LRM refresh - %d resources updated: Skipping all resource events", updates);
 		abort_transition(INFINITY, tg_restart, "LRM Refresh", diff);
 		goto bail;
 	    }
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);
 		}
diff --git a/lib/ais/plugin.c b/lib/ais/plugin.c
--- a/lib/ais/plugin.c
+++ b/lib/ais/plugin.c
@@ -731,6 +731,7 @@ int ais_ipc_client_exit_callback (void *
     ENTER("Client=%p", conn);
     for (; lpc < SIZEOF(crm_children); lpc++) {
 	if(crm_children[lpc].conn == conn) {
+	    crm_children[lpc].pid = 0;
 	    crm_children[lpc].conn = NULL;
 	    crm_children[lpc].async_conn = NULL;
 	    client = crm_children[lpc].name;
_______________________________________________
Pacemaker mailing list
[email protected]
http://list.clusterlabs.org/mailman/listinfo/pacemaker

Reply via email to