diff options
author | Ronnie Sahlberg <ronniesahlberg@gmail.com> | 2009-04-24 18:23:48 +1000 |
---|---|---|
committer | Ronnie Sahlberg <ronniesahlberg@gmail.com> | 2009-04-24 18:28:08 +1000 |
commit | 38ea6708dd16f88966ae5157fe523f4758317186 (patch) | |
tree | e8e78c345ebc79bf8e9d691e8734272cdf17dfc2 | |
parent | ce3283f7cbecb33e644a9fb273ede0067857bc85 (diff) | |
download | samba-38ea6708dd16f88966ae5157fe523f4758317186.tar.gz samba-38ea6708dd16f88966ae5157fe523f4758317186.tar.xz samba-38ea6708dd16f88966ae5157fe523f4758317186.zip |
add a tuneable RecoveryDropAllIPs so it is possible to control after how long a node that has been stuck in recovery will wait until it will yield all public addresses.
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
(This used to be ctdb commit 70f21428c9eec96bcc787be191e7478ad68956dc)
-rw-r--r-- | ctdb/include/ctdb_private.h | 1 | ||||
-rw-r--r-- | ctdb/server/ctdb_recover.c | 2 | ||||
-rw-r--r-- | ctdb/server/ctdb_tunables.c | 1 |
3 files changed, 3 insertions, 1 deletions
diff --git a/ctdb/include/ctdb_private.h b/ctdb/include/ctdb_private.h index 88e686bc9b..2231d33987 100644 --- a/ctdb/include/ctdb_private.h +++ b/ctdb/include/ctdb_private.h @@ -105,6 +105,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; }; /* diff --git a/ctdb/server/ctdb_recover.c b/ctdb/server/ctdb_recover.c index fd35dce266..f9112a3ff4 100644 --- a/ctdb/server/ctdb_recover.c +++ b/ctdb/server/ctdb_recover.c @@ -600,7 +600,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); } diff --git a/ctdb/server/ctdb_tunables.c b/ctdb/server/ctdb_tunables.c index 330ab1999c..7fa5e808c5 100644 --- a/ctdb/server/ctdb_tunables.c +++ b/ctdb/server/ctdb_tunables.c @@ -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) }, }; /* |