[Bug 17240] New: Allow processes that rely on background jobs run in Plack mode
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17240 Bug ID: 17240 Summary: Allow processes that rely on background jobs run in Plack mode Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: NEW Severity: normal Priority: P5 - low Component: Architecture, internals, and plumbing Assignee: gmcharlt@gmail.com Reporter: fridolin.somers@biblibre.com QA Contact: testopia@bugs.koha-community.org Since Plack mode (PSGI), the processes running with background jobs are broken. Bug 15218 corrected by using CGI mode for concerned pages. This patch proposes to allow running those pages in PSGI mode by disabling background jobs when PSGI is used. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17240 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=17240 --- Comment #1 from Fridolin SOMERS <fridolin.somers@biblibre.com> --- Created attachment 55110 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=55110&action=edit Bug 17240 - Allow processes that rely on background jobs run in Plack mode This adds prepares the main one by adding method "is_psgi" to C4::Context and using it in about.pl Test plan : - On a Koha running with Plack - Go to about.pl - Look at line "PGSI:" => You should see "Plack" -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17240 --- Comment #2 from Fridolin SOMERS <fridolin.somers@biblibre.com> --- Created attachment 55111 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=55111&action=edit Bug 17240 - Allow processes that rely on background jobs run in Plack mode - prepare This adds prepares the main one by adding method "is_psgi" to C4::Context and using it in about.pl Test plan : - On a Koha running with Plack - Go to about.pl - Look at line "PGSI:" => You should see "Plack" -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17240 Fridolin SOMERS <fridolin.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #55110|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17240 Fridolin SOMERS <fridolin.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- See Also| |https://bugs.koha-community | |.org/bugzilla3/show_bug.cgi | |?id=15032 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17240 Fridolin SOMERS <fridolin.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Depends on| |15218 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15218 [Bug 15218] Make processes that rely on background jobs run in CGI mode -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17240 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |m.de.rooy@rijksmuseum.nl -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17240 Fridolin SOMERS <fridolin.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #55111|0 |1 is obsolete| | --- Comment #3 from Fridolin SOMERS <fridolin.somers@biblibre.com> --- Created attachment 55129 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=55129&action=edit Bug 17240 - Allow processes that rely on background jobs run in Plack mode - prepare This adds prepares the main one by adding method "is_psgi" to C4::Context and using it in C4::Auth for all templates. It is used by about.pl and Koha::AuthUtils. Test plan : - On a Koha running with Plack - Go to about.pl - Look at line "PGSI:" => You should see "Plack" - Enable CAS authentication - Go to OPAC auth page - Look at the CAS link => You see the current page in this URL -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17240 --- Comment #4 from Fridolin SOMERS <fridolin.somers@biblibre.com> --- Created attachment 55130 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=55130&action=edit Bug 17240 - Allow processes that rely on background jobs run in Plack mode Since Plack mode (PSGI), the processes running with background jobs are broken. Bug 15218 corrected by using CGI mode for concerned pages. This patch proposes to allow running those pages in PSGI mode by disabling background jobs when PSGI is used. Script are running so faster with Plack, there are less chances that the process will end in HTTP timeout. Test plan : - on a Koha running with plack - revert Bug 15218 changes - test processes on pages : offline_circ/process_koc.pl tools/batchMod-edit.pl tools/batch_record_modification.pl tools/manage-marc-import.pl tools/stage-marc-import.pl tools/upload-images.pl -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17240 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=17240 Fridolin SOMERS <fridolin.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |christophe.croullebois@bibl | |ibre.com -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17240 Fridolin SOMERS <fridolin.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Patch complexity|--- |Small patch -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17240 Fridolin SOMERS <fridolin.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #55129|0 |1 is obsolete| | --- Comment #5 from Fridolin SOMERS <fridolin.somers@biblibre.com> --- Created attachment 55137 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=55137&action=edit Bug 17240 - Allow processes that rely on background jobs run in Plack mode - prepare This adds prepares the main one by adding method "is_psgi" to C4::Context and using it in C4::Auth for all templates. It is used by about.pl and Koha::AuthUtils. Test plan : - On a Koha running with Plack - Go to about.pl - Look at line "PGSI:" => You should see "Plack" - Enable CAS authentication - Go to OPAC auth page - Look at the CAS link => You see the current page in this URL -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17240 Fridolin SOMERS <fridolin.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #55130|0 |1 is obsolete| | --- Comment #6 from Fridolin SOMERS <fridolin.somers@biblibre.com> --- Created attachment 55138 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=55138&action=edit Bug 17240 - Allow processes that rely on background jobs run in Plack mode Since Plack mode (PSGI), the processes running with background jobs are broken. Bug 15218 corrected by using CGI mode for concerned pages. This patch proposes to allow running those pages in PSGI mode by disabling background jobs when PSGI is used. Script are running so faster with Plack, there are less chances that the process will end in HTTP timeout. Test plan : - on a Koha running with plack - revert Bug 15218 changes - test processes on pages : offline_circ/process_koc.pl tools/batchMod-edit.pl tools/batch_record_modification.pl tools/manage-marc-import.pl tools/stage-marc-import.pl tools/upload-images.pl -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17240 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jonathan.druart@bugs.koha-c | |ommunity.org --- Comment #7 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Not sure it makes sense to disable the background mode. Did you try and edit 100k bibliographic records or items or patrons? -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17240 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |tomascohen@gmail.com Status|Needs Signoff |In Discussion --- Comment #8 from Tomás Cohen Arazi <tomascohen@gmail.com> --- I don't agree with the proposed solution (we should make it work). But I love the first patch, it should have it's own bug, something like "Add C4::Context->is_psgi" in the title :-D -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17240 --- Comment #9 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- We should probably remove all fork calls. Resolve it with an ajax call (like the upload in one of these scripts) or via a queue serviced by some daemon. In general, it seems better to prevent starting jobs directly by the web interface. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17240 --- Comment #10 from Fridolin SOMERS <fridolin.somers@biblibre.com> --- (In reply to Jonathan Druart from comment #7)
Not sure it makes sense to disable the background mode. Did you try and edit 100k bibliographic records or items or patrons?
(In reply to Tomás Cohen Arazi from comment #8)
I don't agree with the proposed solution (we should make it work).
But since in PSGI mode it is broken, why not make it work quickly ? A revamping may take a while. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17240 --- Comment #11 from Fridolin SOMERS <fridolin.somers@biblibre.com> --- Created attachment 55257 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=55257&action=edit Bug 17240 - Allow processes that rely on background jobs run in Plack mode - followup Followup If not running in background mode, some calls are made on $job var. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17240 --- Comment #12 from Fridolin SOMERS <fridolin.somers@biblibre.com> --- Created attachment 58461 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=58461&action=edit Bug 17240 - Allow processes that rely on background jobs run in Plack mode - followup 2 Followup 2 If not running in background mode, some calls are made on $job var in tools/batch_record_modification.pl. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17240 --- Comment #13 from Fridolin SOMERS <fridolin.somers@biblibre.com> --- I should split this into several bugs. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17240 Fridolin SOMERS <fridolin.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- See Also| |https://bugs.koha-community | |.org/bugzilla3/show_bug.cgi | |?id=18343 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17240 --- Comment #14 from Fridolin SOMERS <fridolin.somers@biblibre.com> --- Created attachment 63291 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=63291&action=edit Bug 17240 - Allow processes that rely on background jobs run in Plack mode - followup 3 Followup 3 If not running in background mode, items are not displayed in result page in tools/batchMod.pl. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17240 Fridolin SOMERS <fridolin.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #63291|0 |1 is obsolete| | --- Comment #15 from Fridolin SOMERS <fridolin.somers@biblibre.com> --- Created attachment 63459 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=63459&action=edit Bug 17240 - Allow processes that rely on background jobs run in Plack mode - followup 3 Followup 3 If not running in background mode, items are not displayed in result page in tools/batchMod.pl. Also the number of items and fields are missing in message. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17240 Fridolin SOMERS <fridolin.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #63459|0 |1 is obsolete| | --- Comment #16 from Fridolin SOMERS <fridolin.somers@biblibre.com> --- Created attachment 63862 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=63862&action=edit Bug 17240 - Allow processes that rely on background jobs run in Plack mode - followup 3 Followup 3 If not running in background mode, items are not displayed in result page in tools/batchMod.pl. Also the number of items and fields are missing in message. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17240 Fridolin SOMERS <fridolin.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- See Also| |https://bugs.koha-community | |.org/bugzilla3/show_bug.cgi | |?id=18757 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17240 Fiona Borthwick <fiona.borthwick@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |fiona.borthwick@ptfs-europe | |.com -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17240 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- See Also| |https://bugs.koha-community | |.org/bugzilla3/show_bug.cgi | |?id=20342 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17240 --- Comment #17 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Sounds like they are running under plack already, our apache2 config looks wrong With: ProxyPass "/cgi-bin/koha/tools/batch_record_modification.pl" "!" I see logs in plack log files With: ProxyPass "/intranet/tools/batch_record_modification.pl" "!" I see them in apache log files -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17240 Fridolin SOMERS <fridolin.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #55137|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17240 Fridolin SOMERS <fridolin.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #63862|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17240 Fridolin SOMERS <fridolin.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #58461|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17240 Fridolin SOMERS <fridolin.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #55257|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17240 Fridolin SOMERS <fridolin.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #55138|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17240 --- Comment #18 from Fridolin SOMERS <fridolin.somers@biblibre.com> --- Created attachment 76477 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=76477&action=edit Bug 17240: (prepare) Allow processes that rely on background jobs run in Plack mode This adds prepares the main one by adding method "is_psgi" to C4::Context and using it in C4::Auth for all templates. It is used by about.pl and Koha::AuthUtils. Test plan : - On a Koha running with Plack - Go to about.pl - Look at line "PGSI:" => You should see "Plack" - Enable CAS authentication - Go to OPAC auth page - Look at the CAS link => You see the current page in this URL -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17240 --- Comment #19 from Fridolin SOMERS <fridolin.somers@biblibre.com> --- Created attachment 76478 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=76478&action=edit Bug 17240: Allow processes that rely on background jobs run in Plack mode Since Plack mode (PSGI), the processes running with background jobs are broken. Bug 15218 corrected by using CGI mode for concerned pages. This patch proposes to allow running those pages in PSGI mode by disabling background jobs when PSGI is used. Script are running so faster with Plack, there are less chances that the process will end in HTTP timeout. Test plan : - on a Koha running with plack - revert Bug 15218 changes - test processes on pages : offline_circ/process_koc.pl tools/batchMod-edit.pl tools/batch_record_modification.pl tools/manage-marc-import.pl tools/stage-marc-import.pl tools/upload-images.pl -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17240 --- Comment #20 from Fridolin SOMERS <fridolin.somers@biblibre.com> --- Created attachment 76479 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=76479&action=edit Bug 17240: (followup 1) Allow processes that rely on background jobs run in Plack mode Followup If not running in background mode, some calls are made on $job var. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17240 --- Comment #21 from Fridolin SOMERS <fridolin.somers@biblibre.com> --- Created attachment 76480 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=76480&action=edit Bug 17240: (followup 2) Allow processes that rely on background jobs run in Plack mode Followup 2 If not running in background mode, some calls are made on $job var in tools/batch_record_modification.pl. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17240 --- Comment #22 from Fridolin SOMERS <fridolin.somers@biblibre.com> --- Created attachment 76481 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=76481&action=edit Bug 17240: (followup 3) Allow processes that rely on background jobs run in Plack mode Followup 3 If not running in background mode, items are not displayed in result page in tools/batchMod.pl. Also the number of items and fields are missing in message. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17240 --- Comment #23 from Fridolin SOMERS <fridolin.somers@biblibre.com> --- Created attachment 76482 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=76482&action=edit Bug 17240: (followup 4) Allow processes that rely on background jobs run in Plack mode Items batch deletion failed because after action, unlike batch modification, items are not displayed so code must not call BuildItemsData(). -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17240 Fridolin SOMERS <fridolin.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- See Also| |https://bugs.koha-community | |.org/bugzilla3/show_bug.cgi | |?id=18806 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17240 Fridolin SOMERS <fridolin.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- See Also| |https://bugs.koha-community | |.org/bugzilla3/show_bug.cgi | |?id=21818 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17240 Josef Moravec <josef.moravec@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |josef.moravec@gmail.com -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17240 Fridolin SOMERS <fridolin.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- See Also| |https://bugs.koha-community | |.org/bugzilla3/show_bug.cgi | |?id=8437 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17240 David Cook <dcook@prosentient.com.au> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |dcook@prosentient.com.au --- Comment #24 from David Cook <dcook@prosentient.com.au> --- (In reply to Marcel de Rooy from comment #9)
We should probably remove all fork calls. Resolve it with an ajax call (like the upload in one of these scripts) or via a queue serviced by some daemon. In general, it seems better to prevent starting jobs directly by the web interface.
I totally agree. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17240 Fridolin Somers <fridolin.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|In Discussion |RESOLVED Resolution|--- |INVALID --- Comment #25 from Fridolin Somers <fridolin.somers@biblibre.com> --- Solved by Bug 22417 for example items edition Bug 28445 -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org