[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

[RFC] OpenLDAP automatic upgrade



Hi there, 

As you might have noticed or not we are working on getting OpenLDAP 2.2
into unstable. The packages are mostly working fine (as available in
experimental) but what is missing is a really tested upgrade path from
OpenLDAP 2.0 (in stable) and 2.1 (in testing, unstable).

My proposal how it should work:

a) the preinst checks if the database format has changed between the old
version and the version that we are upgrading to

b) if it has each LDAP directory is dumped to <suffix>.ldif using slapcat

c) the postinst checks if an ldif file is available from the old version

d) if it is, the fix_ldif script is run to adapt the contents of the
directory to the more strict checking of the new OpenLDAP server

e) next old data in the directory of the database is moved away so the
new DB can be created

f) the corrected ldif file is piped into the new directory using slapadd


This sounds simple. There are a lot of problems so:

ad b) where is that .ldif file to be saved? For small directories not an
issue (take /var/backups or something). For big directories it should be
on a different disk than /var/lib/ldap with enough space to get sensible
performance.

ad c) what happens if the upgrade fails for incompatibilities in
slapadd? will the next dpkg --configure slapd give the right value for
previous version to the postinst?

ad d) fix_ldif is a script that tries to fix some errors in the LDAP
data that are not noticed by OpenLDAP 2.0 but get detected by newer
OpenLDAP breaking the slapadd. Problem is: It reads the LDIF into
memory. Try that with 1GB of data...

ad e) where to move the directory? Should be on the same disk so that
the mv command is most effective. 


And comments from the users of our OpenLDAP packages?

Greetings

	Torsten

Attachment: signature.asc
Description: Digital signature


Reply to: