ctdb-daemon: Rename EventScriptTimeoutCount to MonitorTimeoutCount
authorMartin Schwenke <martin@meltin.net>
Wed, 28 Oct 2015 06:03:01 +0000 (17:03 +1100)
committerAmitay Isaacs <amitay@samba.org>
Mon, 16 Nov 2015 07:42:11 +0000 (08:42 +0100)
This only applies to monitor events so renaming clarifies this.

Note that this change is not backward compatible.  Users with

  CTDB_SET_EventScriptTimeoutCount=<n>

in their configuration will get failures when starting CTDB but the
cause will be clearly logged.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
ctdb/doc/ctdb-tunables.7.xml
ctdb/doc/ctdb.1.xml
ctdb/protocol/protocol.h
ctdb/server/ctdb_monitor.c
ctdb/server/ctdb_tunables.c

index 329cff2240efc53584b884d68db86d90a15dce00..6c164f3161f80c6697a4f0e4d6f41383df73036f 100644 (file)
     </refsect2>
 
     <refsect2>
-      <title>EventScriptTimeoutCount</title>
+      <title>MonitorTimeoutCount</title>
       <para>Default: 20</para>
       <para>
        How many monitor events in a row need to timeout before a node
-       is flagged as UNHEALTHY.  This only applies to monitor events.
-       This setting is useful if scripts can not be written so that
-       they do not hang for benign reasons.
+       is flagged as UNHEALTHY.  This setting is useful if scripts
+       can not be written so that they do not hang for benign
+       reasons.
       </para>
     </refsect2>
 
index 0ff848cf739befb6ad3723c7e9de52cdd456ca0c..3658c89d54b7d4559d2c8856cd354fe1b38f8740 100644 (file)
@@ -650,7 +650,7 @@ TakeoverTimeout         = 9
 MonitorInterval         = 15
 TickleUpdateInterval    = 20
 EventScriptTimeout      = 30
-EventScriptTimeoutCount = 1
+MonitorTimeoutCount     = 1
 RecoveryGracePeriod     = 120
 RecoveryBanPeriod       = 300
 DatabaseHashSize        = 100001
index 27bc8281eee2a94295d880284c54bef8d8875b66..672b5edf3dee4ce29bcfb6e6899404d478461642 100644 (file)
@@ -572,7 +572,7 @@ struct ctdb_tunable_list {
        uint32_t monitor_interval;
        uint32_t tickle_update_interval;
        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 monitor_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 recovery_grace_period;
        uint32_t recovery_ban_period;
index 17291463e90a82ffb97b1e09787cfb43058f550d..4f998d3d1f569f2009a1670770f7da604fd90872 100644 (file)
@@ -148,11 +148,11 @@ static void ctdb_health_callback(struct ctdb_context *ctdb, int status, void *p)
                ctdb->monitor->event_script_timeouts++;
 
                if (ctdb->monitor->event_script_timeouts >=
-                   ctdb->tunable.script_timeout_count) {
+                   ctdb->tunable.monitor_timeout_count) {
                        DEBUG(DEBUG_ERR,
                              ("Maximum monitor timeout count %u reached."
                               " Making node unhealthy\n",
-                              ctdb->tunable.script_timeout_count));
+                              ctdb->tunable.monitor_timeout_count));
                } else {
                        /* We pretend this is OK. */
                        goto after_change_status;
index 8622b33b2b8759624a3251585a903eadccb9b0c9..ba184e71b57d2fe5fff122febfb28d697d1910a0 100644 (file)
@@ -48,7 +48,7 @@ static const struct {
        { "MonitorInterval",     15,  offsetof(struct ctdb_tunable_list, monitor_interval), false },
        { "TickleUpdateInterval",20,  offsetof(struct ctdb_tunable_list, tickle_update_interval), false },
        { "EventScriptTimeout",  30,  offsetof(struct ctdb_tunable_list, script_timeout), false },
-       { "EventScriptTimeoutCount", 20,  offsetof(struct ctdb_tunable_list, script_timeout_count), false },
+       { "MonitorTimeoutCount", 20,  offsetof(struct ctdb_tunable_list, monitor_timeout_count), false },
        { "EventScriptUnhealthyOnTimeout", 0, offsetof(struct ctdb_tunable_list, script_unhealthy_on_timeout), true },
        { "RecoveryGracePeriod", 120,  offsetof(struct ctdb_tunable_list, recovery_grace_period), false },
        { "RecoveryBanPeriod",  300,  offsetof(struct ctdb_tunable_list, recovery_ban_period), false },