← Back to team overview

touch-packages team mailing list archive

[Bug 571481] Re: when slapd upgrade fails, later upgrade attempts overwrite saved backups of pre-upgrade configuration files

 

** Changed in: openldap (Ubuntu)
     Assignee: (unassigned) => Ryan Tandy (rtandy)

** Bug watch added: Debian Bug tracker #757550
   http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=757550

** Also affects: openldap (Debian) via
   http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=757550
   Importance: Unknown
       Status: Unknown

-- 
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/571481

Title:
  when slapd upgrade fails, later upgrade attempts overwrite saved
  backups of pre-upgrade configuration files

Status in “openldap” package in Ubuntu:
  Confirmed
Status in “openldap” package in Debian:
  Unknown

Bug description:
  When called in "upgrade" mode, the slapd.postinst script starts out by
  making a backup of the $SLAPD_CONF directory into /var/backups/slapd
  -<old-package-version>/ .

  However, if the upgrade fails (e.g. because of bug #571057), then
  later attempts to run the upgrade script will still be called with the
  same old-package-version, and the script will blindly re-run the
  backup of $SLAPD_CONF onto the same destination directory, overwriting
  the original pre-upgrade-attempt versions of those files with the
  copies that include edits made by the earlier runs of the upgrade
  script.

  I see there is some logic in the compute_backup_path function to check
  if the backup target already exists, and to abort the upgrade run if
  it does.  Doing the same sort of check-and-abort in backup_config_once
  would be better than the current scenario, though it might be even
  nicer if the program could pick a new backup directory (e.g.
  /var/backups/slapd-<old-package-version>_try<count> or something)
  automatically, rather than aborting and forcing the user to clean up
  manually....

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