Hi, Brian. Thanks for triaging my bug.
I see you have changed some things in my bug report. Apart from tagging it with "patch", is there anything I could have done?
Thanks,
Javier
On Tue, Apr 9, 2013 at 12:58 AM, Brian Murray <email address hidden> wrote: > ** Bug watch added: Debian Bug tracker #609457 > http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=609457 > > ** Also affects: supervisor (Debian) via > http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=609457 > Importance: Unknown > Status: Unknown > > ** Changed in: supervisor (Ubuntu) > Status: New => Triaged > > ** Changed in: supervisor (Ubuntu) > Importance: Undecided => Medium > > -- > You received this bug notification because you are subscribed to the bug > report. > https://bugs.launchpad.net/bugs/1163753 > > Title: > Restart option in supervisor init script does not work > > Status in “supervisor” package in Ubuntu: > Triaged > Status in “supervisor” package in Debian: > Unknown > > Bug description: > Supervisord does not restart when invoked via `# > /etc/init.d/supervisor restart` or `# service supervisor restart` > > Its PID stays the same. Manually stopping, then starting the package > works, but management tools break if they depend on `restart` > working. > > This is a documented bug from Debian, where the package originates and there is a patch available, although maintainer seems to be MIA: > http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=609457 > > I copy from the Debian bug report: > > > The start-stop-daemon does not find running instances > and so some conditionals in the script don't work. > > > Another side-effect is that the pidfile gets removed > when invoking the script with "start" and supervisord is already running. > > I have applied the patch from the Debian bug report, and it works. > Here's my own patch after applying and testing: > > diff --git a/supervisor b/supervisor > index 334d4c6..05f28e1 100755 > --- a/supervisor > +++ b/supervisor > @@ -91,7 +91,7 @@ case "$1" in > start) > echo -n "Starting $DESC: " > start-stop-daemon --start --quiet --pidfile $PIDFILE \ > - --exec $DAEMON -- $DAEMON_OPTS > + --startas $DAEMON -- $DAEMON_OPTS > test -f $PIDFILE || sleep 1 > if running ; then > echo "$NAME." > @@ -132,18 +132,17 @@ case "$1" in > # just the same as "restart" except that it does nothing if the > # daemon isn't already running. > # check wether $DAEMON is running. If so, restart > - start-stop-daemon --stop --test --quiet --pidfile \ > - /var/run/$NAME.pid --exec $DAEMON \ > + start-stop-daemon --stop --test --quiet --pidfile $PIDFILE\ > + --startas $DAEMON \ > && $0 restart \ > || exit 0 > ;; > restart) > echo -n "Restarting $DESC: " > - start-stop-daemon --stop --quiet --pidfile \ > - /var/run/$NAME.pid --exec $DAEMON > + start-stop-daemon --stop --quiet --oknodo --pidfile $PIDFILE > [ -n "$DODTIME" ] && sleep $DODTIME > - start-stop-daemon --start --quiet --pidfile \ > - /var/run/$NAME.pid --exec $DAEMON -- $DAEMON_OPTS > + start-stop-daemon --start --quiet --pidfile $PIDFILE\ > + --startas $DAEMON -- $DAEMON_OPTS > echo "$NAME." > ;; > status) > > More data: > > $ lsb_release -rd > Description: Ubuntu 12.04.2 LTS > Release: 12.04 > > $ apt-cache policy supervisor > supervisor: > Installed: 3.0a8-1.1 > Candidate: 3.0a8-1.1 > > $ apt-rdepends supervisor > (...) > supervisor > Depends: python (>= 2.3) > Depends: python-medusa (>= 0.5.4) > Depends: python-meld3 > Depends: python-pkg-resources (>= 0.6c7) > Depends: python-support (>= 0.90.0) > (...) > > To manage notifications about this bug go to: > https://bugs.launchpad.net/ubuntu/+source/supervisor/+bug/1163753/+subscriptions
Hi, Brian. Thanks for triaging my bug.
I see you have changed some things in my bug report. Apart from
tagging it with "patch", is there anything I could have done?
Thanks,
Javier
On Tue, Apr 9, 2013 at 12:58 AM, Brian Murray <email address hidden> wrote: bugs.debian. org/cgi- bin/bugreport. cgi?bug= 609457 bugs.debian. org/cgi- bin/bugreport. cgi?bug= 609457 /bugs.launchpad .net/bugs/ 1163753 d/supervisor restart` or `# service supervisor restart` bugs.debian. org/cgi- bin/bugreport. cgi?bug= 609457 pkg-resources (>= 0.6c7) /bugs.launchpad .net/ubuntu/ +source/ supervisor/ +bug/1163753/ +subscriptions
> ** Bug watch added: Debian Bug tracker #609457
> http://
>
> ** Also affects: supervisor (Debian) via
> http://
> Importance: Unknown
> Status: Unknown
>
> ** Changed in: supervisor (Ubuntu)
> Status: New => Triaged
>
> ** Changed in: supervisor (Ubuntu)
> Importance: Undecided => Medium
>
> --
> You received this bug notification because you are subscribed to the bug
> report.
> https:/
>
> Title:
> Restart option in supervisor init script does not work
>
> Status in “supervisor” package in Ubuntu:
> Triaged
> Status in “supervisor” package in Debian:
> Unknown
>
> Bug description:
> Supervisord does not restart when invoked via `#
> /etc/init.
>
> Its PID stays the same. Manually stopping, then starting the package
> works, but management tools break if they depend on `restart`
> working.
>
> This is a documented bug from Debian, where the package originates and there is a patch available, although maintainer seems to be MIA:
> http://
>
> I copy from the Debian bug report:
>
> > The start-stop-daemon does not find running instances
> and so some conditionals in the script don't work.
>
> > Another side-effect is that the pidfile gets removed
> when invoking the script with "start" and supervisord is already running.
>
> I have applied the patch from the Debian bug report, and it works.
> Here's my own patch after applying and testing:
>
> diff --git a/supervisor b/supervisor
> index 334d4c6..05f28e1 100755
> --- a/supervisor
> +++ b/supervisor
> @@ -91,7 +91,7 @@ case "$1" in
> start)
> echo -n "Starting $DESC: "
> start-stop-daemon --start --quiet --pidfile $PIDFILE \
> - --exec $DAEMON -- $DAEMON_OPTS
> + --startas $DAEMON -- $DAEMON_OPTS
> test -f $PIDFILE || sleep 1
> if running ; then
> echo "$NAME."
> @@ -132,18 +132,17 @@ case "$1" in
> # just the same as "restart" except that it does nothing if the
> # daemon isn't already running.
> # check wether $DAEMON is running. If so, restart
> - start-stop-daemon --stop --test --quiet --pidfile \
> - /var/run/$NAME.pid --exec $DAEMON \
> + start-stop-daemon --stop --test --quiet --pidfile $PIDFILE\
> + --startas $DAEMON \
> && $0 restart \
> || exit 0
> ;;
> restart)
> echo -n "Restarting $DESC: "
> - start-stop-daemon --stop --quiet --pidfile \
> - /var/run/$NAME.pid --exec $DAEMON
> + start-stop-daemon --stop --quiet --oknodo --pidfile $PIDFILE
> [ -n "$DODTIME" ] && sleep $DODTIME
> - start-stop-daemon --start --quiet --pidfile \
> - /var/run/$NAME.pid --exec $DAEMON -- $DAEMON_OPTS
> + start-stop-daemon --start --quiet --pidfile $PIDFILE\
> + --startas $DAEMON -- $DAEMON_OPTS
> echo "$NAME."
> ;;
> status)
>
> More data:
>
> $ lsb_release -rd
> Description: Ubuntu 12.04.2 LTS
> Release: 12.04
>
> $ apt-cache policy supervisor
> supervisor:
> Installed: 3.0a8-1.1
> Candidate: 3.0a8-1.1
>
> $ apt-rdepends supervisor
> (...)
> supervisor
> Depends: python (>= 2.3)
> Depends: python-medusa (>= 0.5.4)
> Depends: python-meld3
> Depends: python-
> Depends: python-support (>= 0.90.0)
> (...)
>
> To manage notifications about this bug go to:
> https:/