X-Git-Url: http://git.samba.org/?a=blobdiff_plain;f=server%2Fctdb_tunables.c;h=4cd1b457206e474d5bc42673a894d3b1d071ebbf;hb=41ff8fd5aabda7d180d6c9458f43eb436ebcf947;hp=cc8e06799e1bac7f41e978de6954d966a9b9e6d9;hpb=aea77353c5996510f09c72cddfb54894ad9048b0;p=sahlberg%2Fctdb.git diff --git a/server/ctdb_tunables.c b/server/ctdb_tunables.c index cc8e0679..4cd1b457 100644 --- a/server/ctdb_tunables.c +++ b/server/ctdb_tunables.c @@ -25,33 +25,47 @@ static const struct { size_t offset; } tunable_map[] = { { "MaxRedirectCount", 3, offsetof(struct ctdb_tunable, max_redirect_count) }, - { "SeqnumFrequency", 1, offsetof(struct ctdb_tunable, seqnum_frequency) }, + { "SeqnumInterval", 1000, offsetof(struct ctdb_tunable, seqnum_interval) }, { "ControlTimeout", 60, offsetof(struct ctdb_tunable, control_timeout) }, { "TraverseTimeout", 20, offsetof(struct ctdb_tunable, traverse_timeout) }, { "KeepaliveInterval", 5, offsetof(struct ctdb_tunable, keepalive_interval) }, { "KeepaliveLimit", 5, offsetof(struct ctdb_tunable, keepalive_limit) }, - { "MaxLACount", 7, offsetof(struct ctdb_tunable, max_lacount) }, - { "RecoverTimeout", 30, offsetof(struct ctdb_tunable, recover_timeout) }, + { "RecoverTimeout", 20, offsetof(struct ctdb_tunable, recover_timeout) }, { "RecoverInterval", 1, offsetof(struct ctdb_tunable, recover_interval) }, { "ElectionTimeout", 3, offsetof(struct ctdb_tunable, election_timeout) }, - { "TakeoverTimeout", 5, offsetof(struct ctdb_tunable, takeover_timeout) }, + { "TakeoverTimeout", 9, offsetof(struct ctdb_tunable, takeover_timeout) }, { "MonitorInterval", 15, offsetof(struct ctdb_tunable, monitor_interval) }, { "TickleUpdateInterval",20, offsetof(struct ctdb_tunable, tickle_update_interval) }, - { "EventScriptTimeout", 20, offsetof(struct ctdb_tunable, script_timeout) }, - { "EventScriptBanCount", 5, offsetof(struct ctdb_tunable, script_ban_count) }, - { "RecoveryGracePeriod", 60, offsetof(struct ctdb_tunable, recovery_grace_period) }, + { "EventScriptTimeout", 30, 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 */ + { "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) }, + { "DatabaseHashSize", 100001, offsetof(struct ctdb_tunable, database_hash_size) }, { "DatabaseMaxDead", 5, offsetof(struct ctdb_tunable, database_max_dead) }, { "RerecoveryTimeout", 10, offsetof(struct ctdb_tunable, rerecovery_timeout) }, { "EnableBans", 1, offsetof(struct ctdb_tunable, enable_bans) }, { "DeterministicIPs", 1, offsetof(struct ctdb_tunable, deterministic_public_ips) }, - { "DisableWhenUnhealthy", 0, offsetof(struct ctdb_tunable, disable_when_unhealthy) }, { "ReclockPingPeriod", 60, offsetof(struct ctdb_tunable, reclock_ping_period) }, { "NoIPFailback", 0, offsetof(struct ctdb_tunable, no_ip_failback) }, + { "DisableIPFailover", 0, offsetof(struct ctdb_tunable, disable_ip_failover) }, { "VerboseMemoryNames", 0, offsetof(struct ctdb_tunable, verbose_memory_names) }, - { "RecdPingTimeout", 20, offsetof(struct ctdb_tunable, recd_ping_timeout) }, - { "RecdFailCount", 3, offsetof(struct ctdb_tunable, recd_ping_failcount) }, + { "RecdPingTimeout", 60, offsetof(struct ctdb_tunable, recd_ping_timeout) }, + { "RecdFailCount", 10, offsetof(struct ctdb_tunable, recd_ping_failcount) }, + { "LogLatencyMs", 0, offsetof(struct ctdb_tunable, log_latency_ms) }, + { "RecLockLatencyMs", 1000, offsetof(struct ctdb_tunable, reclock_latency_ms) }, + { "RecoveryDropAllIPs", 120, offsetof(struct ctdb_tunable, recovery_drop_all_ips) }, + { "VerifyRecoveryLock", 1, offsetof(struct ctdb_tunable, verify_recovery_lock) }, + { "VacuumDefaultInterval", 300, offsetof(struct ctdb_tunable, vacuum_default_interval) }, + { "VacuumMaxRunTime", 30, offsetof(struct ctdb_tunable, vacuum_max_run_time) }, + { "RepackLimit", 10000, offsetof(struct ctdb_tunable, repack_limit) }, + { "VacuumLimit", 5000, offsetof(struct ctdb_tunable, vacuum_limit) }, + { "VacuumMinInterval", 60, offsetof(struct ctdb_tunable, vacuum_min_interval) }, + { "VacuumMaxInterval", 600, offsetof(struct ctdb_tunable, vacuum_max_interval) }, + { "MaxQueueDropMsg", 1000000, offsetof(struct ctdb_tunable, max_queue_depth_drop_msg) }, + { "UseStatusEvents", 0, offsetof(struct ctdb_tunable, use_status_events_for_monitoring) }, + { "AllowUnhealthyDBRead", 0, offsetof(struct ctdb_tunable, allow_unhealthy_db_read) }, + { "StatHistoryInterval", 1, offsetof(struct ctdb_tunable, stat_history_interval) } }; /* @@ -131,12 +145,19 @@ int32_t ctdb_control_set_tunable(struct ctdb_context *ctdb, TDB_DATA indata) if (strcasecmp(name, tunable_map[i].name) == 0) break; } + if (!strcmp(name, "VerifyRecoveryLock") && t->value != 0 + && ctdb->recovery_lock_file == NULL) { + DEBUG(DEBUG_ERR,("Can not activate tunable \"VerifyRecoveryLock\" since there is no recovery lock file set.\n")); + talloc_free(name); + return -1; + } + talloc_free(name); if (i == ARRAY_SIZE(tunable_map)) { return -1; } - + *(uint32_t *)(tunable_map[i].offset + (uint8_t*)&ctdb->tunable) = t->value; return 0;