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: Wed, 11 Jan 2006 06:01: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/crmd
Modified Files:
control.c
Log Message:
Logging tweaks
Disable the node_status update on shutdown
- it was causing problems and looks to be redundant
===================================================================
RCS file: /home/cvs/linux-ha/linux-ha/crm/crmd/control.c,v
retrieving revision 1.104
retrieving revision 1.105
diff -u -3 -r1.104 -r1.105
--- control.c 10 Jan 2006 13:46:42 -0000 1.104
+++ control.c 11 Jan 2006 13:01:13 -0000 1.105
@@ -234,7 +234,7 @@
int was_error = 0;
int interval = 1; /* seconds between DC heartbeats */
- crm_info("Register Signal Handler");
+ crm_debug("Registering Signal Handlers");
G_main_add_SignalHandler(
G_PRIORITY_HIGH, SIGTERM, crm_shutdown, NULL, NULL);
@@ -244,14 +244,14 @@
ipc_clients = g_hash_table_new(g_str_hash, g_str_equal);
if(was_error == 0) {
- crm_info("Init server comms");
+ crm_debug("Init server comms");
was_error = init_server_ipc_comms(
crm_strdup(CRM_SYSTEM_CRMD), crmd_client_connect,
default_ipc_connection_destroy);
}
if(was_error == 0) {
- crm_info("Creating CIB object");
+ crm_debug("Creating CIB object");
fsa_cib_conn = cib_new();
}
@@ -442,7 +442,7 @@
crm_err("%d stop operations outstanding at exit",
g_hash_table_size(shutdown_ops));
}
-
+#if 0
if(is_set(fsa_input_register, R_CIB_CONNECTED)) {
crm_data_t *tmp1 = NULL;
crm_info("Updating node_status entry");
@@ -451,7 +451,7 @@
update_local_cib(create_cib_fragment(tmp1, XML_CIB_TAG_STATUS));
free_xml(tmp1);
}
-
+#endif
return I_NULL;
}
@@ -677,7 +677,7 @@
crm_err("get_mynodeid() failed");
return FALSE;
}
- crm_info("FSA Hostname: %s", fsa_our_uname);
+ crm_info("Hostname: %s", fsa_our_uname);
crm_debug_3("Finding our node uuid");
fsa_our_uuid = get_uuid(fsa_cluster_conn, fsa_our_uname);
@@ -685,7 +685,7 @@
crm_err("get_uuid_by_name() failed");
return FALSE;
}
- crm_info("FSA UUID: %s", fsa_our_uuid);
+ crm_info("UUID: %s", fsa_our_uuid);
/* Async get client status information in the cluster */
crm_debug_3("Requesting an initial dump of CRMD client_status");
------------------------------
Message: 2
Date: Wed, 11 Jan 2006 06:06:12 -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/cib
Modified Files:
io.c main.c notify.c
Log Message:
Logging enhancements
===================================================================
RCS file: /home/cvs/linux-ha/linux-ha/crm/cib/io.c,v
retrieving revision 1.38
retrieving revision 1.39
diff -u -3 -r1.38 -r1.39
--- io.c 7 Jan 2006 21:18:42 -0000 1.38
+++ io.c 11 Jan 2006 13:06:11 -0000 1.39
@@ -1,4 +1,4 @@
-/* $Id: io.c,v 1.38 2006/01/07 21:18:42 andrew Exp $ */
+/* $Id: io.c,v 1.39 2006/01/11 13:06:11 andrew Exp $ */
/*
* Copyright (C) 2004 Andrew Beekhof <[EMAIL PROTECTED]>
*
@@ -534,7 +534,7 @@
const char *current = crm_element_value(
xml_obj, XML_ATTR_CCM_TRANSITION);
if(safe_str_neq(current, ccm_transition_id)) {
- crm_debug("Set transition to %s", ccm_transition_id);
+ crm_debug("Current CCM transition is: %s", ccm_transition_id);
crm_xml_add(the_cib, XML_ATTR_CCM_TRANSITION,ccm_transition_id);
}
}
@@ -553,7 +553,7 @@
if(current != active) {
peers_s = crm_itoa(active);
crm_xml_add(xml_obj, XML_ATTR_NUMPEERS, peers_s);
- crm_debug("Set peers to %s", peers_s);
+ crm_debug("We now have %s active peers", peers_s);
crm_free(peers_s);
}
return active;
===================================================================
RCS file: /home/cvs/linux-ha/linux-ha/crm/cib/main.c,v
retrieving revision 1.29
retrieving revision 1.30
diff -u -3 -r1.29 -r1.30
--- main.c 10 Jan 2006 13:50:34 -0000 1.29
+++ main.c 11 Jan 2006 13:06:11 -0000 1.30
@@ -1,4 +1,4 @@
-/* $Id: main.c,v 1.29 2006/01/10 13:50:34 andrew Exp $ */
+/* $Id: main.c,v 1.30 2006/01/11 13:06:11 andrew Exp $ */
/*
* Copyright (C) 2004 Andrew Beekhof <[EMAIL PROTECTED]>
*
@@ -314,8 +314,8 @@
disconnect_cib_client(gpointer key, gpointer value, gpointer user_data)
{
cib_client_t *a_client = value;
- crm_debug("Processing client %s/%s... send=%d, recv=%d",
- a_client->name, a_client->id,
+ crm_debug_2("Processing client %s/%s... send=%d, recv=%d",
+ a_client->name, a_client->channel_name,
(int)a_client->channel->send_queue->current_qlen,
(int)a_client->channel->recv_queue->current_qlen);
@@ -324,14 +324,15 @@
if(a_client->channel->send_queue->current_qlen != 0
|| a_client->channel->recv_queue->current_qlen != 0) {
crm_info("Flushed messages to/from %s/%s... send=%d,
recv=%d",
- a_client->name, a_client->id,
+ a_client->name, a_client->channel_name,
(int)a_client->channel->send_queue->current_qlen,
(int)a_client->channel->recv_queue->current_qlen);
}
}
if(a_client->channel->ch_status == IPC_CONNECT) {
- crm_warn("Disconnecting %s/%s...", a_client->name,a_client->id);
+ crm_warn("Disconnecting %s/%s...",
+ a_client->name, a_client->channel_name);
a_client->channel->ops->disconnect(a_client->channel);
}
}
===================================================================
RCS file: /home/cvs/linux-ha/linux-ha/crm/cib/notify.c,v
retrieving revision 1.32
retrieving revision 1.33
diff -u -3 -r1.32 -r1.33
--- notify.c 24 Oct 2005 07:36:58 -0000 1.32
+++ notify.c 11 Jan 2006 13:06:11 -0000 1.33
@@ -1,4 +1,4 @@
-/* $Id: notify.c,v 1.32 2005/10/24 07:36:58 andrew Exp $ */
+/* $Id: notify.c,v 1.33 2006/01/11 13:06:11 andrew Exp $ */
/*
* Copyright (C) 2004 Andrew Beekhof <[EMAIL PROTECTED]>
*
@@ -112,9 +112,9 @@
max_qlen = ipc_client->send_queue->max_qlen;
if(ipc_client->ops->get_chan_status(ipc_client) != IPC_CONNECT) {
- crm_debug("Skipping notification to disconnected"
- " client %s/%s", client->name, client->id);
-
+ crm_debug_2("Skipping notification to disconnected"
+ " client %s/%s", client->name, client->id);
+
} else if(client->pre_notify && is_pre) {
if(qlen < (int)(0.4 * max_qlen)) {
do_send = TRUE;
@@ -251,23 +251,32 @@
int del_epoch = 0;
int del_admin_epoch = 0;
+ int log_level = LOG_INFO;
+
if(diff == NULL) {
return;
}
+
+ if(result != cib_ok) {
+ log_level = LOG_WARNING;
+ }
cib_diff_version_details(
diff, &add_admin_epoch, &add_epoch, &add_updates,
&del_admin_epoch, &del_epoch, &del_updates);
if(add_updates != del_updates) {
- crm_debug("Notify: %d.%d.%d -> %d.%d.%d",
- del_admin_epoch, del_epoch, del_updates,
- add_admin_epoch, add_epoch, add_updates);
+ crm_log_maybe(log_level, "Update (%s): %d.%d.%d -> %d.%d.%d",
+ cib_error2string(result),
+ del_admin_epoch, del_epoch, del_updates,
+ add_admin_epoch, add_epoch, add_updates);
} else if(diff != NULL) {
- crm_debug("Local-only Change: %d.%d.%d",
- add_admin_epoch, add_epoch, add_updates);
+ crm_log_maybe(log_level, "Local-only Change (%s): %d.%d.%d",
+ cib_error2string(result),
+ add_admin_epoch, add_epoch, add_updates);
}
+ crm_log_message_adv(log_level+1, __FUNCTION__, diff);
do_cib_notify(options, op, update, result, diff, T_CIB_DIFF_NOTIFY);
}
@@ -371,7 +380,9 @@
void
cib_replace_notify(crm_data_t *update, enum cib_errors result, crm_data_t
*diff)
{
+ const char *origin = NULL;
HA_Message *replace_msg = NULL;
+
int add_updates = 0;
int add_epoch = 0;
int add_admin_epoch = 0;
@@ -388,13 +399,15 @@
diff, &add_admin_epoch, &add_epoch, &add_updates,
&del_admin_epoch, &del_epoch, &del_updates);
+ origin = crm_element_value(update, F_CRM_ORIGIN);
+
if(add_updates != del_updates) {
- crm_debug("Replaced: %d.%d.%d -> %d.%d.%d",
+ crm_info("Replaced: %d.%d.%d -> %d.%d.%d from %s",
del_admin_epoch, del_epoch, del_updates,
- add_admin_epoch, add_epoch, add_updates);
+ add_admin_epoch, add_epoch, add_updates, origin);
} else if(diff != NULL) {
- crm_debug("Local-only Replace: %d.%d.%d",
- add_admin_epoch, add_epoch, add_updates);
+ crm_info("Local-only Replace: %d.%d.%d from %s",
+ add_admin_epoch, add_epoch, add_updates, origin);
}
replace_msg = ha_msg_new(8);
@@ -404,7 +417,7 @@
ha_msg_add_int(replace_msg, F_CIB_RC, result);
attach_cib_generation(replace_msg, "cib-replace-generation", update);
- crm_log_message_adv(LOG_DEBUG,"CIB Replaced", replace_msg);
+ crm_log_message_adv(LOG_DEBUG_2,"CIB Replaced", replace_msg);
g_hash_table_foreach(client_list, cib_notify_client, replace_msg);
crm_msg_del(replace_msg);
------------------------------
_______________________________________________
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 17
********************************************