slapd install fails when requesting to 'Omit OpenLDAP server configuration"

Bug #1040177 reported by Paul Boven on 2012-08-22
36
This bug affects 8 people
Affects Status Importance Assigned to Milestone
openldap (Debian)
New
Unknown
openldap (Ubuntu)
Low
Unassigned

Bug Description

Ubuntu slapd package now installs a default DIT. If one doesn't need this DIT, debconf question "Omit OpenLDAP server configuration?" (at prio low) gives the option to not install that, but then the package installation doesn't complete:

Setting up slapd (2.4.28-1.1ubuntu4.1) ...
  Omitting slapd configuration as requested.
 * No configuration file was found for slapd at /etc/ldap/slapd.conf.
invoke-rc.d: initscript slapd, action "start" failed.
dpkg: error processing slapd (--configure):
 subprocess installed post-installation script returned error exit status 1
Errors were encountered while processing:
 slapd
E: Sub-process /usr/bin/dpkg returned an error code (1)

Expected: apt-get install to not give an error when requesting "Omit OpenLDAP server configuration", and a 'clean' slapd with only the minimal required cn=config loaded so that it can then be configured as needed.

# lsb_release -rd
Description: Ubuntu 12.04.1 LTS
Release: 12.04

# apt-cache policy slapd
Installed: 2.4.28-1.1ubuntu4.1
Candidate: 2.4.28-1.1ubuntu4.1

James Page (james-page) wrote :

ubuntu@server-15281:~$ echo debconf slapd/no_configuration string true | sudo /usr/bin/debconf-set-selections
ubuntu@server-15281:~$ sudo apt-get install slapd
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following extra packages will be installed:
  libltdl7 libodbc1 libperl5.14 libslp1
Suggested packages:
  libmyodbc odbc-postgresql tdsodbc unixodbc-bin slpd openslp-doc ldap-utils
The following NEW packages will be installed:
  libltdl7 libodbc1 libperl5.14 libslp1 slapd
0 upgraded, 5 newly installed, 0 to remove and 0 not upgraded.
Need to get 2,044 kB of archives.
After this operation, 5,423 kB of additional disk space will be used.
Do you want to continue [Y/n]? y
Get:1 http://nov.ec2.archive.ubuntu.com/ubuntu/ precise/main libltdl7 amd64 2.4.2-1ubuntu1 [37.6 kB]
Get:2 http://nov.ec2.archive.ubuntu.com/ubuntu/ precise/main libodbc1 amd64 2.2.14p2-5ubuntu3 [225 kB]
Get:3 http://nov.ec2.archive.ubuntu.com/ubuntu/ precise-updates/main libperl5.14 amd64 5.14.2-6ubuntu2.1 [1,252 B]
Get:4 http://nov.ec2.archive.ubuntu.com/ubuntu/ precise/main libslp1 amd64 1.2.1-7.8ubuntu1 [50.4 kB]
Get:5 http://nov.ec2.archive.ubuntu.com/ubuntu/ precise-updates/main slapd amd64 2.4.28-1.1ubuntu4.1 [1,730 kB]
Fetched 2,044 kB in 0s (9,971 kB/s)
Preconfiguring packages ...
Selecting previously unselected package libltdl7.
(Reading database ... 26060 files and directories currently installed.)
Unpacking libltdl7 (from .../libltdl7_2.4.2-1ubuntu1_amd64.deb) ...
Selecting previously unselected package libodbc1.
Unpacking libodbc1 (from .../libodbc1_2.2.14p2-5ubuntu3_amd64.deb) ...
Selecting previously unselected package libperl5.14.
Unpacking libperl5.14 (from .../libperl5.14_5.14.2-6ubuntu2.1_amd64.deb) ...
Selecting previously unselected package libslp1.
Unpacking libslp1 (from .../libslp1_1.2.1-7.8ubuntu1_amd64.deb) ...
Selecting previously unselected package slapd.
Unpacking slapd (from .../slapd_2.4.28-1.1ubuntu4.1_amd64.deb) ...
Processing triggers for man-db ...
Processing triggers for ureadahead ...
Processing triggers for ufw ...
Setting up libltdl7 (2.4.2-1ubuntu1) ...
Setting up libodbc1 (2.2.14p2-5ubuntu3) ...
Setting up libperl5.14 (5.14.2-6ubuntu2.1) ...
Setting up libslp1 (1.2.1-7.8ubuntu1) ...
Setting up slapd (2.4.28-1.1ubuntu4.1) ...
  Creating new user openldap... done.
  Omitting slapd configuration as requested.
 * No configuration file was found for slapd at /etc/ldap/slapd.conf.
invoke-rc.d: initscript slapd, action "start" failed.
dpkg: error processing slapd (--configure):
 subprocess installed post-installation script returned error exit status 1
Processing triggers for libc-bin ...
ldconfig deferred processing now taking place
Errors were encountered while processing:
 slapd
E: Sub-process /usr/bin/dpkg returned an error code (1)

Changed in openldap (Ubuntu):
status: New → Confirmed
importance: Undecided → Medium
Changed in openldap (Ubuntu Quantal):
status: Confirmed → Triaged
Changed in openldap (Ubuntu Precise):
status: New → Triaged
importance: Undecided → Medium
milestone: none → precise-updates
James Page (james-page) wrote :

IMHO I think that the init script should probably detect this scenario and exit with status code 6 (service not configured) rather than with status code 1 which is just a general failure.

James Page (james-page) on 2012-09-03
Changed in openldap (Ubuntu Precise):
importance: Medium → Low
Changed in openldap (Ubuntu Quantal):
importance: Medium → Low
no longer affects: openldap (Ubuntu Quantal)
no longer affects: openldap (Ubuntu Precise)
Paul Boven (p-boven) wrote :

I would say that the 'old' behaviour would be preferable if somoene choses to have an unconfigured slapd: Instead of failing to start the service, an empty slapd that is live and can be configured from the root account would be a bit more user-friendly. This seems to be how slapd was packaged in Ubuntu before, until the addition of an automatically populated tree recently.

Changed in openldap (Debian):
status: Unknown → New
Paul Boven (p-boven) wrote :

Still the same error with Trusty when installing the OpenLDAP (slapd) package.

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.