Bug 210155 - openldap init script does not respect multiple database replications
openldap init script does not respect multiple database replications
Product: Fedora
Classification: Fedora
Component: openldap (Show other bugs)
All Linux
medium Severity medium
: ---
: ---
Assigned To: Jan Safranek
Depends On:
  Show dependency treegraph
Reported: 2006-10-10 10:35 EDT by Sascha Rommelfangen
Modified: 2007-11-30 17:11 EST (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2007-06-08 07:55:16 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Sascha Rommelfangen 2006-10-10 10:35:01 EDT
Description of problem:
If unsing multiple databases (trees) within openldap and multiple replication,
only one slurpd is started not taking care of multiple configured replogfiles.

Version-Release number of selected component (if applicable):
FC3 init script (the problem should be the same for more recent versions like FC5)

How reproducible:

Steps to Reproduce:
1. Create two databases in /etc/openldap/slapd.conf
2. Create for each a replication entry with its own replogfile 
3. restart /etc/init.d/ldap
4. modify both databases (ldapadd, ...)
Actual results:
The second database of slapd.conf never gets successfully replicated as there is
only one slurpd running

Expected results:
As many slurpds should be started as databases are to be replicated

Additional info:

This patch takes care if there is more than one replog entry and counts and
starts an appropriate slurpd

<                 daemon ${slurpd} $OPTIONS $SLURPD_OPTIONS
>               i=1;
>               for replogfile in `grep  "^replogfile" /etc/openldap/slapd.conf`
>               do
>                 if  "$replogfile" != "replogfile" 
>                 then
>                   daemon ${slurpd} -r $replogfile -n $i
>                   i=$[i+1]
>                 fi
>               done
Comment 1 Christian Iseli 2007-01-22 06:41:24 EST
This report targets the FC3 or FC4 products, which have now been EOL'd.

Could you please check that it still applies to a current Fedora release, and
either update the target product or close it ?

Comment 2 Sascha Rommelfangen 2007-01-22 07:32:56 EST
Checked FC5: for the reported part the init script is still the same and only
respecting the first occurence of 'replogfile':
        if [ $RETVAL -eq 0 ]; then
            if grep -q "^replogfile" /etc/openldap/slapd.conf; then
                prog=`basename ${slurpd}`
                echo -n $"Starting $prog: "
                daemon ${slurpd} $OPTIONS $SLURPD_OPTIONS

Comment 3 Sascha Rommelfangen 2007-02-06 07:25:12 EST
Also still the same startup for FC6
Comment 4 Alexandre Dulaunoy 2007-02-06 07:56:44 EST
We had the same issue with all the Fedora Core and we used a similar update in
the ldap init script (as described by the ticket submitter). Could you update
the init script to add the automatic start of the required slurp based on the
replogfile entries ? That would save us to patch the file on a bunch of
production LDAP servers. 
Comment 5 Jan Safranek 2007-06-08 07:55:16 EDT
Fixed in openldap-2.3.34-3.fc8

Note You need to log in before you can comment on or make changes to this bug.