Project

General

Profile

Actions

Bug #2831

closed

Upgrade from any 2.4 *version < 2.4.0~beta2 *to * version > 2.4.0~beta2* on *rudder-inventory-ldap* package because of file */opt/rudder/share/upgrade-tools/rudder-upgrade-LDAP-schema-2.3-2.4-PI-PT-CR-names-changed.pl*

Added by Nicolas PERRON over 12 years ago. Updated over 9 years ago.

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

Description

Dépaquetage de la mise à jour de rudder-inventory-ldap ...
dpkg : erreur de traitement de /var/cache/apt/archives/rudder-inventory-ldap_2.4.0~beta4~git201208210147-squeeze0_amd64.deb (--unpack) :
 tentative de remplacement de « /opt/rudder/share/upgrade-tools/rudder-upgrade-LDAP-schema-2.3-2.4-PI-PT-CR-names-changed.pl », qui appartient aussi au paquet rudder-webapp 2.4.0~alpha7~git201205250131-squeeze0
configured to not write apport reports
                                      dpkg-deb: sous-processus coller tué par le signal (Relais brisé (pipe))

Actions #1

Updated by Jonathan CLARKE about 12 years ago

  • Status changed from New to 2
  • Assignee changed from Nicolas PERRON to Jonathan CLARKE
  • Target version changed from 2.4.0~beta4 to 2.4.0~beta5
Actions #2

Updated by Jonathan CLARKE about 12 years ago

  • Target version changed from 2.4.0~beta5 to 2.4.0~rc1
Actions #3

Updated by Jonathan CLARKE about 12 years ago

  • Status changed from 2 to In progress

This is caused by the change in commit:b3b7e45fc02a017f06f9b86afd288b27bbc36a5b that moved /opt/rudder/share/upgrade-tools/rudder-upgrade-LDAP-schema-2.3-2.4-PI-PT-CR-names-changed.pl from rudder-webapp package to rudder-inventory-ldap. This happened after 2.4.0~beta1 and before 2.4.0~beta2.

Actions #4

Updated by Jonathan CLARKE about 12 years ago

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

Applied in changeset commit:9ebf23bdbfae36a06e71a8e391e0589540e2975a.

Actions #5

Updated by Jonathan CLARKE about 12 years ago

  • Subject changed from Upgrade from 2.4.0~alpha6 to version 2.4.0~beta3 fails at rudder-inventory-ldap stage because of file "/opt/rudder/share/upgrade-tools/rudder-upgrade-LDAP-schema-2.3-2.4-PI-PT-CR-names-changed.pl" to Upgrade from any 2.4 version before 2.4.0~beta2 to 2.4.0~beta2 or later fails on rudder-inventory-ldap package because of file "/opt/rudder/share/upgrade-tools/rudder-upgrade-LDAP-schema-2.3-2.4-PI-PT-CR-names-changed.pl"
Actions #6

Updated by Jonathan CLARKE about 12 years ago

  • Status changed from Pending technical review to Discussion

Just tested a full upgrade from alpha6 to beta6~git(from today) and it works fine.

Dunno how this will affect SLES or RHEL though? RPMs don't seem to have this notion of taking over a file...

Actions #7

Updated by Nicolas PERRON about 12 years ago

Jonathan CLARKE wrote:

Just tested a full upgrade from alpha6 to beta6~git(from today) and it works fine.

Dunno how this will affect SLES or RHEL though? RPMs don't seem to have this notion of taking over a file...

I don't know but I guess it will not affect RPM since I didn't find any documentation about this case.

Actions #8

Updated by Nicolas PERRON about 12 years ago

  • Subject changed from Upgrade from any 2.4 version before 2.4.0~beta2 to 2.4.0~beta2 or later fails on rudder-inventory-ldap package because of file "/opt/rudder/share/upgrade-tools/rudder-upgrade-LDAP-schema-2.3-2.4-PI-PT-CR-names-changed.pl" to Upgrade from any 2.4 version before 2.4.0~beta1 to 2.4.0~beta2 or later fails on rudder-inventory-ldap package because of file "/opt/rudder/share/upgrade-tools/rudder-upgrade-LDAP-schema-2.3-2.4-PI-PT-CR-names-changed.pl"

Typo on title which made it confusing...

Actions #9

Updated by Nicolas PERRON about 12 years ago

  • Subject changed from Upgrade from any 2.4 version before 2.4.0~beta1 to 2.4.0~beta2 or later fails on rudder-inventory-ldap package because of file "/opt/rudder/share/upgrade-tools/rudder-upgrade-LDAP-schema-2.3-2.4-PI-PT-CR-names-changed.pl" to Upgrade from any 2.4 *version < 2.4.0~beta2 *to * version > 2.4.0~beta2* on *rudder-inventory-ldap* package because of file */opt/rudder/share/upgrade-tools/rudder-upgrade-LDAP-schema-2.3-2.4-PI-PT-CR-names-changed.pl*
Actions #10

Updated by Nicolas PERRON about 12 years ago

