diff options
author | Volker Lendecke <vl@samba.org> | 2009-11-03 05:41:02 +0100 |
---|---|---|
committer | Volker Lendecke <vl@samba.org> | 2009-11-05 12:05:36 +0100 |
commit | d415d4d32f2e8e61de21abfdfce02e1b1ea1e1d3 (patch) | |
tree | 03469f109c8e19e15318e5fa4da6d7526b6a575f /source3/param | |
parent | 49397a8b3e30b23a4723125986f306fff502a144 (diff) | |
download | samba-d415d4d32f2e8e61de21abfdfce02e1b1ea1e1d3.tar.gz samba-d415d4d32f2e8e61de21abfdfce02e1b1ea1e1d3.tar.bz2 samba-d415d4d32f2e8e61de21abfdfce02e1b1ea1e1d3.zip |
s3: Add parameter "ctdb timeout"
When something in the cluster blocks, it can happen that we wait indefinitely
long for ctdb, just adding to the blocking condition. In theory, nothing should
block, but as someone said "In practice the difference between theory and
practice is larger than in theory". This adds a timeout parameter in seconds,
after which we stop waiting for ctdb and panic.
Diffstat (limited to 'source3/param')
-rw-r--r-- | source3/param/loadparm.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/source3/param/loadparm.c b/source3/param/loadparm.c index 06fb962576..c62deb5eda 100644 --- a/source3/param/loadparm.c +++ b/source3/param/loadparm.c @@ -271,6 +271,7 @@ struct global { char *ctdbdSocket; char **szClusterAddresses; bool clustering; + int ctdb_timeout; int ldap_passwd_sync; int ldap_replication_sleep; int ldap_timeout; /* This is initialised in init_globals */ @@ -2541,6 +2542,15 @@ static struct parm_struct parm_table[] = { .enum_list = NULL, .flags = FLAG_ADVANCED | FLAG_GLOBAL, }, + { + .label = "ctdb timeout", + .type = P_INTEGER, + .p_class = P_GLOBAL, + .ptr = &Globals.ctdb_timeout, + .special = NULL, + .enum_list = NULL, + .flags = FLAG_ADVANCED | FLAG_GLOBAL, + }, {N_("Printing Options"), P_SEP, P_SEPARATOR}, @@ -5107,6 +5117,7 @@ static void init_globals(bool first_time_only) string_set(&Globals.ctdbdSocket, ""); Globals.szClusterAddresses = NULL; Globals.clustering = False; + Globals.ctdb_timeout = 0; Globals.winbind_cache_time = 300; /* 5 minutes */ Globals.winbind_reconnect_delay = 30; /* 30 seconds */ @@ -5557,6 +5568,7 @@ FN_GLOBAL_INTEGER(lp_cups_connection_timeout, &Globals.cups_connection_timeout) FN_GLOBAL_CONST_STRING(lp_ctdbd_socket, &Globals.ctdbdSocket) FN_GLOBAL_LIST(lp_cluster_addresses, &Globals.szClusterAddresses) FN_GLOBAL_BOOL(lp_clustering, &Globals.clustering) +FN_GLOBAL_INTEGER(lp_ctdb_timeout, &Globals.ctdb_timeout) FN_LOCAL_STRING(lp_printcommand, szPrintcommand) FN_LOCAL_STRING(lp_lpqcommand, szLpqcommand) FN_LOCAL_STRING(lp_lprmcommand, szLprmcommand) |