add a tuneable RecoveryDropAllIPs so it is possible to control after how long a...
authorRonnie Sahlberg <ronniesahlberg@gmail.com>
Fri, 24 Apr 2009 08:23:48 +0000 (18:23 +1000)
committerRonnie Sahlberg <ronniesahlberg@gmail.com>
Fri, 24 Apr 2009 08:23:48 +0000 (18:23 +1000)
this now defaults to 60 seconds

This is useful if a split brain occurs due to network partitioning since it will make sure that the "other half" of the cluster that does not contain the recovery master will eventually release all ips and thus avoiding a duplicate ip situation for the public addresses

include/ctdb_private.h
server/ctdb_recover.c
server/ctdb_tunables.c

index c40ffbdaf93badaa3c59ecc99f589aedab9fe5ef..df194bcb7eb052e08b7037a89893ee1e1d106b15 100644 (file)
@@ -117,6 +117,7 @@ struct ctdb_tunable {
        uint32_t recd_ping_timeout;
        uint32_t recd_ping_failcount;
        uint32_t log_latency_ms;
+       uint32_t recovery_drop_all_ips;
 };
 
 /*
index f7641c3572b43fd3baa8145486b15bc653d7f31d..153f698c7c5e5a385c752943c2c62e9bbd69244e 100644 (file)
@@ -596,7 +596,7 @@ int32_t ctdb_control_set_recmode(struct ctdb_context *ctdb,
                ctdb->release_ips_ctx = talloc_new(ctdb);
                CTDB_NO_MEMORY(ctdb, ctdb->release_ips_ctx);
 
-               event_add_timed(ctdb->ev, ctdb->release_ips_ctx, timeval_current_ofs(35,0), ctdb_drop_all_ips_event, ctdb);
+               event_add_timed(ctdb->ev, ctdb->release_ips_ctx, timeval_current_ofs(ctdb->tunable.recovery_drop_all_ips, 0), ctdb_drop_all_ips_event, ctdb);
        }
 
 
index 365865e860db5c61d7d8c36c0b251fb7fc8bac86..fe6a4b412d4ee97459f4048ff35b44758756bf0d 100644 (file)
@@ -53,6 +53,7 @@ static const struct {
        { "RecdPingTimeout",     20,  offsetof(struct ctdb_tunable, recd_ping_timeout) },
        { "RecdFailCount",        3,  offsetof(struct ctdb_tunable, recd_ping_failcount) },
        { "LogLatencyMs",         0,  offsetof(struct ctdb_tunable, log_latency_ms) },
+       { "RecoveryDropAllIPs",  60,  offsetof(struct ctdb_tunable, recovery_drop_all_ips) },
 };
 
 /*