Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
For bugs related to Red Hat Enterprise Linux 5 product line. The current stable release is 5.10. For Red Hat Enterprise Linux 6 and above, please visit Red Hat JIRA https://issues.redhat.com/secure/CreateIssue!default.jspa?pid=12332745 to report new issues.

Bug 440693

Summary: slapd when running as a syncrepl consumer uses the search timout from ldap.conf over the one from the syncrepl statement in slapd.conf
Product: Red Hat Enterprise Linux 5 Reporter: Linus van Geuns <vangeuns>
Component: openldapAssignee: Jan Safranek <jsafrane>
Status: CLOSED ERRATA QA Contact:
Severity: medium Docs Contact:
Priority: low    
Version: 5.3CC: jplans, omoris, psklenar
Target Milestone: rc   
Target Release: ---   
Hardware: i686   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2009-01-20 20:53:43 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
patch for openldap 2.3.27 none

Description Linus van Geuns 2008-04-04 14:45:12 UTC
Description of problem:
When slapd is configured to be a syncrepl consumer and the 'timelimit' ist
explicitly set to '=unlimited' in the syncrepl statement in addition to a
different timelimit statement in the ldap.conf, slapd uses the timeout from
ldap.conf.

This is a bug, because the timelimit setting in the syncrepl statement should
overwrite any 'client default setting' in ldap.conf. And it's very hard to
debug, too.. ;-)

Version-Release number of selected component (if applicable):
openldap-2.3.27-8.el5_1.3
openldap-servers-2.3.27-8.el5_1.3

How reproducible:
Always

Steps to Reproduce:
1. configure a syncrepl provider with a huge amount of eentries (at least 1000)
and 'loglevel sync stats'
2. configure a syncrepl consumer for the provider with an empty database
3. set 'timelimit=unlimited' in the syncrepl statement of your consumer
4. set a very low timelimit in your ldap.conf on the consumer host - for example
'timelimit 2' (2 seconds) - so it will be exceeded by the consumers search operation
5. start a tail -f on the provider slapds log file
6. you will see that the search operation of the consumer will be stoped
prematurely with 'err=3' (timelimit exceeded).
  
Actual results:
syncrepl consumer replicates only some of the providers entries

Expected results:
a complete replication of the providers entries to the consumer

Additional info:
http://www.openldap.org/its/index.cgi/Development?id=4933;expression=syncrepl%20timelimit;statetype=-1
http://www.openldap.org/devel/cvsweb.cgi/servers/slapd/syncrepl.c.diff?r1=1.328&r2=1.329&hideattic=1&sortbydate=0&f=h

Comment 1 Jan Safranek 2008-04-09 13:43:16 UTC
Created attachment 301804 [details]
patch for openldap 2.3.27

The upstream one does not apply clearly, I'm attaching patch for
openldap-2.3.27 to have it when the time comes.

Comment 2 RHEL Program Management 2008-06-02 20:10:06 UTC
This request was evaluated by Red Hat Product Management for inclusion in a Red
Hat Enterprise Linux maintenance release.  Product Management has requested
further review of this request by Red Hat Engineering, for potential
inclusion in a Red Hat Enterprise Linux Update release for currently deployed
products.  This request is not yet committed for inclusion in an Update
release.

Comment 7 errata-xmlrpc 2009-01-20 20:53:43 UTC
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on therefore solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.

http://rhn.redhat.com/errata/RHBA-2009-0090.html