summaryrefslogtreecommitdiff
path: root/source3/param
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2008-08-20 16:24:22 -0700
committerJeremy Allison <jra@samba.org>2008-08-20 16:24:22 -0700
commit79150da70bbfddea3dc4013212fc7314b1004534 (patch)
tree2d815dd132fc52648a1075fd30b245bccfc727aa /source3/param
parent2fdcaab8c49259427df8ea00e47583772ea06602 (diff)
downloadsamba-79150da70bbfddea3dc4013212fc7314b1004534.tar.gz
samba-79150da70bbfddea3dc4013212fc7314b1004534.tar.bz2
samba-79150da70bbfddea3dc4013212fc7314b1004534.zip
Here is a re-working of the winbindd
reconnect code to cope with rebooting a DC. This replaces the code I asked Volker to revert. The logic is pretty simple. It adds a new parameter, "winbind reconnect delay", set to 30 seconds by default, which determines how long to wait between connection attempts. To avoid overwhelming the box with DC-probe forked children, the code now keeps track of the DC probe child per winbindd_domain struct and only starts a new one if the existing one has died. I also added a little logic to make sure the dc probe child always sends a message whatever the reason for exit so we will always reschedule another connect attempt. Also added documentation. Jeremy. (This used to be commit 8027197635b988b3dcf9d3d00126a024e768fa62)
Diffstat (limited to 'source3/param')
-rw-r--r--source3/param/loadparm.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/source3/param/loadparm.c b/source3/param/loadparm.c
index bc111df4e1..6817eca1d1 100644
--- a/source3/param/loadparm.c
+++ b/source3/param/loadparm.c
@@ -240,6 +240,7 @@ struct global {
int map_to_guest;
int oplock_break_wait_time;
int winbind_cache_time;
+ int winbind_reconnect_delay;
int winbind_max_idle_children;
char **szWinbindNssInfo;
int iLockSpinTime;
@@ -4363,6 +4364,15 @@ static struct parm_struct parm_table[] = {
.flags = FLAG_ADVANCED,
},
{
+ .label = "winbind reconnect delay",
+ .type = P_INTEGER,
+ .p_class = P_GLOBAL,
+ .ptr = &Globals.winbind_reconnect_delay,
+ .special = NULL,
+ .enum_list = NULL,
+ .flags = FLAG_ADVANCED,
+ },
+ {
.label = "winbind enum users",
.type = P_BOOL,
.p_class = P_GLOBAL,
@@ -4829,6 +4839,7 @@ static void init_globals(bool first_time_only)
Globals.clustering = False;
Globals.winbind_cache_time = 300; /* 5 minutes */
+ Globals.winbind_reconnect_delay = 30; /* 30 seconds */
Globals.bWinbindEnumUsers = False;
Globals.bWinbindEnumGroups = False;
Globals.bWinbindUseDefaultDomain = False;
@@ -5341,6 +5352,7 @@ FN_LOCAL_INTEGER(lp_directory_name_cache_size, iDirectoryNameCacheSize)
FN_LOCAL_INTEGER(lp_smb_encrypt, ismb_encrypt)
FN_LOCAL_CHAR(lp_magicchar, magic_char)
FN_GLOBAL_INTEGER(lp_winbind_cache_time, &Globals.winbind_cache_time)
+FN_GLOBAL_INTEGER(lp_winbind_reconnect_delay, &Globals.winbind_reconnect_delay)
FN_GLOBAL_LIST(lp_winbind_nss_info, &Globals.szWinbindNssInfo)
FN_GLOBAL_INTEGER(lp_algorithmic_rid_base, &Globals.AlgorithmicRidBase)
FN_GLOBAL_INTEGER(lp_name_cache_timeout, &Globals.name_cache_timeout)