[Bug 10159] New: koha-rebuild-zebra error handling
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10159 Bug ID: 10159 Summary: koha-rebuild-zebra error handling Classification: Unclassified Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: NEW Severity: normal Priority: P5 - low Component: Packaging Assignee: koha-bugs@lists.koha-community.org Reporter: tomascohen@gmail.com CC: robin@catalyst.net.nz koha-rebuild-zebra should check stuff like if the instance exists, parameters like -a/-b that should make the DB being reindexed twice and handle errors gracefuly. -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10159 --- Comment #1 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Created attachment 17846 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=17846&action=edit Bug 10159 - koha-rebuild-zebra error handling This patch makes koha-rebuild-zebra: - Check for the existence of the instance - Handle arbitrary amount of instance parameters - Capture -a and -b (which made the script rebuild twice the chosen DB). It adds the extended version (--authorities and --biblios respectively) of the option switch. This makes the -a and -b switches work as "only do authorities" (or viceversa). They can be used concurrently, which is the default behaviour when no switch is provided. - Handle -v (and --verbose) as koha-rebuild-zebra options, to ease the use for non-techie users. - The rebuild_zebra.pl is wrapped inside an IF to return error values if we ever make rebuild_zebra.pl return error codes (this is pointed in the code). - Added -h/--help switches and an 'usage' output :-D Please provide patches for any wording issues, or contact me to fix it. To test: - Apply the patch and create your packages (or just use the script from your branch) - Run it in this scenarios / options - -h/--help to see the available option switches - Mix them with one or more instances, of which some could be fake - try -a/--authorities and -b/--biblios in all possible combinations - try -v/--verbose works Regards To+ Sponsored-by: Universidad Nacional de Córdoba -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10159 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |Needs Signoff Patch complexity|--- |Small patch Blocks| |4876 Change sponsored?|--- |Sponsored -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10159 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=10159 Owen Leonard <oleonard@myacpl.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|koha-bugs@lists.koha-commun |tomascohen@gmail.com |ity.org | -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10159 Robin Sheat <robin@catalyst.net.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #17846|0 |1 is obsolete| | --- Comment #2 from Robin Sheat <robin@catalyst.net.nz> --- Created attachment 18105 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=18105&action=edit Bug 10159 - koha-rebuild-zebra error handling This patch makes koha-rebuild-zebra: - Check for the existence of the instance - Handle arbitrary amount of instance parameters - Capture -a and -b (which made the script rebuild twice the chosen DB). It adds the extended version (--authorities and --biblios respectively) of the option switch. This makes the -a and -b switches work as "only do authorities" (or viceversa). They can be used concurrently, which is the default behaviour when no switch is provided. - Handle -v (and --verbose) as koha-rebuild-zebra options, to ease the use for non-techie users. - The rebuild_zebra.pl is wrapped inside an IF to return error values if we ever make rebuild_zebra.pl return error codes (this is pointed in the code). - Added -h/--help switches and an 'usage' output :-D Please provide patches for any wording issues, or contact me to fix it. To test: - Apply the patch and create your packages (or just use the script from your branch) - Run it in this scenarios / options - -h/--help to see the available option switches - Mix them with one or more instances, of which some could be fake - try -a/--authorities and -b/--biblios in all possible combinations - try -v/--verbose works Regards To+ Sponsored-by: Universidad Nacional de Córdoba Signed-off-by: Robin Sheat <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=10159 Robin Sheat <robin@catalyst.net.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10159 Robin Sheat <robin@catalyst.net.nz> 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=10159 --- Comment #3 from Jared Camins-Esakov <jcamins@cpbibliography.com> --- There is one (maybe) problem with this patch, but as it already exists as far as I can tell, I am going to push the patch as-is for 3.12.0: koha-rebuild-zebra does not check if an instance is disabled before reindexing. Arguably it should. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10159 Jared Camins-Esakov <jcamins@cpbibliography.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |Pushed to Master --- Comment #4 from Jared Camins-Esakov <jcamins@cpbibliography.com> --- This patch has been pushed to master and 3.12.x. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10159 --- Comment #5 from Robin Sheat <robin@catalyst.net.nz> --- (In reply to comment #3)
There is one (maybe) problem with this patch, but as it already exists as far as I can tell, I am going to push the patch as-is for 3.12.0: koha-rebuild-zebra does not check if an instance is disabled before reindexing. Arguably it should.
Specifically it shouldn't. If I'm recovering an instance where the indices have broken, I'll put it into maintenance mode by disabling it while I reindex rather than have people have issues with a half-working system. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10159 --- Comment #6 from Jared Camins-Esakov <jcamins@cpbibliography.com> --- (In reply to comment #5)
(In reply to comment #3)
There is one (maybe) problem with this patch, but as it already exists as far as I can tell, I am going to push the patch as-is for 3.12.0: koha-rebuild-zebra does not check if an instance is disabled before reindexing. Arguably it should.
Specifically it shouldn't. If I'm recovering an instance where the indices have broken, I'll put it into maintenance mode by disabling it while I reindex rather than have people have issues with a half-working system.
Fair enough. However, it might be worth noting that in the help, as all the other Zebra scripts do not do anything when the instance is disabled. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10159 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |10259 -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10159 Bernardo Gonzalez Kriegel <bgkriegel@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |bgkriegel@gmail.com --- Comment #7 from Bernardo Gonzalez Kriegel <bgkriegel@gmail.com> --- Pushed to 3.10.x, will be in 3.10.7 -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10159 Chris Hall <chrish@catalyst.net.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to Master |Pushed to Stable CC| |chrish@catalyst.net.nz --- Comment #8 from Chris Hall <chrish@catalyst.net.nz> --- Pushed to 3.8.x, will be in 3.8.14 -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org