1/ Symptoms:
When upgrading Rudder to the latest packages (a pre-renaming package still containing the old naming scheme, PT, PI, CRs...), you get this error message:
All done. Starting slapd...
slapd[17664]: [INFO] Using /etc/default/slapd for configuration
slapd[17669]: [INFO] Launching OpenLDAP configuration test...
slapd[17691]: [ALERT] OpenLDAP configuration test failed
error: %post(rudder-inventory-ldap-2.4.0.alpha5.git-1.SLES.11.x86_64) scriptlet failed, exit status 1
2/ Explication:
In the rudder-inventory-ldap RPM package, the slapd.conf is considered as a configuration file, and thus is not replaced automatically, if it already exists. Instead, the new version is copied as slapd.conf.rpmnew and the package installation continues.
The problem is, that we copy the new LDAP schemas nevertheless. The result is that slapd tries to launch with an old slapd.conf (and old index definitions) and new schemas. The result is a brilliant failure.
3/ Solution:
We decided (JCL and MCE) to adjust the rudder-upgrade script in the rudder-webapp package to automatically replace slapd.conf with the new version if it is detected that this condition is met (a rpmnew file exists).
A backup of the old file is made, obviously.