[Koha-bugs] [Bug 27140] koha-zebra doesn't properly stop Zebra

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Fri Dec 4 04:14:36 CET 2020


https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27140

--- Comment #5 from David Cook <dcook at prosentient.com.au> ---
Ultimately, I'd say that we can't reliably use the "daemon" utility to stop
"zebrasrv", since "daemon" just sends a SIGTERM signal to "zebrasrv" and
"zebrasrv" does not propagate SIGTERM to its child processes.

This prevents "zebrasrv" from being stopped by "daemon --stop".

Since "zebrasrv" comes with its own -l logfile, -D daemon, and -p pidfile
options, I think it would be trivial to just manage zebrasrv via a koha-zebra
script that does not use the "daemon" utility.

Of course, we'd have to SIGKILL zebrasrv to get it to really stop. 

Interestingly, looking at
https://github.com/indexdata/idzebra/blob/master/etc/init.d/idzebra-init-script
shows that they try to "stop" their zebrasrv by just using SIGTERM. (It's also
a poorly written service overall...)

My guess is that they think it works correctly but I bet that it doesn't... 

We're running Zebra 2.2.2 on Ubuntu and it looks like someone has provided a
different script for /etc/init.d/zebrasrv which uses "start-stop-daemon".

This is how that service stops zebrasrv:

start-stop-daemon --stop --quiet --retry=TERM/30/KILL/5 --pidfile $PIDFILE
--name $NAME

However, SIGKILL probably won't work any better as it won't propagate to the
child process.

-- 
You are receiving this mail because:
You are the assignee for the bug.
You are watching all bug changes.


More information about the Koha-bugs mailing list