Bug 15011 - koha-indexer --stop does not work
Summary: koha-indexer --stop does not work
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Command-line Utilities (show other bugs)
Version: master
Hardware: All All
: P5 - low normal (vote)
Assignee: Jonathan Druart
QA Contact: Testopia
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-10-14 13:20 UTC by Jonathan Druart
Modified: 2017-06-14 22:12 UTC (History)
3 users (show)

See Also:
Change sponsored?: ---
Patch complexity: Small patch
Bot Control: ---
When did the bot last check this:
Who signed the patch off:
Text to go in the release notes:


Attachments
Bug 15011: koha-indexer should define the --pidfiles on starting the daemon (1.79 KB, patch)
2015-10-14 13:23 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 15011: koha-indexer should define the --pidfiles on starting the daemon (2.09 KB, patch)
2015-10-14 13:48 UTC, Tomás Cohen Arazi
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Jonathan Druart 2015-10-14 13:20:10 UTC
root@kohadevbox:~# koha-indexer --start kohadev 
[ ok ] Starting Koha indexing daemon for kohadev:.
root@kohadevbox:~# koha-indexer --stop kohadev 
[FAIL] Error: Indexer not running for kohadev: failed!

root@kohadevbox:~# ps aux | grep zebra
kohadev+   509  0.0  0.0  18596   188 ?        S    11:45   0:00 daemon --name=kohadev-koha-zebra --pidfiles=/var/run/koha/kohadev/ --errlog=/var/log/koha/kohadev/zebra-error.log --stdout=/var/log/koha/kohadev/zebra.log --output=/var/log/koha/kohadev/zebra-output.log --verbose=1 --respawn --delay=30 --user=kohadev-koha.kohadev-koha -- zebrasrv -v none,fatal,warn -f /etc/koha/sites/kohadev/koha-conf.xml
kohadev+   511  0.0  0.8 121780  9148 ?        S    11:45   0:00 zebrasrv -v none,fatal,warn -f /etc/koha/sites/kohadev/koha-conf.xml
kohadev+  3017  0.0  0.0  18596   188 ?        S    11:52   0:00 daemon --name=kohadev-koha-indexer --errlog=/var/log/koha/kohadev/indexer-error.log --stdout=/var/log/koha/kohadev/indexer.log --output=/var/log/koha/kohadev/indexer-output.log --verbose=1 --respawn --delay=30 --user=kohadev-koha.kohadev-koha -- /usr/share/koha/bin/migration_tools/rebuild_zebra.pl -daemon -x -sleep 5
kohadev+  3020  0.8 11.0 341964 113288 ?       S    11:52   0:01 /usr/bin/perl /usr/share/koha/bin/migration_tools/rebuild_zebra.pl -daemon -x -sleep 5
Comment 1 Jonathan Druart 2015-10-14 13:23:55 UTC Comment hidden (obsolete)
Comment 2 Tomás Cohen Arazi 2015-10-14 13:48:27 UTC
Created attachment 43401 [details] [review]
Bug 15011: koha-indexer should define the --pidfiles on starting the daemon

The --pidfiles options is not provided on starting the daemon and the is_indexer_running consider that the daemon is not running

Test plan:
koha-indexer start
koha-indexer stop

should start and stop the zebra daemon wuthout any error.

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Tested on kohadevbox:ansible

sudo debian/scripts/koha-indexer --stop kohadev
sudo debian/scripts/koha-indexer --start kohadev
sudo debian/scripts/koha-indexer --restart kohadev

All work as expected on the different scenarios.
Comment 3 Tomás Cohen Arazi 2015-11-10 18:24:37 UTC
Patch pushed to master.

Thanks Jonathan!
Comment 4 Frédéric Demians 2015-11-29 20:49:03 UTC
This patch has been pushed to 3.20.x, will be in 3.20.6.