Bug#877086: service supervisor restart fails

2017-11-21 Thread Peter Bittner
(Sorry for the typos. Shame on me!) -- To follow up on my earlier comment:

Interestingly, the $DODTIME value is already defined in the startup
script. Nevertheless the "sleep 5" command doesn't seem to be executed
as we would expect, to avoid restarting to fail:

```
# FILE:  /etc/init.d/supervisor, lines 35+
DODTIME=5   # Time to wait for the server to die, in seconds
# If this value is set too low you might not
# let some servers to die gracefully and
# 'restart' will not work
```

For some reason this fails.



Bug#877086: service supervisor restart fails

2017-11-20 Thread Peter Bittner
We see a vary similar issue with supervisor 3.0r1-1+deb8u1 on Debian
8.9, even though the `restart` command seem to look alright (see
below).

Restarting the service fails (when the service is up beforehand),
because the Supervisor daemon seens to need some time to shut down.
Stopping and starting works fine, provided there passes some time
between their execution:

$ sudo service supervisor restart
Job for supervisor.service failed. See 'systemctl status
supervisor.service' and 'journalctl -xn' for details.
$ sudo service supervisor start
$ sudo service supervisor stop && sleep 1 && sudo service supervisor start


```
# FILE: /etc/init.d/supervisor
  restart)
echo -n "Restarting $DESC: "
start-stop-daemon --stop --quiet --oknodo --pidfile $PIDFILE
[ -n "$DODTIME" ] && sleep $DODTIME
start-stop-daemon --start --quiet --pidfile $PIDFILE \
--startas $DAEMON -- $DAEMON_OPTS
echo "$NAME."
;;
```