[Bug 27348] New: Error defining INDEXER_PARAMS in /etc/default/koha
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27348 Bug ID: 27348 Summary: Error defining INDEXER_PARAMS in /etc/default/koha Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: NEW Severity: minor Priority: P5 - low Component: Searching - Zebra Assignee: koha-bugs@lists.koha-community.org Reporter: dcook@prosentient.com.au The test at line 220 in koha-indexer creates an error since it isn't treating $INDEXER_PARAMS as a string. For example: /usr/sbin/koha-indexer: line 220: [: -sleep: binary operator expected -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27348 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jonathan.druart@bugs.koha-c | |ommunity.org --- Comment #1 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Steps to recreate please? In ktd: % koha-indexer --restart kohadev Restarting Koha indexing daemon for kohadev:. => it works -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27348 --- Comment #2 from David Cook <dcook@prosentient.com.au> --- 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 -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27348 David Cook <dcook@prosentient.com.au> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |Needs Signoff Patch complexity|--- |Small patch -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27348 --- Comment #3 from David Cook <dcook@prosentient.com.au> --- Created attachment 114902 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=114902&action=edit 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" -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27348 David Cook <dcook@prosentient.com.au> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|koha-bugs@lists.koha-commun |dcook@prosentient.com.au |ity.org | -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27348 David Cook <dcook@prosentient.com.au> changed: What |Removed |Added ---------------------------------------------------------------------------- See Also| |https://bugs.koha-community | |.org/bugzilla3/show_bug.cgi | |?id=27267 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27348 David Cook <dcook@prosentient.com.au> changed: What |Removed |Added ---------------------------------------------------------------------------- Summary|Error defining |Error defining |INDEXER_PARAMS in |INDEXER_PARAMS in |/etc/default/koha |/etc/default/koha-common -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27348 --- Comment #4 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Shouldn't we add the quote for $ALTERNATE_INDEXER_DAEMON as well? It won't hurt :) -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27348 --- Comment #5 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Created attachment 114903 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=114903&action=edit Bug 27348: Fix test on ALTERNATE_INDEXER_DAEMON in koha-indexer -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27348 --- Comment #6 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- We should also use -z for the DEV_INSTALL test 208 if [ "$DEV_INSTALL" = "" ]; then For later... -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27348 --- Comment #7 from David Cook <dcook@prosentient.com.au> --- (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. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27348 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27348 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #114902|0 |1 is obsolete| | --- Comment #8 from David Nind <david@davidnind.com> --- Created attachment 121620 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=121620&action=edit 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> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27348 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #114903|0 |1 is obsolete| | --- Comment #9 from David Nind <david@davidnind.com> --- Created attachment 121621 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=121621&action=edit Bug 27348: Fix test on ALTERNATE_INDEXER_DAEMON in koha-indexer Signed-off-by: David Nind <david@davidnind.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27348 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Passed QA -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27348 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #121620|0 |1 is obsolete| | --- Comment #10 from Nick Clemens <nick@bywatersolutions.com> --- Created attachment 121861 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=121861&action=edit 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> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27348 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #121621|0 |1 is obsolete| | --- Comment #11 from Nick Clemens <nick@bywatersolutions.com> --- Created attachment 121862 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=121862&action=edit 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> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27348 Jonathan Druart <jonathan.druart+koha@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |Pushed to master Version(s)| |21.11.00 released in| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27348 --- Comment #12 from Jonathan Druart <jonathan.druart+koha@gmail.com> --- Pushed to master for 21.11, thanks to everybody involved! -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27348 Kyle M Hall <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Version(s)|21.11.00 |21.11.00,21.05.02 released in| | Status|Pushed to master |Pushed to stable CC| |kyle@bywatersolutions.com --- Comment #13 from Kyle M Hall <kyle@bywatersolutions.com> --- Pushed to 21.05.x for 21.05.02 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27348 Fridolin Somers <fridolin.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Version(s)|21.11.00,21.05.02 |21.11.00,21.05.02,20.11.09 released in| | Status|Pushed to stable |Pushed to oldstable CC| |fridolin.somers@biblibre.co | |m --- Comment #14 from Fridolin Somers <fridolin.somers@biblibre.com> --- Pushed to 20.11.x for 20.11.09 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27348 Victor Grousset/tuxayo <victor@tuxayo.net> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to oldstable |RESOLVED CC| |victor@tuxayo.net Resolution|--- |FIXED --- Comment #15 from Victor Grousset/tuxayo <victor@tuxayo.net> --- Not backported to oldoldstable (20.05.x). Feel free to ask if it's needed. -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org