← Back to team overview

touch-packages team mailing list archive

[Bug 1362481] Re: openldap upgrade fails. chwon of olcDbDirectory, /var/lib/ldap not empty and missing backup of suffix

 

If you are working on cleaning up the slapd.postinst script, you may
find some of these related discussions to be interesting and/or
helpful...:

LP: #450645 "error during slapd configuration: chown: cannot access `olcDbDirectory\nolcDbDirectory'"
LP: #632051 "Improve slapd postinst error message in case database directory can't be determined for a given LDAP suffix"
LP: #571498 "slapd.postinst should put all backed-up items together in one place under /var/backups"
LP: #571481 "when slapd upgrade fails, later upgrade attempts overwrite saved backups of pre-upgrade configuration files"

-- 
You received this bug notification because you are a member of Ubuntu
Touch seeded packages, which is subscribed to openldap in Ubuntu.
https://bugs.launchpad.net/bugs/1362481

Title:
  openldap upgrade fails. chwon of olcDbDirectory, /var/lib/ldap not
  empty and missing backup of suffix

Status in “openldap” package in Ubuntu:
  In Progress
Status in “openldap” package in Debian:
  New

Bug description:
  Upgrading from Ubuntu 12.04.5 LTS to 14.04.1 LTS
  (slapd-2.4.28-1.1ubuntu4.4 to slapd-2.4.31-1+nmu2ubuntu8), it fails
  horribly on my setup with one disk-backend and one ldap-backend (sync
  to another server).

  First, dump_databases in
  /var/lib/dpkg/info/slapd.{config,preinst,postinst} fails due to
  get_directory returning "olcDbDirectory" instead of /var/lib/ldap.
  This is caused by a missing -h to grep, causing another : in the
  returned line, thus causing the '| cut -d: -f 2' to get the wrong part
  of the line.  This causes both the backup of the suffix to fail, and
  later the chown after restore to fail.

      grep "olcDbDirectory:" `grep -l "olcSuffix: ...

  should have been

      grep -h "olcDbDirectory:" `grep -l "olcSuffix:  ...

  later, get_suffix causes the same suffix to be reported twice, thus
  causing database load to fail on the second round of the while since
  /var/lib/ldap is already loaded with the correct files, but is
  expected to be empty. I fixed it with a '| sort -u' in get_suffix, but
  i guess it would be better to maybe redo load_databases' while loop to
  get both suffix and dbdir (since you can have the same suffix stored
  in more than one location, as I have, and thus first getting the
  suffix and then doing a grep for the olcDbDirectory in get_directory
  will cause the same storage to be reported for both instances of the
  suffix)

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/openldap/+bug/1362481/+subscriptions


References