Bug #4772
closedRudder-webapp package try to configure postgresql which fails when postgresql is not on the server
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
Updated by Vincent MEMBRÉ over 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.
Updated by Jonathan CLARKE over 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 !"
Updated by Jonathan CLARKE over 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.
Updated by Matthieu CERDA over 10 years ago
Also please take a look at #4776 as a solution.
Updated by Jonathan CLARKE over 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.
Updated by Benoît PECCATTE almost 10 years ago
- Project changed from 34 to Rudder
- Category set to Packaging
Updated by Benoît PECCATTE almost 8 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
Updated by François ARMAND over 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
Updated by Jonathan CLARKE over 7 years ago
- Status changed from Discussion to New
Updated by Benoît PECCATTE almost 7 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