Summary: | Error defining INDEXER_PARAMS in /etc/default/koha-common | ||
---|---|---|---|
Product: | Koha | Reporter: | David Cook <dcook> |
Component: | Searching - Zebra | Assignee: | David Cook <dcook> |
Status: | CLOSED FIXED | QA Contact: | |
Severity: | minor | ||
Priority: | P5 - low | CC: | fridolin.somers, jonathan.druart, kyle, victor |
Version: | Main | ||
Hardware: | All | ||
OS: | All | ||
See Also: | https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27267 | ||
Change sponsored?: | --- | Patch complexity: | Small patch |
Documentation contact: | Documentation submission: | ||
Text to go in the release notes: | Version(s) released in: |
21.11.00,21.05.02,20.11.09
|
|
Attachments: |
Bug 27348: Fix test on INDEXER_PARAMS in koha-indexer
Bug 27348: Fix test on ALTERNATE_INDEXER_DAEMON in koha-indexer Bug 27348: Fix test on INDEXER_PARAMS in koha-indexer Bug 27348: Fix test on ALTERNATE_INDEXER_DAEMON in koha-indexer Bug 27348: Fix test on INDEXER_PARAMS in koha-indexer Bug 27348: Fix test on ALTERNATE_INDEXER_DAEMON in koha-indexer |
Description
David Cook
2021-01-06 01:37:51 UTC
Steps to recreate please? In ktd: % koha-indexer --restart kohadev Restarting Koha indexing daemon for kohadev:. => it works Steps to reproduce: 1. vi /etc/default/koha-common 2. Add the following to the bottom of the file: INDEXER_PARAMS="-daemon -sleep $INDEXER_TIMEOUT" 3. koha-indexer --stop kohadev 4. Note the following error: /usr/sbin/koha-indexer: line 220: [: too many arguments Created attachment 114902 [details] [review] Bug 27348: Fix test on INDEXER_PARAMS in koha-indexer koha-indexer doesn't test INDEXER_PARAMS correctly which causes errors to display when stopping/starting the daemon. This patch fixes the test so that the variable is tested as a string, so that no errors are created and the params are passed correctly. Test plan: 0. Apply patch 1. vi /etc/default/koha-common 2. Add the following to the bottom of the file: INDEXER_PARAMS="-daemon -sleep 6" 3. cp debian/scripts/koha-indexer /usr/sbin/koha-indexer 4. koha-indexer --stop kohadev 5. Note no errors 6. koha-indexer --start kohadev 7. Note no errors 8. ps -efww | grep "indexer" 9. Note that rebuild_zebra.pl has the arguments "-daemon -sleep 6" Shouldn't we add the quote for $ALTERNATE_INDEXER_DAEMON as well? It won't hurt :) Created attachment 114903 [details] [review] Bug 27348: Fix test on ALTERNATE_INDEXER_DAEMON in koha-indexer We should also use -z for the DEV_INSTALL test 208 if [ "$DEV_INSTALL" = "" ]; then For later... (In reply to Jonathan Druart from comment #4) > Shouldn't we add the quote for $ALTERNATE_INDEXER_DAEMON as well? > It won't hurt :) Probably wise. You never know when someone is going to put spaces in their filepath and cause problems. Created attachment 121620 [details] [review] Bug 27348: Fix test on INDEXER_PARAMS in koha-indexer koha-indexer doesn't test INDEXER_PARAMS correctly which causes errors to display when stopping/starting the daemon. This patch fixes the test so that the variable is tested as a string, so that no errors are created and the params are passed correctly. Test plan: 0. Apply patch 1. vi /etc/default/koha-common 2. Add the following to the bottom of the file: INDEXER_PARAMS="-daemon -sleep 6" 3. cp debian/scripts/koha-indexer /usr/sbin/koha-indexer 4. koha-indexer --stop kohadev 5. Note no errors 6. koha-indexer --start kohadev 7. Note no errors 8. ps -efww | grep "indexer" 9. Note that rebuild_zebra.pl has the arguments "-daemon -sleep 6" Signed-off-by: David Nind <david@davidnind.com> Created attachment 121621 [details] [review] Bug 27348: Fix test on ALTERNATE_INDEXER_DAEMON in koha-indexer Signed-off-by: David Nind <david@davidnind.com> Created attachment 121861 [details] [review] Bug 27348: Fix test on INDEXER_PARAMS in koha-indexer koha-indexer doesn't test INDEXER_PARAMS correctly which causes errors to display when stopping/starting the daemon. This patch fixes the test so that the variable is tested as a string, so that no errors are created and the params are passed correctly. Test plan: 0. Apply patch 1. vi /etc/default/koha-common 2. Add the following to the bottom of the file: INDEXER_PARAMS="-daemon -sleep 6" 3. cp debian/scripts/koha-indexer /usr/sbin/koha-indexer 4. koha-indexer --stop kohadev 5. Note no errors 6. koha-indexer --start kohadev 7. Note no errors 8. ps -efww | grep "indexer" 9. Note that rebuild_zebra.pl has the arguments "-daemon -sleep 6" Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Created attachment 121862 [details] [review] Bug 27348: Fix test on ALTERNATE_INDEXER_DAEMON in koha-indexer Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Pushed to master for 21.11, thanks to everybody involved! Pushed to 21.05.x for 21.05.02 Pushed to 20.11.x for 20.11.09 Not backported to oldoldstable (20.05.x). Feel free to ask if it's needed. |