pgbouncer init.d fails to start with no message when start=0
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
pgbouncer (Ubuntu) |
Confirmed
|
Undecided
|
Unassigned |
Bug Description
Command:
sudo service pgbouncer start or /etc/init.
Expectation:
When starting pgbouncer through the init script, it should start or fail with an error.
What is actually happening:
When you start pgbouncer it exits with 0 and no error, Pgbouncer has not started.
Version Info:
Description: Ubuntu 12.10
Release: 12.10
pgbouncer:
Installed: 1.5.4-3.pgdg12.4+1
Candidate: 1.5.4-3.pgdg12.4+1
Version table:
*** 1.5.4-3.pgdg12.4+1 0
500 http://
100 /var/lib/
1.
500 http://
500 http://
1.5.2-2 0
500 http://
DETAILS:
When you install pgbouncer on ubuntu and go to start the service it fails without a message.
after digging around google and through the init.d script, i found that start needs to be set to 1 in the defaults file.
This is far from standard installation, and highly confusing to anyone installing pgbouncer for the first time, not to mention, there is no documentation i can easily find on this behavior, and no error message when start=0.
it would make more sense to have pgbouncer start unconfigured, show errors in a log that i needs to be properly configured, then having the startup just fail with no warning.
if for some god awful reason you insist on leaving this ridiculous /etc/default/
original init.d code:
case "$1" in
start)
# Check if we are still disabled in /etc/default/
[ "${START:-}" = "0" ] && exit 0
log_daemon_msg "Starting PgBouncer" $NAME
test -d $PIDDIR || install -d -o postgres -g postgres -m 2775 $PIDDIR
$SSD --start --chuid $RUNASUSER --oknodo -- $OPTS 2> /dev/null
log_end_msg $?
;;
modified init.d:
case "$1" in
start)
log_daemon_msg "Starting PgBouncer" $NAME
test -d $PIDDIR || install -d -o postgres -g postgres -m 2775 $PIDDIR
$SSD --start --chuid $RUNASUSER --oknodo -- $OPTS 2> /dev/null
log_end_msg $?
;;
or
case "$1" in
start)
# Check if we are still disabled in /etc/default/
if [ "${START:-}" = "0" ]; then
exit 0
fi
log_daemon_msg "Starting PgBouncer" $NAME
test -d $PIDDIR || install -d -o postgres -g postgres -m 2775 $PIDDIR
$SSD --start --chuid $RUNASUSER --oknodo -- $OPTS 2> /dev/null
log_end_msg $?
;;
summary: |
- init.d fails to start with no message when start=0 + pgbouncer init.d fails to start with no message when start=0 |
Status changed to 'Confirmed' because the bug affects multiple users.