Issue #643 has been updated by David Coutadeur.

It seems natural to start slapd when at the end of postinst.

Cf debian manual:

@
postinst

    This script typically completes any required configuration of the package 
foo once foo has been unpacked from its Debian archive (".deb") file. Often, 
'postinst' scripts ask the user for input, and/or warn the user that if he 
accepts default values, he should remember to go back and re-configure that 
package as the situation warrants. Many 'postinst' scripts then execute any 
commands necessary to start or restart a service once a new package has been 
installed or upgraded.@

----------------------------------------
Bug #643: Bad installation of OpenLDAP DEB packages
http://tools.lsc-project.org/issues/643

Author: Clément OUDOT
Status: Assigned
Priority: Normal
Assigned to: David Coutadeur
Category: OpenLDAP DEB
Target version: openldap-deb-2.4.39


When installing DEB packages on a fresh new system, I get this error:
<pre>
Setting up openldap-ltb (2.4.38-1) ...
slapd: [INFO] Using /etc/default/slapd for configuration
slapd: [INFO] Launching OpenLDAP configuration test...
No directory, logging in with HOME=/
slapd: [ALERT] OpenLDAP configuration test failed
invoke-rc.d: initscript slapd, action "start" failed.
dpkg: error processing openldap-ltb (--configure):
 subprocess installed post-installation script returned error exit status 1
dpkg: dependency problems prevent configuration of openldap-ltb-check-password:
 openldap-ltb-check-password depends on openldap-ltb; however:
  Package openldap-ltb is not configured yet.
dpkg: error processing openldap-ltb-check-password (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of 
openldap-ltb-contrib-overlays:
 openldap-ltb-contrib-overlays depends on openldap-ltb; however:
  Package openldap-ltb is not configured yet.
dpkg: error processing openldap-ltb-contrib-overlays (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of openldap-ltb-dbg:
 openldap-ltb-dbg depends on openldap-ltb (= 2.4.38-1); however:
  Package openldap-ltb is not configured yet.
dpkg: error processing openldap-ltb-dbg (--configure):
 dependency problems - leaving unconfigured
Processing triggers for libc-bin ...
ldconfig deferred processing now taking place
No apport report written because the error message indicates its a followup 
error from a previous failure.
                                                                                
                          No apport report written because the error message 
indicates its a followup error from a previous failure.
                                          No apport report written because 
MaxReports is reached already
                                                                                
                        Errors were encountered while processing:
 openldap-ltb
 openldap-ltb-check-password
 openldap-ltb-contrib-overlays
 openldap-ltb-dbg
E: Sub-process /usr/bin/dpkg returned an error code (1)
</pre>

But the second time it works well:

<pre>
root@ader-xps:~# service slapd configtest
slapd: [INFO] Using /etc/default/slapd for configuration
slapd: [INFO] Launching OpenLDAP configuration test...
No directory, logging in with HOME=/
slapd: [OK] OpenLDAP configuration test successful
root@ader-xps:~# apt-get install openldap-ltb*
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Note, selecting 'openldap-ltb-check-password' for regex 'openldap-ltb*'
Note, selecting 'openldap-ltb-contrib-overlays' for regex 'openldap-ltb*'
Note, selecting 'openldap-ltb-dbg' for regex 'openldap-ltb*'
Note, selecting 'openldap-ltb' for regex 'openldap-ltb*'
openldap-ltb is already the newest version.
openldap-ltb-check-password is already the newest version.
openldap-ltb-contrib-overlays is already the newest version.
openldap-ltb-dbg is already the newest version.
The following package was automatically installed and is no longer required:
  libkms1
Use 'apt-get autoremove' to remove them.
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
4 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Do you want to continue [Y/n]? 
Setting up openldap-ltb (2.4.38-1) ...
slapd: [INFO] Using /etc/default/slapd for configuration
slapd: [INFO] Launching OpenLDAP configuration test...
No directory, logging in with HOME=/
slapd: [OK] OpenLDAP configuration test successful
slapd: [INFO] No db_recover done
slapd: [INFO] Launching OpenLDAP...
slapd: [OK] File descriptor limit set to 1024
slapd: [OK] OpenLDAP started
Setting up openldap-ltb-check-password (2.4.38-1) ...
Setting up openldap-ltb-contrib-overlays (2.4.38-1) ...
Setting up openldap-ltb-dbg (2.4.38-1) ...
Processing triggers for libc-bin ...
ldconfig deferred processing now taking place
</pre>

Seems something is not ready when OpenLDAP start the first time. We should 
maybe not start OpenLDAP in the installation process.


-- 
You have received this notification because you have either subscribed to it, 
or are involved in it.
To change your notification preferences, please click here: 
http://tools.lsc-project.org/my/account
_______________________________________________
ltb-dev mailing list
[email protected]
http://lists.ltb-project.org/listinfo/ltb-dev

Reply via email to