pgpool2 cannot start after reboot
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
pgpool2 (Ubuntu) |
Confirmed
|
Undecided
|
Unassigned |
Bug Description
1) The release of Ubuntu you are using, via 'lsb_release -rd' or System -> About Ubuntu
Description: Ubuntu 12.04.1 LTS
Release: 12.04
2) The version of the package you are using, via 'apt-cache policy pkgname' or by checking in Software Center
pgpool2:
Installed: 3.1.1-1
Candidate: 3.1.1-1
Version table:
*** 3.1.1-1 0
500 http://
100 /var/lib/
3) What you expected to happen
pgpool2, like all other long-running services, should automatically start after a reboot.
4) What happened instead
pgpool2 fails to restart after reboot because the /var/run/postgresql directory is missing. From /var/syslog:
Nov 14 20:51:57 test-app pgpool: 2012-11-14 20:51:57 ERROR: pid 1300: could not open pid file as /var/run/
This is a regression of a bug that was addressed years ago but apparently wasn't fixed upstream, so it's been reintroduced (see => https:/
The /etc/init.d/pgpool2 script needs to follow convention and source /usr/share/
d_start() {
if is_running; then
:
else
# create socket directory
if [ -d /var/run/postgresql ]; then
fi
su -c "$DAEMON -n $OPTS 2>&1 </dev/null | logger -t pgpool -p ${PGPOOL_
fi
}
Here are the minimum steps to reproduce on a new install:
root@test-app:~# apt-get update && sudo apt-get upgrade && sudo apt-get install pgpool2
The following extra packages will be installed:
libpgpool0 libpq5 postgresql-
root@test-app:~# ls /var/run/
pgpool.pid
root@test-app:~# reboot
root@test-app:~# ls /var/run/
ls: cannot access /var/run/
Status changed to 'Confirmed' because the bug affects multiple users.