summaryrefslogtreecommitdiffstats
path: root/server
diff options
context:
space:
mode:
authorStephen Gallagher <sgallagh@redhat.com>2009-12-15 14:18:06 -0500
committerStephen Gallagher <sgallagh@redhat.com>2009-12-15 15:38:41 -0500
commitba4cc5eec121c5016af0f54907c8fa9585384256 (patch)
tree7ad94dd92d10e5a80517c797b97e08fbf2ef2602 /server
parent7f8432c08376037e2beb60b398dac08b24dea92b (diff)
downloadsssd-ba4cc5eec121c5016af0f54907c8fa9585384256.tar.gz
sssd-ba4cc5eec121c5016af0f54907c8fa9585384256.tar.xz
sssd-ba4cc5eec121c5016af0f54907c8fa9585384256.zip
Fix tight loop in monitor
If the domain heartbeat time was explicitly set in the configuration to 0, we would enter a tight loop in the heartbeat check and never answer requests from the child processes.
Diffstat (limited to 'server')
-rw-r--r--server/man/sssd.conf.5.xml8
-rw-r--r--server/monitor/monitor.c5
2 files changed, 9 insertions, 4 deletions
diff --git a/server/man/sssd.conf.5.xml b/server/man/sssd.conf.5.xml
index 95fd606e7..cb378c845 100644
--- a/server/man/sssd.conf.5.xml
+++ b/server/man/sssd.conf.5.xml
@@ -362,12 +362,12 @@
<term>timeout (integer)</term>
<listitem>
<para>
- Timeout in seconds for this particular domain.
- Raising this timeout might prove useful for slower
- backends like distant LDAP servers.
+ Timeout in seconds between heartbeats for this domain.
+ This is used to ensure that the backend process is
+ alive and capable of answering requests.
</para>
<para>
- Default: 0 (no timeout)
+ Default: 10
</para>
</listitem>
</varlistentry>
diff --git a/server/monitor/monitor.c b/server/monitor/monitor.c
index d47b3a80a..30df2cb9c 100644
--- a/server/monitor/monitor.c
+++ b/server/monitor/monitor.c
@@ -1060,6 +1060,11 @@ static int get_service_config(struct mt_ctx *ctx, const char *name,
return ret;
}
+ /* 'timeout = 0' should be translated to the default */
+ if (svc->ping_time == 0) {
+ svc->ping_time = MONITOR_DEF_PING_TIME;
+ }
+
*svc_cfg = svc;
talloc_free(path);