[Bug 14993] New: rebuild_zebra.pl, when recreating Zebra-directory structure, mkdir doesn't fail/error/die
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14993 Bug ID: 14993 Summary: rebuild_zebra.pl, when recreating Zebra-directory structure, mkdir doesn't fail/error/die Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: NEW Severity: enhancement Priority: P5 - low Component: Searching Assignee: gmcharlt@gmail.com Reporter: olli-antti.kivilahti@jns.fi QA Contact: testopia@bugs.koha-community.org This is due to implicit perl programming. Avoid doing this! mkdir $bdir || die "Error $!"; TO REPLICATE: 1. rm -r /home/koha/koha-dev/var/lib/zebradb (or whatever your zebradb location is) 2. run rebuild_zebra.pl -b -a -r -x -v 3. Observe how rebuild_zebra.pl tells that it has rebuilt all the missing directories. 4. cd /home/koha/koha-dev/var/lib/zebradb/biblios 5. No such directory??? 6. You wait for several hours to reindex your zebradb to find that nothing works :( AFTER THIS PATCH: 1. rm -r /home/koha/koha-dev/var/lib/zebradb (or whatever your zebradb location is) 2. run rebuild_zebra.pl -b -a -r -x -v 3. Observe how rebuild_zebra.pl tells that it couldn't create missing directories. A (possibly) better fix would be to recreate the top two directories from the path, but no point patching a dead horse, since ElasticSearch will be here soon :) -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14993 --- Comment #1 from Olli-Antti Kivilahti <olli-antti.kivilahti@jns.fi> --- Created attachment 43293 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=43293&action=edit Bug 14993 - rebuild_zebra.pl, when recreating Zebra-directory structure, mkdir doesn't fail/error/die This is due to implicit perl programming. Avoid doing this! mkdir $bdir || die "Error $!"; TO REPLICATE: 1. rm -r /home/koha/koha-dev/var/lib/zebradb (or whatever your zebradb location is) 2. run rebuild_zebra.pl -b -a -r -x -v 3. Observe how rebuild_zebra.pl tells that it has rebuilt all the missing directories. 4. cd /home/koha/koha-dev/var/lib/zebradb/biblios 5. No such directory??? 6. You wait for several hours to reindex your zebradb to find that nothing works :( AFTER THIS PATCH: 1. rm -r /home/koha/koha-dev/var/lib/zebradb (or whatever your zebradb location is) 2. run rebuild_zebra.pl -b -a -r -x -v 3. Observe how rebuild_zebra.pl tells that it couldn't create missing directories. A (possibly) better fix would be to recreate the top two directories from the path, but no point patching a dead horse, since ElasticSearch will be here soon :) -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14993 Olli-Antti Kivilahti <olli-antti.kivilahti@jns.fi> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14993 --- Comment #2 from M. Tompsett <mtompset@hotmail.com> --- Comment on attachment 43293 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=43293 Bug 14993 - rebuild_zebra.pl, when recreating Zebra-directory structure, mkdir doesn't fail/error/die Review of attachment 43293: --> (http://bugs.koha-community.org/bugzilla3/page.cgi?id=splinter.html&bug=14993&attachment=43293) ----------------------------------------------------------------- ::: misc/migration_tools/rebuild_zebra.pl @@ -305,4 @@
my $bdir = $base . $dir; if (! -d $bdir) { $needed_repairing = 1; - mkdir $bdir || die "Unable to create '$bdir': $!\n";
oh my! What a nasty glob'ing issue. Thanks for this fix. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14993 Olli-Antti Kivilahti <olli-antti.kivilahti@jns.fi> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|gmcharlt@gmail.com |olli-antti.kivilahti@jns.fi -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org