[Bug 7857] New: database upgrade fails with plack
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=7857 Priority: P5 - low Change sponsored?: --- Bug ID: 7857 Assignee: gmcharlt@gmail.com Summary: database upgrade fails with plack QA Contact: koha.sekjal@gmail.com Severity: enhancement Classification: Unclassified OS: All Reporter: dpavlin@rot13.org Hardware: All Status: NEW Version: master Component: Architecture, internals, and plumbing Product: Koha -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=7857 Dobrica Pavlinusic <dpavlin@rot13.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |ASSIGNED Blocks| |7172 Assignee|gmcharlt@gmail.com |dpavlin@rot13.org -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=7857 --- Comment #1 from Dobrica Pavlinusic <dpavlin@rot13.org> --- Created attachment 8726 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=8726&action=edit Bug 7857 - database upgrade fails with plack Updating database structure Update errors : Can't locate C4/Context.pm in @INC (@INC contains: /etc/perl /usr/local/lib/perl/5.10.1 /usr/local/share/perl/5.10.1 /usr/lib/perl5 /usr/share/perl5 /usr/lib/perl/5.10 /usr/share/perl/5.10 /usr/local/lib/site_perl /usr/local/lib/perl/5.10.0 /usr/local/share/perl/5.10.0 .) at /srv/koha/installer/data/mysql/updatedatabase.pl line 37. BEGIN failed--compilation aborted at /srv/koha/installer/data/mysql/updatedatabase.pl line 37. It seems that plack cleans enviroment, so we have to re-instart PERL5LIB so script invocation won't fail. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=7857 Dobrica Pavlinusic <dpavlin@rot13.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #8726|0 |1 is obsolete| | --- Comment #2 from Dobrica Pavlinusic <dpavlin@rot13.org> --- Created attachment 8729 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=8729&action=edit Bug 7857 - database upgrade fails with plack Updating database structure Update errors : Can't locate C4/Context.pm in @INC (@INC contains: /etc/perl /usr/local/lib/perl/5.10.1 /usr/local/share/perl/5.10.1 /usr/lib/perl5 /usr/share/perl5 /usr/lib/perl/5.10 /usr/share/perl/5.10 /usr/local/lib/site_perl /usr/local/lib/perl/5.10.0 /usr/local/share/perl/5.10.0 .) at /srv/koha/installer/data/mysql/updatedatabase.pl line 37. BEGIN failed--compilation aborted at /srv/koha/installer/data/mysql/updatedatabase.pl line 37. It seems that plack cleans enviroment, so we have to re-instart PERL5LIB so script invocation won't fail. It also fixes exit 1 which fail with plack. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=7857 Dobrica Pavlinusic <dpavlin@rot13.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|ASSIGNED |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=7857 --- Comment #3 from Dobrica Pavlinusic <dpavlin@rot13.org> --- At end of upgrade you need to manually restart plack since C4::Context is keeping cache of sysprefs and database upgrade insert to new version from updatedatabase.pl get ignored. This will be fixed in separate bug. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=7857 Chris Cormack <chris@bigballofwax.co.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |chris@bigballofwax.co.nz --- Comment #4 from Chris Cormack <chris@bigballofwax.co.nz> --- Thats actually a general syspref issue it either needs to be a true global cache (shared between threads) or an external store like reddis or memcached. And flushed on change. There are quite a few gotchas like this. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=7857 Dobrica Pavlinusic <dpavlin@rot13.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |In Discussion --- Comment #5 from Dobrica Pavlinusic <dpavlin@rot13.org> --- This problem could be solved with simple Koha::SysPrefs which would wrap systempreferences table into intelligent caching. But rest of code would benefit from simple our $cache per-request cache which is safe from cache invalidation problems. Then we could start pushing it to memcache (after we flush all invalidation issues), but from my profiling so far, it seems biggest low-hanging fruit is caching within single request based on Bug 7177 This is next think I plan to work on, after all quirks with plack are cleaned up. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=7857 --- Comment #6 from Dobrica Pavlinusic <dpavlin@rot13.org> --- Created attachment 8912 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=8912&action=edit Bug 7857 - invalidate cached preferences after SetVersion This allows plack to correctly move to login page after database upgrade -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=7857 Dobrica Pavlinusic <dpavlin@rot13.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|In Discussion |Needs Signoff --- Comment #7 from Dobrica Pavlinusic <dpavlin@rot13.org> --- It turns out that we already have method to invoke cache invalidation so call to it is provided as second patch. I think this change is generally useful for all Koha versions, so I'm providing it as separate patch so it can be applied to older versions if needed. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=7857 Paul Poulain <paul.poulain@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #8729|0 |1 is obsolete| | --- Comment #8 from Paul Poulain <paul.poulain@biblibre.com> --- Created attachment 9888 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=9888&action=edit Bug 7857 - database upgrade fails with plack Updating database structure Update errors : Can't locate C4/Context.pm in @INC (@INC contains: /etc/perl /usr/local/lib/perl/5.10.1 /usr/local/share/perl/5.10.1 /usr/lib/perl5 /usr/share/perl5 /usr/lib/perl/5.10 /usr/share/perl/5.10 /usr/local/lib/site_perl /usr/local/lib/perl/5.10.0 /usr/local/share/perl/5.10.0 .) at /srv/koha/installer/data/mysql/updatedatabase.pl line 37. BEGIN failed--compilation aborted at /srv/koha/installer/data/mysql/updatedatabase.pl line 37. It seems that plack cleans enviroment, so we have to re-instart PERL5LIB so script invocation won't fail. It also fixes exit 1 which fail with plack. Signed-off-by: Paul Poulain <paul.poulain@biblibre.com> -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=7857 Paul Poulain <paul.poulain@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off CC| |paul.poulain@biblibre.com --- Comment #9 from Paul Poulain <paul.poulain@biblibre.com> --- Patch Bug 7857 - database upgrade fails with plack signed off, please QA. The patch "Bug 7857 - invalidate cached preferences after SetVersion" should be put "in discussion". Plus there is a CHI cache management that should hit Koha very soon, that could make the discussion obsolete -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=7857 Jonathan Druart <jonathan.druart@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jonathan.druart@biblibre.co | |m QA Contact|koha.sekjal@gmail.com |jonathan.druart@biblibre.co | |m -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=7857 --- Comment #10 from Jonathan Druart <jonathan.druart@biblibre.com> --- I don't know if it's normal but I have another error : Can't locate InstallAuth.pm in @INC (@INC contains: /home/koha/src /etc/perl /usr/local/lib/perl/5.14.2 /usr/local/share/perl/5.14.2 /usr/lib/perl5 /usr/share/perl5 /usr/lib/perl/5.14 /usr/share/perl/5.14 /usr/local/lib/site_perl .) at /home/koha/src/installer/install.pl line 7. BEGIN failed--compilation aborted at /home/koha/src/installer/install.pl line 7 (#1) I start plack like this: KOHA_CONF=/home/koha/etc/koha-conf.xml PERL5LIB=/home/koha/src; plackup --reload intranet.psgi --port=5001 I don't get this error if I start like: KOHA_CONF=/home/koha/etc/koha-conf.xml PERL5LIB=/home/koha/src:/home/koha/src/installer plackup --reload intranet.psgi --port=5001 But it it that we want ? -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=7857 --- Comment #11 from Jonathan Druart <jonathan.druart@biblibre.com> --- Replace last sentence with: But is it what we want ? -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=7857 --- Comment #12 from Dobrica Pavlinusic <dpavlin@rot13.org> --- No, of course not :-) There is hidden -Iinstaller include in Bug 7844 - plack scripts for developers thanks for catching that! -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=7857 --- Comment #13 from Dobrica Pavlinusic <dpavlin@rot13.org> --- Created attachment 10287 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=10287&action=edit Bug 7857 - database upgrade fails with plack This patch fixes PERL5LIB path injection to include installer dir which is required -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=7857 Dobrica Pavlinusic <dpavlin@rot13.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #10287|Bug-7857---database-upgrade |Bug-7857-PERL5LIB-followup. filename|-fails-with-plack.patch |patch Attachment #10287|Bug 7857 - database upgrade |Bug 7857 - fix PERL5LIB description|fails with plack |followup -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=7857 Jonathan Druart <jonathan.druart@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #10287|0 |1 is obsolete| | --- Comment #14 from Jonathan Druart <jonathan.druart@biblibre.com> --- Created attachment 10345 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=10345&action=edit Bug 7857 - [SIGNED-OFF] database upgrade fails with plack This patch fixes PERL5LIB path injection to include installer dir which is required Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com> -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=7857 Jonathan Druart <jonathan.druart@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Passed QA --- Comment #15 from Jonathan Druart <jonathan.druart@biblibre.com> --- Last patch is trivial and makes sense. I passed QA these 3 patchs. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=7857 Paul Poulain <paul.poulain@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |Pushed to Master Version|master |rel_3_8 -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=7857 --- Comment #16 from Paul Poulain <paul.poulain@biblibre.com> --- (In reply to comment #3)
At end of upgrade you need to manually restart plack since C4::Context is keeping cache of sysprefs and database upgrade insert to new version from updatedatabase.pl get ignored.
This will be fixed in separate bug.
Hi Dobrica, is this problem solved somewhere ? because it's still here... -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=7857 Paul Poulain <paul.poulain@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Severity|enhancement |normal -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=7857 --- Comment #17 from Jared Camins-Esakov <jcamins@cpbibliography.com> --- (In reply to comment #16)
(In reply to comment #3)
At end of upgrade you need to manually restart plack since C4::Context is keeping cache of sysprefs and database upgrade insert to new version from updatedatabase.pl get ignored.
This will be fixed in separate bug.
Hi Dobrica,
is this problem solved somewhere ? because it's still here...
Paul, You have to disable the syspref cache, as I made possible with bug 9005. There is no other way to deal with this at present. The solution -- to the extent that there is one -- is to use an update API (like in the non-linear updates bug) which handles syspref updating via C4::Context, and then if you're using a single-threaded Plack server it will work. As you know, it is my assertion that the syspref cache should always be disabled with PSGI. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=7857 Chris Cormack <chris@bigballofwax.co.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to Master |RESOLVED Resolution|--- |FIXED --- Comment #18 from Chris Cormack <chris@bigballofwax.co.nz> --- Released in 3.10.0 -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org