Project

General

Profile

Actions

Bug #2353

closed

rudder-inventory-ldap package doesn't upgrade the slapd.conf file but does upgrade schema, causing a failure on upgrade

Added by Matthieu CERDA over 12 years ago. Updated over 9 years ago.

Status:
Released
Priority:
1 (highest)
Assignee:
Matthieu CERDA
Category:
Packaging
Target version:
Severity:
UX impact:
User visibility:
Effort required:
Priority:
Name check:
Fix check:
Regression:

Description

The upgrade of rudder to the latest pre alpha6 package on SLES fails because RPM does not automatically replace the configuration files (and thus the slapd has new schemas but still old config). It makes the upgrade explose very nastily.

Actions #1

Updated by Matthieu CERDA over 12 years ago

  • Status changed from In progress to Pending technical review
  • % Done changed from 0 to 100

Applied in changeset commit:438544d30e4cbd677cd6e160fa6df31c458d7d06.

Actions #2

Updated by Jonathan CLARKE over 12 years ago

  • Status changed from Pending technical review to 2

Matthieu, can you please include a more detailed description of the problem? This will be impossible to understand in only a few weeks...

We need at least the error message, preferably the full output from the upgrade. A summary of your analysis for fixing it is also required: what packages were the problem, what files needed changing, and what fix did we adopt?

Thanks

Actions #3

Updated by Matthieu CERDA over 12 years ago

  • Status changed from 2 to Discussion

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.

Actions #4

Updated by Jonathan CLARKE over 12 years ago

  • Status changed from Discussion to Released

Great description, thank you for taking the time to do things nicely :)
The fix looks good, closing.

Actions #5

Updated by Jonathan CLARKE over 12 years ago

  • Subject changed from The upgrade of rudder to the latest pre alpha6 package on SLES fails to rudder-inventory-ldap package doesn't upgrade the slapd.conf file but does upgrade schema, causing a failure on upgrade

Clarifying the bug title

Actions #6

Updated by Nicolas PERRON almost 12 years ago

  • Project changed from Rudder to 34
  • Category deleted (11)
Actions #7

Updated by Benoît PECCATTE over 9 years ago

  • Project changed from 34 to Rudder
  • Category set to Packaging
Actions

Also available in: Atom PDF