Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 478142 - dev-db/pgbouncer - init.d script fails to stop daemon due to a none existing env variable
Summary: dev-db/pgbouncer - init.d script fails to stop daemon due to a none existing ...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Server (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Johan Bergström
URL:
Whiteboard:
Keywords:
: 480110 (view as bug list)
Depends on:
Blocks:
 
Reported: 2013-07-25 14:39 UTC by Quentin
Modified: 2013-08-18 20:23 UTC (History)
4 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
emerge --info (emerge.info,4.64 KB, text/plain)
2013-07-25 14:39 UTC, Quentin
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Quentin 2013-07-25 14:39:06 UTC
Created attachment 354184 [details]
emerge --info

Here is the stop function in the initd of pgbouncer : 
stop() {
    local seconds=$(( ${NICE_TIMEOUT} + ${FORCE_TIMEOUT} ))
    ebegin "Stopping PgBouncer (this can take up to ${seconds} seconds)"

    local retries=SIGINT/${NICE_TIMEOUT}

    if [ "${FORCE_QUIT}" = "YES" ] ; then
        einfo "FORCE_QUIT enabled."
        retries="${retries}/SIGTERM/${FORCE_TIMEOUT}"
    fi

    # Loops through nice and force quit in one go.
    start-stop-daemon --stop \
        --pidfile ${PIDFILE} \
        --retry ${retries}

    eend $?
}

The "FORCE_TIMEOUT" variable doesn't exist in the confd file. it results in an error when you try to restart/stop pgbouncer :

#/etc/init.d/pgbouncer stop
/etc/init.d/pgbouncer: line 42: 60 +  : syntax error: operand expected (error token is "+  ")


Confd file :

# Location of configuration file for PgBouncer.
INIFILE="/etc/pgbouncer.ini"

# How long to wait in seconds for a safe shutdown. Equivalent to
# issuing 'PAUSE;' and 'SHUTDOWN;' on psql console. (See 'man 1 pgbouncer'.)
NICE_TIMEOUT=60
# Set to 'YES' to perform an immediate shutdown if the nice shutdown
# doesn't work. Same as issuing 'SHUTDOWN;' on console. (See 'man 1
# pgbouncer'.)
FORCE_QUIT="NO"
FORCE_QUIT_TIMEOUT=2
Comment 1 Aaron W. Swenson gentoo-dev 2013-08-18 19:37:19 UTC
*** Bug 480110 has been marked as a duplicate of this bug. ***
Comment 2 Aaron W. Swenson gentoo-dev 2013-08-18 20:23:44 UTC
*pgbouncer-1.5.4-r1 (18 Aug 2013)

  18 Aug 2013; Aaron W. Swenson <titanofold@gentoo.org>
  +pgbouncer-1.5.4-r1.ebuild, files/pgbouncer.initd:
  Fix bugs 478142, 478240, and 477350.