slapd fails to stop if /etc/ldap/slapd.d/cn=config.ldif is deleted but /etc/ldap/slapd.d still exists

Bug #1702290 reported by Mahmut Boğaz
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
openldap (Debian)
New
Unknown
openldap (Ubuntu)
Incomplete
Undecided
Unassigned

Bug Description

after i install slapd and remove it's one of folders, couldnt do apt-get ugrade. It said problem about header

ProblemType: Package
DistroRelease: Ubuntu 14.04
Package: slapd 2.4.31-1+nmu2ubuntu8.4
ProcVersionSignature: Ubuntu 3.13.0-95.142-generic 3.13.11-ckt39
Uname: Linux 3.13.0-95-generic x86_64
NonfreeKernelModules: nvidia wl
ApportVersion: 2.14.1-0ubuntu3.23
AptOrdering:
 ldap-utils: Remove
 slapd: Remove
Architecture: amd64
Date: Tue Jul 4 15:22:00 2017
DistributionChannelDescriptor:
 # This is a distribution channel descriptor
 # For more information see http://wiki.ubuntu.com/DistributionChannelDescriptor
 canonical-oem-somerville-trusty-amd64-20140620-0
DpkgHistoryLog:
 Start-Date: 2017-07-04 15:21:46
 Commandline: apt-get remove slapd ldap-utils
 Remove: ldap-utils:amd64 (2.4.31-1+nmu2ubuntu8.4), slapd:amd64 (2.4.31-1+nmu2ubuntu8.4)
DuplicateSignature: package:slapd:2.4.31-1+nmu2ubuntu8.4:subprocess installed pre-removal script returned error exit status 2
ErrorMessage: subprocess installed pre-removal script returned error exit status 2
InstallationDate: Installed on 2015-06-03 (761 days ago)
InstallationMedia: Ubuntu 14.04 "Trusty" - Build amd64 LIVE Binary 20140620-04:25
RelatedPackageVersions:
 dpkg 1.17.5ubuntu5.7
 apt 1.0.1ubuntu2.17
SourcePackage: openldap
Title: package slapd 2.4.31-1+nmu2ubuntu8.4 failed to install/upgrade: subprocess installed pre-removal script returned error exit status 2
UpgradeStatus: Upgraded to trusty on 2016-05-30 (400 days ago)

Revision history for this message
Mahmut Boğaz (mbogaz93) wrote :
tags: removed: need-duplicate-check
Revision history for this message
Ryan Tandy (rtandy) wrote :

Hello,

Since you deleted all the contents out of the /etc/ldap/slapd.d folder, please delete that folder as well, then the uninstallation will proceed.

The init script could probably be more resilient about this.

Changed in openldap (Ubuntu):
status: New → Confirmed
summary: - package slapd 2.4.31-1+nmu2ubuntu8.4 failed to install/upgrade:
- subprocess installed pre-removal script returned error exit status 2
+ slapd fails to stop if /etc/ldap/slapd.d/cn=config.ldif is deleted but
+ /etc/ldap/slapd.d still exists
Changed in openldap (Debian):
status: Unknown → New
Revision history for this message
Christian Ehrhardt  (paelzer) wrote :

This is essentially a config change breaking the service (re)start. and due to that upgrades.
While the init could be more resilient it is not really a bug but a misconfiguration as identified by Ryan already.

Also the error message (these days) is not misleading at all (tried on cosmic):
  slapd[26348]: sed: can't read /etc/ldap/slapd.d/cn=config.ldif: No such file or directory

Which after deleting the file makes sense :-)

Revision history for this message
Christian Ehrhardt  (paelzer) wrote :

Thank you for taking the time to report this bug and helping to make Ubuntu better.

On upgrading a service this service has to be restarted to pick up the fixes.
Rather rarely a real issue occurs that the newer version does e.g. fail with the formerly working configuration.
But most of the time what happens is, that a service was installed, but stays unconfigured or experimented with but left in a broken state.

Now on any update of the related packages that service has to be restarted, but since its config is incomplete/faulty it fails to restart.
Therefore the update of that package has to consider itself incomplete.

Depending on your particular case there are two solutions:
- either remove the offending package if you don't want to continue using it.
- Or if you do want to keep it please fix the configuration so that re-starting the service will work.

Since it seems likely to me that this is a local configuration problem, rather than a bug in Ubuntu, I'm marking this bug as Incomplete.

If indeed this is a local configuration problem, you can find pointers to get help for this sort of problem here: http://www.ubuntu.com/support/community

Or if you believe that this is really a bug, then you may find it helpful to read "How to report bugs effectively" http://www.chiark.greenend.org.uk/~sgtatham/bugs.html. We'd be grateful if you would then provide a more complete description of the problem, explain why you believe this is a bug in Ubuntu rather than a problem specific to your system, and then change the bug status back to New.

Changed in openldap (Ubuntu):
status: Confirmed → Incomplete
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

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