Owncloud schema causes upgrade failure ucs 4.1.5 to 4.2

Hi everybody,

on our DC-Slave I migrated our owncloud 9.0.6 installation into the docker environment (owncloud 9.1.4). Because we had both owncloud82.schema and owncloud.schema I deactivated the owncloud.schema on DC via UMC (like described here)
Afterwards I premature started the upgrade from UCS 4.1.5 to 4.2. Unfortunately the upgrade failed, complaining some undefined attributes. My suggestion is, that ldaps owncloud schema is missing. Surprisingly I couldn’t find the original owncloud.schema definition (I deactivated before) in the LDAP:

slapd (2.4.42+dfsg-2.A~4.2.0.201703081826) wird eingerichtet ...
File: /etc/init.d/slapd
Multifile: /etc/ldap/slapd.conf
  Backing up /etc/ldap/slapd.conf in /var/backups/slapd-2.4.42+dfsg-2.224.201706201314... done.
  Moving old database directories to /var/backups:
  - directory dc=something,dc=de... done.
  Loading from /var/backups/slapd-2.4.42+dfsg-2.224.201706201314:
  - directory dc=something,dc=de... failed.

Loading the database from the LDIF dump failed with the following
error while running slapadd:
    5a664067 <= str2entry: str2ad(OWNCLOUDENABLED): attribute type undefined
    slapadd: could not parse entry (line=481)
dpkg: Fehler beim Bearbeiten des Paketes slapd (--configure):
 Unterprozess installiertes post-installation-Skript gab den Fehlerwert 1 zurück
Trigger für libc-bin (2.19-18+deb8u7) werden verarbeitet ...
Fehler traten auf beim Bearbeiten von:
 slapd
E: Sub-process /usr/bin/dpkg returned an error code (1)
Error: Failed to execute "apt-get -o DPkg::Options::=--force-confold -o DPkg::Options::=--force-overwrite -o DPkg::Options::=--force-overwrite-dir -y --force-yes -u dist-upgrade"
exitcode of univention-updater: 1
ERROR: update failed. Please check /var/log/univention/updater.log

Does anyone here have an idea how to fix this? Is there a way (if that should be enough) to include the owncloud.schema into the /etc/slapd.conf to permit the LDIF import?

Cheers

Sebastian

including owncloud.schema again should fix this (if that is the right schema),
but perhaps it is better to remove the owncloud.schema defined objectclasses
and attributes (should be all-caps in the ldif), and slapadd the cleaned up
ldif.

puhh, you mean, I should:

  1. export the complete ldap (from ucs-dc) into ldif
  2. strip all the owncloud objectsclasses and attributes
  3. import the ldif file into ucs-dc’s ldap

right? If that does the trick, I just install the owncloud docker app afterwards?

You need to reset the ldap database before adding the dump.

https://wiki.univention.de/index.php/Cool_Solution_-_Single_Server_Backup_and_Restore#LDAP_.26_Samba_Restore

should point you in the right direction. If you want to create a fresh backup
(they are created daily, though) use /usr/sbin/univention-ldap-backup.

Instead of removing the db dir, you should probably just rename it.

Mastodon