[Bug 17376] New: rebuild_zebra.pl in daemon mode no database access kills the process
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17376 Bug ID: 17376 Summary: rebuild_zebra.pl in daemon mode no database access kills the process 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: fridolin.somers@biblibre.com QA Contact: testopia@bugs.koha-community.org CC: robin@catalyst.net.nz When running rebuild_zebra.pl in daemon mode, a while loop runs the script for ever. But if something crashes inside the rebuild process, the all daemon crashes. For example when it can not access database. This problem may be temporary so daemon should keep running. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17376 Fridolin SOMERS <fridolin.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|gmcharlt@gmail.com |fridolin.somers@biblibre.co | |m -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17376 --- Comment #1 from Fridolin SOMERS <fridolin.somers@biblibre.com> --- Created attachment 55930 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=55930&action=edit Bug 17376 - rebuild_zebra.pl in daemon mode no database access kills the process When running rebuild_zebra.pl in daemon mode, a while loop runs the script for ever. But if something crashes inside the rebuild process, the all daemon crashes. For example when it can not access database. This problem may be temporary so daemon should keep running. This patch add eval around the rebuild process to allow a run to fail without killing the daemon. Also moves the DB handler get inside daemon loop because it is broken is DB stoppes. This is a big issue for indexer running in a systemd service. Test plan : - run rebuild_zebra.pl in daemon mode : /home/koha/src/misc/migration_tools/rebuild_zebra.pl -daemon -z -a -b -x --sleep 30 - stop the database - wait a minute => you see an error on database connexion => the daemon is still running - restart the database - test the indexer by creating a new record (wait for a minute) -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17376 Fridolin SOMERS <fridolin.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17376 Fridolin SOMERS <fridolin.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Patch complexity|--- |Trivial patch -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17376 Jacek Ablewicz <abl@biblos.pk.edu.pl> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |abl@biblos.pk.edu.pl -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17376 Jacek Ablewicz <ablewicz@gmail.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=17376 Jacek Ablewicz <ablewicz@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #55930|0 |1 is obsolete| | --- Comment #2 from Jacek Ablewicz <ablewicz@gmail.com> --- Created attachment 55938 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=55938&action=edit Bug 17376 - rebuild_zebra.pl in daemon mode no database access kills the process When running rebuild_zebra.pl in daemon mode, a while loop runs the script for ever. But if something crashes inside the rebuild process, the all daemon crashes. For example when it can not access database. This problem may be temporary so daemon should keep running. This patch add eval around the rebuild process to allow a run to fail without killing the daemon. Also moves the DB handler get inside daemon loop because it is broken is DB stoppes. This is a big issue for indexer running in a systemd service. Test plan : - run rebuild_zebra.pl in daemon mode : /home/koha/src/misc/migration_tools/rebuild_zebra.pl -daemon -z -a -b -x --sleep 30 - stop the database - wait a minute => you see an error on database connexion => the daemon is still running - restart the database - test the indexer by creating a new record (wait for a minute) Signed-off-by: Jacek Ablewicz <abl@biblos.pk.edu.pl> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17376 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jonathan.druart@bugs.koha-c | |ommunity.org --- Comment #3 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- The error "Can't connect to local MySQL server through socket" will be output to stderr anyway (regardless $verbose). Is it expected? -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17376 Claudio <costalc@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |costalc@gmail.com -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17376 --- Comment #4 from Fridolin SOMERS <fridolin.somers@biblibre.com> --- (In reply to Jonathan Druart from comment #3)
The error "Can't connect to local MySQL server through socket" will be output to stderr anyway (regardless $verbose). Is it expected?
Yes I think this is better to know it does not work. This log will end in daemon.log or journalctl -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17376 Jonathan Druart <jonathan.druart@bugs.koha-community.org> 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=17376 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #55938|0 |1 is obsolete| | --- Comment #5 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Created attachment 56774 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=56774&action=edit Bug 17376 - rebuild_zebra.pl in daemon mode no database access kills the process When running rebuild_zebra.pl in daemon mode, a while loop runs the script for ever. But if something crashes inside the rebuild process, the all daemon crashes. For example when it can not access database. This problem may be temporary so daemon should keep running. This patch add eval around the rebuild process to allow a run to fail without killing the daemon. Also moves the DB handler get inside daemon loop because it is broken is DB stoppes. This is a big issue for indexer running in a systemd service. Test plan : - run rebuild_zebra.pl in daemon mode : /home/koha/src/misc/migration_tools/rebuild_zebra.pl -daemon -z -a -b -x --sleep 30 - stop the database - wait a minute => you see an error on database connexion => the daemon is still running - restart the database - test the indexer by creating a new record (wait for a minute) Signed-off-by: Jacek Ablewicz <abl@biblos.pk.edu.pl> Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17376 Kyle M Hall <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |Pushed to Master CC| |kyle@bywatersolutions.com --- Comment #6 from Kyle M Hall <kyle@bywatersolutions.com> --- Pushed to master for 16.11, thanks Frido! -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17376 Frédéric Demians <frederic@tamil.fr> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |frederic@tamil.fr Status|Pushed to Master |Pushed to Stable --- Comment #7 from Frédéric Demians <frederic@tamil.fr> --- Pushed in 16.05. Will be in 16.05.06. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17376 Julian Maurice <julian.maurice@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |julian.maurice@biblibre.com --- Comment #8 from Julian Maurice <julian.maurice@biblibre.com> --- Pushed to 3.22.x, will be in 3.22.13 -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org