[Bug 14361] New: koha-restart-zebra fails and probably breaks upgrade
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14361 Bug ID: 14361 Summary: koha-restart-zebra fails and probably breaks upgrade Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: NEW Severity: major Priority: P5 - low Component: Command-line Utilities Assignee: gmcharlt@gmail.com Reporter: benjamin.rokseth@kul.oslo.kommune.no QA Contact: testopia@bugs.koha-community.org Introduction of koha-functions bash lib (Bug 11404) have missed the need of specifying pidfiles directory on restarting/stopping zebra server. This might also affect Bug 12009 - Sometimes a koha-common restart won't restart zebra, and might break zebra index on update. Specs: The function is_zebra_running() (and possibly also is_indexer_running() ) will always return 1 (false) even if zebra is running. Thus a koha-restart-zebra/koha-stop-zebra will do nothing. Patch to come. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14361 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |tomascohen@gmail.com -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14361 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|gmcharlt@gmail.com |benjamin.rokseth@kul.oslo.k | |ommune.no -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14361 --- Comment #1 from Benjamin Rokseth <benjamin.rokseth@kul.oslo.kommune.no> --- Created attachment 39984 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=39984&action=edit Bug 14361 - koha-restart-zebra fails and probably breaks upgrade This patch fixes the koha-restart-zebra and koha-stop-zebra scripts by adding pidfiles folder to the test is_zebra_running. It also adds pidfiles to the test is_indexer_running so that koha-rebuild-zebra will work properly. Test plan: 1) check if zebrasrv is running, get pid of zebrasrv ps ax | grep zebrasrv 2) In my case, there was also a warning on the about.pl page on a fresh install: Error message from Zebra: 1011 (bad credentials) 3) try to restart zebra koha-restart-zebra instancename You will get a msg : Zebra does not appear to have been running for instancename Starting Zebra server for instancename 4) check again if zebrasrv is running ps ax | grep zebrasrv and see that pid has not changed, thus it is not restarted 5) Apply patch 6) repeat 4) and watch now how pid has changed If there was a warning on about.pl it should now be gone -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14361 Benjamin Rokseth <benjamin.rokseth@kul.oslo.kommune.no> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |Needs Signoff --- Comment #2 from Benjamin Rokseth <benjamin.rokseth@kul.oslo.kommune.no> --- Note that if using gitify or some other way to make a koha dev instance from a standard one, make sure that the referenced file : /usr/share/koha/bin/koha-functions.sh is updated also. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14361 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |katrin.fischer@bsz-bw.de, | |robin@catalyst.net.nz -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14361 Indranil Das Gupta <indradg@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |indradg@gmail.com -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14361 --- Comment #3 from Tomás Cohen Arazi <tomascohen@gmail.com> --- *** Bug 12009 has been marked as a duplicate of this bug. *** -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14361 Mason James <mtj@kohaaloha.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #39984|0 |1 is obsolete| | --- Comment #4 from Mason James <mtj@kohaaloha.com> --- Created attachment 40234 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=40234&action=edit Bug 14361 - koha-restart-zebra fails and probably breaks upgrade This patch fixes the koha-restart-zebra and koha-stop-zebra scripts by adding pidfiles folder to the test is_zebra_running. It also adds pidfiles to the test is_indexer_running so that koha-rebuild-zebra will work properly. Test plan: 1) check if zebrasrv is running, get pid of zebrasrv ps ax | grep zebrasrv 2) In my case, there was also a warning on the about.pl page on a fresh install: Error message from Zebra: 1011 (bad credentials) 3) try to restart zebra koha-restart-zebra instancename You will get a msg : Zebra does not appear to have been running for instancename Starting Zebra server for instancename 4) check again if zebrasrv is running ps ax | grep zebrasrv and see that pid has not changed, thus it is not restarted 5) Apply patch 6) repeat 4) and watch now how pid has changed If there was a warning on about.pl it should now be gone Signed-off-by: Mason James <mtj@kohaaloha.com> -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14361 Mason James <mtj@kohaaloha.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off CC| |mtj@kohaaloha.com --- Comment #5 from Mason James <mtj@kohaaloha.com> --- works perfectly!, tested on master branch -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14361 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #40234|0 |1 is obsolete| | --- Comment #6 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Created attachment 40235 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=40235&action=edit Bug 14361: koha-restart-zebra fails and probably breaks upgrade This patch fixes the koha-restart-zebra and koha-stop-zebra scripts by adding pidfiles folder to the test is_zebra_running. It also adds pidfiles to the test is_indexer_running so that koha-rebuild-zebra will work properly. Test plan: 1) check if zebrasrv is running, get pid of zebrasrv ps ax | grep zebrasrv 2) In my case, there was also a warning on the about.pl page on a fresh install: Error message from Zebra: 1011 (bad credentials) 3) try to restart zebra koha-restart-zebra instancename You will get a msg : Zebra does not appear to have been running for instancename Starting Zebra server for instancename 4) check again if zebrasrv is running ps ax | grep zebrasrv and see that pid has not changed, thus it is not restarted 5) Apply patch 6) repeat 4) and watch now how pid has changed If there was a warning on about.pl it should now be gone Signed-off-by: Mason James <mtj@kohaaloha.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Good catch Benjamin! It works as expected with the patch. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14361 Mason James <mtj@kohaaloha.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |rel_3_16_candidate, | |rel_3_18_candidate --- Comment #7 from Mason James <mtj@kohaaloha.com> --- This patch needs to be pulled to 3.16, 3.18 and 3.20 branches -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14361 Jonathan Druart <jonathan.druart@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jonathan.druart@biblibre.co | |m --- Comment #8 from Jonathan Druart <jonathan.druart@biblibre.com> --- Should I see the pid file with ps ax | grep zebrasrv ? Because I don't, with or without the patch. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14361 Mirko Tietgen <mirko@abunchofthings.net> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |mirko@abunchofthings.net --- Comment #9 from Mirko Tietgen <mirko@abunchofthings.net> --- *** Bug 14466 has been marked as a duplicate of this bug. *** -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14361 --- Comment #10 from Mirko Tietgen <mirko@abunchofthings.net> --- Does the indexer daemon use a pid file? When I wrote the patch for the duplicate bug I thought it does not, so I did not patch it. Also "Note that the --running option must appear before any --pidfile or --pidfiles option when checking if another user's daemon is running otherwise you might get an error about the pidfile directory not being writable." -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14361 --- Comment #11 from Benjamin Rokseth <benjamin.rokseth@kul.oslo.kommune.no> --- Jonathan, yes you should definitely see pidfile dir setting. ps ax | grep zebrasrv should give two hits: * the daemon process, which should give the active daemon flags, including --pidfiles=/var/run/koha/[instance]/ * the actual zebrasrv process, with the flags for the server. example: 1124 ? S 0:00 daemon --name=name-koha-zebra --pidfiles=/var/run/koha/name/ --errlog=/var/log/koha/name/zebra-error.log --stdout=/var/log/koha/name/zebra.log --output=/var/log/koha/name/zebra-output.log --verbose=1 --respawn --delay=30 --user=name-koha.name-koha -- zebrasrv -v none,fatal,warn -f /etc/koha/sites/name/koha-conf.xml 1136 ? S 0:00 zebrasrv -v none,fatal,warn -f /etc/koha/sites/name/koha-conf.xml if you don't see the --pidfiles=/var/run/koha/[instance]/, either the daemon is not running and/or the patch is not applied. koha-restart-zebra [instance] would attempt to restart daemon -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14361 --- Comment #12 from Benjamin Rokseth <benjamin.rokseth@kul.oslo.kommune.no> --- Mirko, yes zebra daemon uses a pidfile, which is placed in the koha pidfiles dir: ex.: (my instance is just called 'name') root@73107be4a833:~# cat /var/run/koha/name/name-koha-zebra.pid 1124 about the --running and order you seem to be right. I have not noticed any errors, but docs say so. Please feel free to adjust the patch. It is not pushed yet -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14361 --- Comment #13 from Mirko Tietgen <mirko@abunchofthings.net> --- What I mean is, there is no --pidfiles used in koha-indexer, while in koha-start-zebra, it is. The latter being the reason why is_zebra_running did not work. I suppose it does not matter for is_indexer_running, but I have not tried. My patch is on Bug 14466. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14361 M. Tompsett <mtompset@hotmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |mtompset@hotmail.com --- Comment #14 from M. Tompsett <mtompset@hotmail.com> --- I'm not sure about 3.16.x -- I have QA system running 3.16.{can't remember what} which does not have --pidfiles in the daemon ps list. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14361 Agnes Rivers-Moore <arm@hanover.ca> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |arm@hanover.ca -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14361 Mason James <mtj@kohaaloha.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords|rel_3_16_candidate | --- Comment #15 from Mason James <mtj@kohaaloha.com> --- (In reply to M. Tompsett from comment #14)
I'm not sure about 3.16.x -- I have QA system running 3.16.{can't remember what} which does not have --pidfiles in the daemon ps list.
confirmed, its not needed for 3.16 :) -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14361 Mason James <mtj@kohaaloha.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Priority|P5 - low |P3 -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14361 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Passed QA -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14361 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |Pushed to Master --- Comment #16 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Patch pushed to master. Thanks Benjamin! -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14361 Liz Rea <liz@catalyst.net.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |liz@catalyst.net.nz --- Comment #17 from Liz Rea <liz@catalyst.net.nz> --- Pushed to 3.18.x will be in 3.18.11 -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14361 Chris Cormack <chris@bigballofwax.co.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to Master |Pushed to Stable CC| |chris@bigballofwax.co.nz --- Comment #18 from Chris Cormack <chris@bigballofwax.co.nz> --- Pushed to 3.20.x will be in 3.20.4 -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14361 Agnes Rivers-Moore <arm@hanover.ca> changed: What |Removed |Added ---------------------------------------------------------------------------- CC|arm@hanover.ca | -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14361 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Component|Command-line Utilities |Packaging -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14361 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Component|Packaging |Command-line Utilities -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14361 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Summary|koha-restart-zebra fails |koha-restart-zebra fails |and probably breaks upgrade | -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org