[SCM] CTDB repository - branch master updated - ctdb-1.0.108-58-g5c8e56f

Ronnie Sahlberg sahlberg at samba.org
Mon Dec 14 00:17:59 MST 2009


The branch, master has been updated
       via  5c8e56fc7a518e115bceac257867739283cf6a1e (commit)
      from  401f421fa003d9515df15e759b50b56e0c67d69c (commit)

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


- Log -----------------------------------------------------------------
commit 5c8e56fc7a518e115bceac257867739283cf6a1e
Author: Ronnie Sahlberg <ronniesahlberg at gmail.com>
Date:   Mon Dec 14 15:53:23 2009 +1100

    Rename the tunable EventScriptBanCount to EventScriptTimeoutCount
    since we no longer ban nodes when dodgy scripts continue to hang.
    
    We now only mark nodes as unhealthy if monitor events fail or timeout. Never ban.

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

Summary of changes:
 include/ctdb_private.h |    2 +-
 server/ctdb_monitor.c  |    4 ++--
 server/ctdb_tunables.c |    2 +-
 3 files changed, 4 insertions(+), 4 deletions(-)


Changeset truncated at 500 lines:

diff --git a/include/ctdb_private.h b/include/ctdb_private.h
index a5a931f..e490b21 100644
--- a/include/ctdb_private.h
+++ b/include/ctdb_private.h
@@ -103,7 +103,7 @@ struct ctdb_tunable {
 	uint32_t monitor_interval;
 	uint32_t tickle_update_interval;
 	uint32_t script_timeout;
-	uint32_t script_ban_count; /* ban after this many consec timeouts*/
+	uint32_t script_timeout_count; /* allow dodgy scripts to hang this many times in a row before we mark the node unhealthy */
 	uint32_t recovery_grace_period;
 	uint32_t recovery_ban_period;
 	uint32_t database_hash_size;
diff --git a/server/ctdb_monitor.c b/server/ctdb_monitor.c
index 54cdac1..2bf5dcb 100644
--- a/server/ctdb_monitor.c
+++ b/server/ctdb_monitor.c
@@ -126,8 +126,8 @@ static void ctdb_health_callback(struct ctdb_context *ctdb, int status, void *p)
 	if (status == -ETIME) {
 		ctdb->event_script_timeouts++;
 
-		if (ctdb->event_script_timeouts > ctdb->tunable.script_ban_count) {
-			DEBUG(DEBUG_ERR, ("Maximum timeout count %u reached for eventscript. Making node unhealthy\n", ctdb->tunable.script_ban_count));
+		if (ctdb->event_script_timeouts >= ctdb->tunable.script_timeout_count) {
+			DEBUG(DEBUG_ERR, ("Maximum timeout count %u reached for eventscript. Making node unhealthy\n", ctdb->tunable.script_timeout_count));
 		} else {
 			/* We pretend this is OK. */
 			goto after_change_status;
diff --git a/server/ctdb_tunables.c b/server/ctdb_tunables.c
index e737e20..8722603 100644
--- a/server/ctdb_tunables.c
+++ b/server/ctdb_tunables.c
@@ -38,7 +38,7 @@ static const struct {
 	{ "MonitorInterval",     15,  offsetof(struct ctdb_tunable, monitor_interval) },
 	{ "TickleUpdateInterval",20,  offsetof(struct ctdb_tunable, tickle_update_interval) },
 	{ "EventScriptTimeout",  30,  offsetof(struct ctdb_tunable, script_timeout) },
-	{ "EventScriptBanCount", 10,  offsetof(struct ctdb_tunable, script_ban_count) },
+	{ "EventScriptTimeoutCount", 1,  offsetof(struct ctdb_tunable, script_timeout_count) },
 	{ "RecoveryGracePeriod", 120,  offsetof(struct ctdb_tunable, recovery_grace_period) },
 	{ "RecoveryBanPeriod",  300,  offsetof(struct ctdb_tunable, recovery_ban_period) },
 	{ "DatabaseHashSize", 10000,  offsetof(struct ctdb_tunable, database_hash_size) },


-- 
CTDB repository


More information about the samba-cvs mailing list