Project

General

Profile

Actions

Bug #4772

closed

Rudder-webapp package try to configure postgresql which fails when postgresql is not on the server

Added by Christophe Nowicki almost 10 years ago. Updated about 6 years ago.

Status:
Rejected
Priority:
2
Assignee:
-
Category:
Packaging
Target version:
-
Severity:
Major - prevents use of part of Rudder | no simple workaround
UX impact:
User visibility:
Infrequent - complex configurations | third party integrations
Effort required:
Priority:
37
Name check:
Fix check:
Regression:

Description

Looks like rudder-webapp is trying to setup postgresql?

Error: /Stage[main]/Main/Node[rudder]/Package[rudder-webapp]/ensure: change from absent to present failed: Execution of '/usr/bin/yum -d 0 -e 0 -y install rudder-webapp' returned 1: Error in PREIN scriptlet in rpm package 1398866025:rudder-reports-2.10.1.rc1.git201404180344-1.EL.6.noarch
postgresql: unrecognized service
postgresql: unrecognized service
postgresql: unrecognized service
grep: /var/lib/pgsql/data/pg_hba.conf: No such file or directory
sed: can't read /var/lib/pgsql/data/pg_hba.conf: No such file or directory
sed: can't read /var/lib/pgsql/data/pg_hba.conf: No such file or directory
postgresql: unrecognized service
Bisou, bon week-end ;-)
error: %pre(rudder-reports-1398866025:2.10.1.rc1.git201404180344-1.EL.6.noarch) scriptlet failed, exit status 1
error:   install: %pre scriptlet failed (2), skipping rudder-reports-1398866025:2.10.1.rc1.git201404180344-1.EL.6
INFO: Launching script to check if a migration is needed
INFO: End of migration script

Related issues 1 (0 open1 closed)

Related to Rudder - User story #4666: Segment the packaging into independent role-based entities (integration)ReleasedJonathan CLARKE2014-03-24Actions
Actions #1

Updated by Vincent MEMBRÉ almost 10 years ago

  • Project changed from 24 to 34
  • Subject changed from Error in PREIN scriptlet in rpm package : postgresql: unrecognized service to Rudder-webapp package try to configure postgresql which faisl when postgresql is not on the server
  • Assignee set to Matthieu CERDA
  • Priority changed from N/A to 2

Yes, it was designed to use a database on the local machine...

We should make it possible to use a remote postgresql.

Actions #2

Updated by Jonathan CLARKE almost 10 years ago

  • Status changed from New to Discussion
  • Assignee changed from Matthieu CERDA to Jonathan CLARKE

For context: this is related to running the Rudder server components on separate servers, see #4654.

What appears to be happening here is simple: the rudder-reports package is being installed. The role of this package is... to set up the database :) Therefore, what should happen, is, very simple, that the dependency from rudder-webapp to rudder-reports should be removed.

This was removed by the patch from https://github.com/Normation/rudder-packages/pull/275/files (attached to #4654). It has not yet been committed in nightlies, however.

Christophe, can you try and apply that patch and rebuild the packages? Otherwise, I will merge it before Monday, so Monday's nightlies include it.

Alternatively, as a temporary testing measure, you could just force rpm to not install that dependency... using something like "rpm --nodeps".

I must note that the following line in your pasted output is particularly appreciated by the team, and we were able to reproduce this behaviour by running it in our testing environment:

# Bisou, bon week-end ;-)
bash: syntax error near unexpected token `)'
bash: expecting "merci beaucoup, toi aussi !" 
Actions #3

Updated by Jonathan CLARKE almost 10 years ago

  • Assignee changed from Jonathan CLARKE to Matthieu CERDA

Updating this to reflect the recent change from #4666: for now we have removed the dependency on rudder-reports.

This means that Rudder 2.11 nightlies will not automatically install rudder-reports, and therefore the PGSQL database. Caution!

This ticket must now serve as a basis to find a solution: how do we use packages like rudder-reports or a new "rudder-db-schema" to:

  • Install, initialize and upgrade the database schema whenever rudder-webapp is updated
  • Create the DB and depend on postgresql packages when rudder-server-root is installed but not when it is not and Rudder components are split across servers
  • Ensure that the packages are installed in order - rudder-reports must be installed before rudder-webapp, or it will fail. The same applies for rudder-inventory-ldap actually.
Actions #4

Updated by Matthieu CERDA almost 10 years ago

Also please take a look at #4776 as a solution.

Actions #5

Updated by Jonathan CLARKE almost 10 years ago

Matthieu CERDA wrote:

Also please take a look at #4776 as a solution.

#4776 is a workaround. The risk with this solution is that the packages still won't get installed because the order they are installed in may not be correct - we need rudder-reports and rudder-inventory-ldap to be installed before rudder-webapp, because the rudder-webapp postinst needs to be able to connect to the DB and LDAP server that the two first packages install.

Actions #6

Updated by Benoît PECCATTE about 9 years ago

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

Updated by Benoît PECCATTE over 7 years ago

  • Assignee deleted (Matthieu CERDA)
Actions #8

Updated by Benoît PECCATTE about 7 years ago

  • Subject changed from Rudder-webapp package try to configure postgresql which faisl when postgresql is not on the server to Rudder-webapp package try to configure postgresql which fails when postgresql is not on the server
Actions #9

Updated by François ARMAND almost 7 years ago

  • Severity set to Major - prevents use of part of Rudder | no simple workaround
  • User visibility set to Infrequent - complex configurations | third party integrations
  • Priority set to 0
Actions #10

Updated by Jonathan CLARKE almost 7 years ago

  • Status changed from Discussion to New
Actions #11

Updated by François ARMAND almost 7 years ago

  • Priority changed from 0 to 21
Actions #12

Updated by Benoît PECCATTE almost 7 years ago

  • Priority changed from 21 to 35
Actions #13

Updated by Benoît PECCATTE over 6 years ago

  • Priority changed from 35 to 36
Actions #14

Updated by Benoît PECCATTE about 6 years ago

  • Status changed from New to Rejected
  • Priority changed from 36 to 37

There is no reference to postgresql in rudder-webapp scripts anymore.
This may have been solved by the packing of rudder-reports

Actions

Also available in: Atom PDF