[SCM] CTDB repository - branch 1.0.112 updated - ctdb-1.0.111-47-g392f243
Ronnie Sahlberg
sahlberg at samba.org
Wed Feb 24 18:36:02 MST 2010
The branch, 1.0.112 has been updated
via 392f243fdbd5085da5c3c57fde044df3dfe79d03 (commit)
via ebd4c3eac5b536f7a32b3be3f7a6fa699b7b4b7f (commit)
via 0432b1cdd7d3792f3a00ff539651381efe7f4935 (commit)
from f8b32385257c9526999a229e84020677deb79eaf (commit)
http://gitweb.samba.org/?p=sahlberg/ctdb.git;a=shortlog;h=1.0.112
- Log -----------------------------------------------------------------
commit 392f243fdbd5085da5c3c57fde044df3dfe79d03
Author: Ronnie Sahlberg <ronniesahlberg at gmail.com>
Date: Thu Feb 25 12:34:27 2010 +1100
New version 1.0.112-11
* Thu Feb 25 2010 : Version 1.0.112-11
- Increase default script timeout to 90 seconds.
BZ 61113
- Add a new tunable EventScriptLogTimeout which will log a message everytime
a monitor script takes longer than this to finish.
BZ 61118
commit ebd4c3eac5b536f7a32b3be3f7a6fa699b7b4b7f
Author: Ronnie Sahlberg <ronniesahlberg at gmail.com>
Date: Thu Feb 25 12:22:32 2010 +1100
Add a tunable EventScriptLogTimeout that will log an error everytime a
monitoring script took longer than this.
BZ 61118
commit 0432b1cdd7d3792f3a00ff539651381efe7f4935
Author: Ronnie Sahlberg <ronniesahlberg at gmail.com>
Date: Thu Feb 25 11:58:07 2010 +1100
Increase the default script timeout to 90 seconds.
BZ 61113
-----------------------------------------------------------------------
Summary of changes:
include/ctdb_private.h | 1 +
packaging/RPM/ctdb.spec.in | 8 +++++++-
server/ctdb_tunables.c | 3 ++-
server/eventscript.c | 8 ++++++++
4 files changed, 18 insertions(+), 2 deletions(-)
Changeset truncated at 500 lines:
diff --git a/include/ctdb_private.h b/include/ctdb_private.h
index 6107bdf..f5e6de8 100644
--- a/include/ctdb_private.h
+++ b/include/ctdb_private.h
@@ -105,6 +105,7 @@ struct ctdb_tunable {
uint32_t script_timeout;
uint32_t script_timeout_count; /* allow dodgy scripts to hang this many times in a row before we mark the node unhealthy */
uint32_t script_unhealthy_on_timeout; /* obsolete */
+ uint32_t script_log_timeout; /* Log an ERROR when a script took longer than this */
uint32_t recovery_grace_period;
uint32_t recovery_ban_period;
uint32_t database_hash_size;
diff --git a/packaging/RPM/ctdb.spec.in b/packaging/RPM/ctdb.spec.in
index 9a2f10b..658c522 100644
--- a/packaging/RPM/ctdb.spec.in
+++ b/packaging/RPM/ctdb.spec.in
@@ -5,7 +5,7 @@ Vendor: Samba Team
Packager: Samba Team <samba at samba.org>
Name: ctdb
Version: 1.0.112
-Release: 10
+Release: 11
Epoch: 0
License: GNU GPL version 3
Group: System Environment/Daemons
@@ -123,6 +123,12 @@ rm -rf $RPM_BUILD_ROOT
%{_docdir}/ctdb/tests/bin/ctdb_transaction
%changelog
+* Thu Feb 25 2010 : Version 1.0.112-11
+ - Increase default script timeout to 90 seconds.
+ BZ 61113
+ - Add a new tunable EventScriptLogTimeout which will log a message everytime
+ a monitor script takes longer than this to finish.
+ BZ 61118
* Tue Feb 23 2010 : Version 1.0.112-10
- revert the change in 10.0.0.112-9 and make a new attempt to make the scripts behave.
- make writing the ticklelist in 61.nfstickle a background task to avoid
diff --git a/server/ctdb_tunables.c b/server/ctdb_tunables.c
index cca270b..d1c7212 100644
--- a/server/ctdb_tunables.c
+++ b/server/ctdb_tunables.c
@@ -37,9 +37,10 @@ static const struct {
{ "TakeoverTimeout", 5, offsetof(struct ctdb_tunable, takeover_timeout) },
{ "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) },
+ { "EventScriptTimeout", 90, offsetof(struct ctdb_tunable, script_timeout) },
{ "EventScriptTimeoutCount", 1, offsetof(struct ctdb_tunable, script_timeout_count) },
{ "EventScriptUnhealthyOnTimeout", 0, offsetof(struct ctdb_tunable, script_unhealthy_on_timeout) },/* OBSOLETE */
+ { "EventScriptLogTimeout", 3, offsetof(struct ctdb_tunable, script_log_timeout) },
{ "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) },
diff --git a/server/eventscript.c b/server/eventscript.c
index e0908e1..8a6d779 100644
--- a/server/eventscript.c
+++ b/server/eventscript.c
@@ -472,6 +472,14 @@ static void ctdb_event_script_handler(struct event_context *ev, struct fd_event
}
current->finished = timeval_current();
+
+ /* log something if it took too long */
+ if (ctdb->tunable.script_log_timeout > 0) {
+ if ((state->call == CTDB_EVENT_MONITOR) && (timeval_delta(¤t->finished, ¤t->start) > ctdb->tunable.script_log_timeout)) {
+ DEBUG(DEBUG_ERR,("Monitor script %s took %.3lfs to complete\n", current->name, timeval_delta(¤t->finished, ¤t->start)));
+ }
+ }
+
/* valgrind gets overloaded if we run next script as it's still doing
* post-execution analysis, so kill finished child here. */
if (ctdb->valgrinding) {
--
CTDB repository
More information about the samba-cvs
mailing list