Project

General

Profile

Actions

Bug #18014

closed

rudder-reports-postinst errors during upgrade from 6.1.0 to 6.1.1

Bug #18014: rudder-reports-postinst errors during upgrade from 6.1.0 to 6.1.1

Added by François ARMAND over 5 years ago. Updated over 5 years ago.

Status:
Released
Priority:
N/A
Category:
Packaging
Target version:
Severity:
Minor - inconvenience | misleading | easy workaround
UX impact:
User visibility:
Operational - other Techniques | Rudder settings | Plugins
Effort required:
Priority:
32
Name check:
To do
Fix check:
Checked
Regression:

Description

On suse 12, during upgrade from rudder 6.1.0 to 6.1.1, we got:

INFO: Waiting for PostgreSQL to be up... Done
/opt/rudder/share/package-scripts/rudder-reports-postinst: line 112: [: too many arguments
/opt/rudder/share/package-scripts/rudder-reports-postinst: line 120: [: too many arguments

Corresponding lines in script in rudder-package/rudder-reports/SOURCES/rudder-reports-postinst:

CHK_PG_DB=$(su - postgres -c "psql -t -c \"select count(1) from pg_catalog.pg_database where datname = '${DBNAME}'\"")
CHK_PG_USER=$(su - postgres -c "psql -t -c \"select count(1) from pg_user where usename = '${USERNAME}'\"")

# Rudder user
if [ ${CHK_PG_USER} -eq 0 ] # <- line 112
then
...

# Rudder database
if [ ${CHK_PG_DB} -eq 0 ] # <- line 120
then
...

Updated by Benoît PECCATTE over 5 years ago Actions #1

  • Status changed from New to In progress
  • Assignee set to Benoît PECCATTE

Updated by Benoît PECCATTE over 5 years ago Actions #2

  • Status changed from In progress to Pending technical review
  • Assignee changed from Benoît PECCATTE to Nicolas CHARLES
  • Pull Request set to https://github.com/Normation/rudder-packages/pull/2347

Updated by Benoît PECCATTE over 5 years ago Actions #3

su - invokes a login shell and with some machines prints a banner, which is not what we want

Updated by Vincent MEMBRÉ over 5 years ago Actions #4

  • Target version changed from 6.1.2 to 6.1.3

Updated by Benoît PECCATTE over 5 years ago Actions #5

  • Status changed from Pending technical review to Pending release

Updated by Vincent MEMBRÉ over 5 years ago Actions #6

  • Target version changed from 6.1.3 to 6.1.2

Updated by François ARMAND over 5 years ago Actions #7

  • Fix check changed from To do to Checked

Updated by François ARMAND over 5 years ago Actions #8

  • Status changed from Pending release to Released

This bug has been fixed in Rudder 6.1.2 which was released today.

Actions

Also available in: PDF Atom