Bug #6699
closedRudder-reports does not find correct postgresql service when using systemctl
Description
When i install rudder-reports on debian jessie, I got a failure directly since it does not use the correct service to use
When we run this part:
if type systemctl >/dev/null 2>&1; then POSTGRESQL_SERVICE_NAME=$(systemctl -a | awk -F'.' '{print $1}' | grep "postgresql" | tail -n 1) elif type chkconfig >/dev/null 2>&1; then POSTGRESQL_SERVICE_NAME=$(chkconfig 2>/dev/null | awk '{ print $1 }' | grep "postgresql" | tail -n 1) else POSTGRESQL_SERVICE_NAME=$(ls -1 /etc/init.d | grep "postgresql" | tail -n 1) fi
We are in the first case, but running that command:
systemctl -a | awk -F'.' '{print $1}' | grep "postgresql" | tail -n 1 system-postgresql
If i remove the tail, I can see that we have three result on debian:
systemctl -a | awk -F'.' '{print $1}' | grep "postgresql" postgresql postgresql@9 system-postgresql
More details when removing the awk part:
systemctl -a | grep "postgresql" postgresql.service loaded active exited PostgreSQL RDBMS postgresql@9.4-main.service loaded active running PostgreSQL Cluster 9.4-main system-postgresql.slice loaded active active system-postgresql.slice
I'm not sure what should be done here.
I need to test on other systems using systemd.
Since it only happens in debian8 and we support debian8 in 3.0, I assign it to 3.0, but since it was introduced in 2.11.11 it may also happens on some systems in 2.11
Updated by Vincent MEMBRÉ over 9 years ago
- Related to Bug #6546: rudder-reports package should use the correct PostgreSQL service added
Updated by Vincent MEMBRÉ over 9 years ago
- Subject changed from rudder-reports does not find correct postgresql service on debian jessie and fails to install to rudder-reports does not find correct postgresql service when using systemctl
This also happens in RHEL7
systemctl -a | grep "postgresql"
gives nothing
You need to run:
systemctl list-unit-files --type service | grep postgresql postgresql.service
Updated by Matthieu CERDA over 9 years ago
- Target version changed from 3.0.6 to 2.11.12
Fixing this on all impacted versions !
Updated by Matthieu CERDA over 9 years ago
- Status changed from New to In progress
Updated by Matthieu CERDA over 9 years ago
- Status changed from In progress to Pending technical review
- Assignee changed from Matthieu CERDA to Benoît PECCATTE
- Pull Request set to https://github.com/Normation/rudder-packages/pull/677
Updated by Matthieu CERDA over 9 years ago
- Status changed from Pending technical review to Pending release
- % Done changed from 0 to 100
Applied in changeset rudder-packages|a38354e826f418f5847a450c85aaa5cb0706e12e.
Updated by Benoît PECCATTE over 9 years ago
Applied in changeset rudder-packages|8b7c1c9f0644a1c3e6cfc48460ad88c6ca4865a7.
Updated by Vincent MEMBRÉ over 9 years ago
- Has duplicate Bug #6686: Error while installing rudder-reports on centos 7 added
Updated by Vincent MEMBRÉ over 9 years ago
- Subject changed from rudder-reports does not find correct postgresql service when using systemctl to Rudder-reports does not find correct postgresql service when using systemctl
Updated by Vincent MEMBRÉ over 9 years ago
- Category changed from System integration to Packaging
Updated by Vincent MEMBRÉ over 9 years ago
- Status changed from Pending release to Released