I finally made a test with this on SLES:
  • If we only install rudder-inventory-ldap, during upgrade (from alpha7 to nightly) zypper will complain about missing backup files:
    [...]
    (with --nodeps --force) Error: Subprocess failed. Error: RPM failed: /var/rudder/ldap/backup/openldap-data-pre-upgrade-20120918145601.ldif: No such file or directory
    /var/tmp/rpm-tmp.77865: line 15: /var/rudder/ldap/backup/openldap-data-pre-upgrade-20120918145601.libdb-version: No such file or directory
    [...]
    
  • If the installation of rudder-server-root is complete, the migration doesn't make any error:
    [...]
    OpenLDAP database was successfully upgraded to new format
    You can safely remove the backups in /var/rudder/ldap/openldap-data-backup-upgrade-to-/
    and /var/rudder/ldap/backup/openldap-data-pre-upgrade-20120918150411.ldif.ldapEntriesFixed
    All done. Starting slapd...
    [...]
    

RPM definitively doens't manage this case.

Actions #11

Updated by Jonathan CLARKE about 12 years ago

  • Target version changed from 2.4.0~rc1 to 2.4.0~beta5

This ticket has a commit in beta5, it needs sorting out before the release.

Actions #12

Updated by Nicolas PERRON about 12 years ago

Nicolas PERRON wrote:

I finally made a test with this on SLES:
  • If we only install rudder-inventory-ldap, during upgrade (from alpha7 to nightly) zypper will complain about missing backup files:
    [...]
    (with --nodeps --force) Error: Subprocess failed. Error: RPM failed: /var/rudder/ldap/backup/openldap-data-pre-upgrade-20120918145601.ldif: No such file or directory
    /var/tmp/rpm-tmp.77865: line 15: /var/rudder/ldap/backup/openldap-data-pre-upgrade-20120918145601.libdb-version: No such file or directory
    [...]
    

This is an error made because of the folder /var/rudder/ldap/backup/ missing. If the folder is present, no error is displayed. We could prevent this by adding "mkdir -p /var/rudder/ldap/backup/" in the preinst script of rudder-inventory-ldap.

  • If the installation of rudder-server-root is complete, the migration doesn't make any error:
    [...]
    OpenLDAP database was successfully upgraded to new format
    You can safely remove the backups in /var/rudder/ldap/openldap-data-backup-upgrade-to-/
    and /var/rudder/ldap/backup/openldap-data-pre-upgrade-20120918150411.ldif.ldapEntriesFixed
    All done. Starting slapd...
    [...]
    

Some error is show in the display, because "/var/rudder/ldap/openldap-data-backup-upgrade-to-/" doesn't exist. This is because of the use of $2 in the SPEC file although this should be used for Debian. Besides, there is a typo in the echo:

echo "You can safely remove the backups in /var/rudder/ldap/openldap-data-backup-upgrade-to-$2/" 

instead of:
echo "You can safely remove the backups in /var/rudder/ldap/openldap-data-backup-upgrade-to-$2-${TIMESTAMP}/" 

like the code above in the SPEC file.

RPM definitively doens't manage this case.

Well, it seems that this is not true. If I use the command rpm, there will be an error:

# rpm -Uvh rudder-inventory-ldap-2.4.0.beta6.git-1.x86_64.rpm 
Preparing...                ########################################### [100%]
    file /opt/rudder/share/upgrade-tools/rudder-upgrade-LDAP-schema-2.3-2.4-PI-PT-CR-names-changed.pl from install of rudder-inventory-ldap-2.4.0.beta6.git-1.x86_64 conflicts with file from package rudder-webapp-2.4.0.alpha7-1.SLES.11.noarch

But it doesn't prevent from upgrading the packages with zypper on SLES.

Actions #13

Updated by Nicolas PERRON about 12 years ago

To put it in a nutshell, two modifications are needed:
  • Ensure in the preinst that /var/rudder/ldap/backup/ exist before trying to create backup files in it.
  • Remove $2 from SPEC files

But it doesn't seem to lead into errors in SLES.

Actions #14

Updated by Jonathan CLARKE about 12 years ago

  • Status changed from Discussion to Released

Agreed, this all looks good.

The error from RPM is because you are only upgrading rudder-inventory-ldap, which installs a file belonging to rudder-webapp - if you upgraded both, the problem should not appear.

Actions #15

Updated by Nicolas PERRON about 12 years ago

And to add informations about conflict files with RPM, it seems that the dependencies are resolved if all the packages are used with RPM:

With only rudder-inventory-ldap package:

sles1164test:~ # rpm -Uvh rudder-inventory-ldap-2.4.0.beta4-1.SLES.11.x86_64.rpm 
Preparing...                ########################################### [100%]
    file /opt/rudder/share/upgrade-tools/rudder-upgrade-LDAP-schema-2.3-2.4-PI-PT-CR-names-changed.pl from install of rudder-inventory-ldap-2.4.0.beta4-1.SLES.11.x86_64 conflicts with file from package rudder-webapp-2.4.0.alpha7-1.SLES.11.noarch

With the two of packages in conflict

sles1164test:~ # rpm -Uvh rudder-inventory-ldap-2.4.0.beta4-1.SLES.11.x86_64.rpm rudder-webapp-2.4.0.beta4-1.SLES.11.noarch.rpm 
Preparing...                ########################################### [100%]
506174e2 UNKNOWN attributeDescription "RECEIVEDATE" inserted.
   1:rudder-inventory-ldap  ########################################### [ 50%]
Setting slapd as a boot service
insserv: Script jexec is broken: incomplete LSB comment.
[...]
warning: /opt/rudder/etc/rudder-web.properties created as /opt/rudder/etc/rudder-web.properties.rpmnew
########################################### [100%]
Setting apache2 as a boot service
[...]
sles1164test:~ #

It works

Actions #16

Updated by Nicolas PERRON almost 12 years ago

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

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