Project

General

Profile

Actions

Bug #2360

closed

rudder-upgrade script fail to execute and make installation of rudder-webapp package to fail

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

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

Description

On Debian Squeeze but could also be the same on SLES

[..]
++ grep isActivated /opt/rudder/etc/openldap/slapd.conf
+ RES=0
+ '[' 0 -ne 0 -a -e /opt/rudder/etc/openldap/slapd.conf.rpmnew ']'
++ wc -l
++ grep -Ei '^policyInstanceId::? '
++ /opt/rudder/sbin/slapcat
+ OLD_LDAP_TEST=0
+ '[' 0 -ne 0 ']'
+ '[' -d /var/rudder/configuration-repository/policy-templates -a '!' -d /var/rudder/configuration-repository/techniques ']'
+ '[' -d /var/rudder/configuration-repository/configuration-rules -a '!' -d /var/rudder/configuration-repository/rules ']'
+ '[' -d /var/rudder/configuration-repository/policy-library -a '!' -d /var/rudder/configuration-repository/directives ']'
+ sed -i 's/^rudder.dir.policyPackages *=/rudder.dir.techniques=/' /opt/rudder/etc/rudder-web.properties
+ sed -i 's/^rudder.batch.ptlib.updateInterval *=/rudder.batch.techniqueLibrary.updateInterval=/' /opt/rudder/etc/rudder-web.properties
+ sed -i 's/^rudder.ptlib.git.refs.path *=/rudder.techniqueLibrary.git.refs.path=/' /opt/rudder/etc/rudder-web.properties
+ diff -Naur /opt/rudder/share/techniques/system/ /var/rudder/configuration-repository/techniques/system/
dpkg: error processing rudder-webapp (--configure):
 subprocess installed post-installation script returned error exit status 1
dpkg: dependency problems prevent configuration of rudder-server-root:
 rudder-server-root depends on rudder-webapp; however:
  Package rudder-webapp is not configured yet.
dpkg: error processing rudder-server-root (--configure):
 dependency problems - leaving unconfigured
Errors were encountered while processing:
 rudder-webapp
 rudder-server-root
Actions #1

Updated by Nicolas PERRON over 12 years ago

This bug doesn't appear on SLES 11 SP1.

If the line "diff -Naur /opt/rudder/share/techniques/system/ /var/rudder/configuration-repository/techniques/system/" is commented, the installation's process work perfectly.

What's wrong with diff on debian ?
SLES 11 SP1 version: diff (GNU diffutils) 2.8.7-cvs
Debian Squeeze version: diff (GNU diffutils) 3.0

Actions #2

Updated by Jonathan CLARKE over 12 years ago

It is likely that diff returns a non-null return code in some cases (ie, if the diff is empty, or if it's not empty, etc). We should probably not run diff on it's own, but "if diff..." or diff || whatever.

Actions #3

Updated by Jonathan CLARKE over 12 years ago

Second thoughts: I think the error may happen because the second argument to diff does not exist yet: /var/rudder/configuration-repository/techniques/system/.

/var/rudder/configuration-repository/techniques/system/ will not have been created yet in a new install, so we should prefix this diff with a if -d /var/rudder/configuration-repository/techniques/system/ ...

Actions #4

Updated by Nicolas PERRON over 12 years ago

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

Applied in changeset commit:a0d4e4647067b33c23398dc4a216eb3025ad45e7.

Actions #5

Updated by Jonathan CLARKE over 12 years ago

  • Status changed from Pending technical review to Released

Looks good to me!

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