[SCM] CTDB repository - branch 1.2 updated - ctdb-1.9.1-417-g572031f

Ronnie Sahlberg sahlberg at samba.org
Tue May 3 18:42:36 MDT 2011


The branch, 1.2 has been updated
       via  572031ff6827371ce34f243ad5e2a723e2320c67 (commit)
      from  dcbb31f9fa9a59c2a795cf48d1adf90a47421ba2 (commit)

http://gitweb.samba.org/?p=ctdb.git;a=shortlog;h=1.2


- Log -----------------------------------------------------------------
commit 572031ff6827371ce34f243ad5e2a723e2320c67
Author: Ronnie Sahlberg <ronniesahlberg at gmail.com>
Date:   Wed May 4 08:54:02 2011 +1000

    Cleanup of logging messages/spamming
    
    Reduce an infomational message about not performing ip reallocation
    from NOTICE(the default) to INFO.
    These messages are normal during startup or when stopped/banned when
    we will be in recovery mode for a while.
    
    Remove a messager in the loop waiting for initial startup to complete about
    the generation being invalid. It is always invalid at this stage before we have
    finished initial recovery.
    
    Rate-limit the informational messages for CTDB_WAIT_UNTIL_RECOVERED
    so that we only print them once per second for the first 60 seconds and after that only once per 10 minutes.
    These messages are normal during startup, but we should not be logging them every second for cases where we will remain in recovery mode during startup for an extended period of time.
    Such as if suspended or permabanned.
    
    CQ S1023302

-----------------------------------------------------------------------

Summary of changes:
 server/ctdb_monitor.c  |   12 ++++++++----
 server/ctdb_recoverd.c |    2 +-
 2 files changed, 9 insertions(+), 5 deletions(-)


Changeset truncated at 500 lines:

diff --git a/server/ctdb_monitor.c b/server/ctdb_monitor.c
index 89fa886..8d837ce 100644
--- a/server/ctdb_monitor.c
+++ b/server/ctdb_monitor.c
@@ -223,16 +223,20 @@ static void ctdb_wait_until_recovered(struct event_context *ev, struct timed_eve
 {
 	struct ctdb_context *ctdb = talloc_get_type(private_data, struct ctdb_context);
 	int ret;
+	static int count = 0;
 
-	DEBUG(DEBUG_NOTICE,("CTDB_WAIT_UNTIL_RECOVERED\n"));
-	if (ctdb->nodes[ctdb->pnn]->flags & NODE_FLAGS_STOPPED) {
-		DEBUG(DEBUG_NOTICE,("Node is STOPPED. Node will NOT recover.\n"));
+	count++;
+
+	if (count < 60 || count%600 == 0) { 
+		DEBUG(DEBUG_NOTICE,("CTDB_WAIT_UNTIL_RECOVERED\n"));
+		if (ctdb->nodes[ctdb->pnn]->flags & NODE_FLAGS_STOPPED) {
+			DEBUG(DEBUG_NOTICE,("Node is STOPPED. Node will NOT recover.\n"));
+		}
 	}
 
 	if (ctdb->vnn_map->generation == INVALID_GENERATION) {
 		ctdb->db_persistent_startup_generation = INVALID_GENERATION;
 
-		DEBUG(DEBUG_NOTICE,(__location__ " generation is INVALID. Wait one more second\n"));
 		event_add_timed(ctdb->ev, ctdb->monitor->monitor_context,
 				     timeval_current_ofs(1, 0), 
 				     ctdb_wait_until_recovered, ctdb);
diff --git a/server/ctdb_recoverd.c b/server/ctdb_recoverd.c
index f3a77f2..0cbf11d 100644
--- a/server/ctdb_recoverd.c
+++ b/server/ctdb_recoverd.c
@@ -2576,7 +2576,7 @@ static int verify_local_ip_allocation(struct ctdb_context *ctdb, struct ctdb_rec
 	/* skip the check if we have started but not finished recovery */
 	if (timeval_compare(&uptime1->last_recovery_finished,
 			    &uptime1->last_recovery_started) != 1) {
-		DEBUG(DEBUG_NOTICE, (__location__ " in the middle of recovery or ip reallocation. skipping public ip address check\n"));
+		DEBUG(DEBUG_INFO, (__location__ " in the middle of recovery or ip reallocation. skipping public ip address check\n"));
 		talloc_free(mem_ctx);
 
 		return 0;


-- 
CTDB repository


More information about the samba-cvs mailing list