[Bug 17814] New: koha-plack --stop should make sure that Plack really stop
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17814 Bug ID: 17814 Summary: koha-plack --stop should make sure that Plack really stop Change sponsored?: --- Product: Koha Version: 16.11 Hardware: All OS: All Status: NEW Severity: enhancement Priority: P5 - low Component: Architecture, internals, and plumbing Assignee: gmcharlt@gmail.com Reporter: pongtawat@punsarn.asia QA Contact: testopia@bugs.koha-community.org koha-plack --stop doesn't ensure that Plack was really stopped before returning. So in case that koha-plack --stop was quickly follows by koha-plack --start (e.g. logrotate), it could leave Plack in stop state. This is due to koha-plack --start think that Plack was already started, while it actually is being stopped. For me I think this is the cause why I got random Plack stop when logrotate is run. It should be similar to the case of Zebra in Bug #16885, and the solution might be the same: adding "--retry=TERM/30/KILL/5;" to start-stop-daemon command. I just try that on our server and will see if the problem goes away. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17814 --- Comment #1 from Pongtawat <pongtawat@punsarn.asia> --- Created attachment 58427 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=58427&action=edit Unverified patch A simple patch follows that in #16885. If it work there, it should work here too. But not yet verified. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17814 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=17814 Magnus Enger <magnus@libriotech.no> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |magnus@libriotech.no --- Comment #2 from Magnus Enger <magnus@libriotech.no> --- Should this be "Needs signoff"? Or is it too early yet? -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17814 Barton Chittenden <barton@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |barton@bywatersolutions.com --- Comment #3 from Barton Chittenden <barton@bywatersolutions.com> --- I think that --restart also has this issue. Here's a paste from a recent restart: sudo koha-plack --restart glenoaks [....] Restarting Plack daemon for glenoaks:[....] Stopping Plack daemon for gle[ ok :. [FAIL] Error: Plack already running for glenoaks: failed! failed! -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17814 --- Comment #4 from Pongtawat <pongtawat@punsarn.asia> --- Won't --restart work properly if stop work properly?
From the code, it seems that --restart just call stop and then start.
-- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17814 --- Comment #5 from Pongtawat <pongtawat@punsarn.asia> --- TEST PLAN --------- 1) Login to staff client and do something that will hold connection for a long time, e.g. a batch import or a slow report. 2) sudo koha-plack --stop mykoha 3) ps aux | grep plack <-- a Plack process will still running work in 1) 4) wait for 1) to finish and all Plack processes exit 5) sudo koha-plack --start mykoha 6) apply the patch 7) repeat step 1)-2) 8) ps aux | grep plack <-- There should be no Plack process running now 9) Note that work in step 1) might get terminated midway. Since we force Plack to stop after some wait. Alternatively, I think we can test with --restart too. Before patch, it should behave like in comment 3. After patch, it should restart properly. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17814 Pongtawat <pongtawat@punsarn.asia> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |Needs Signoff --- Comment #6 from Pongtawat <pongtawat@punsarn.asia> --- With this patch, I'm running without problem for a month. So, just hope this get merged in. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17814 Pongtawat <pongtawat@punsarn.asia> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #58427|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=17814 --- Comment #7 from Pongtawat <pongtawat@punsarn.asia> --- Created attachment 61845 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=61845&action=edit Add retry to koha-plack stop -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17814 Marc Véron <veron@veron.ch> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |veron@veron.ch -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17814 Marc Véron <veron@veron.ch> changed: What |Removed |Added ---------------------------------------------------------------------------- See Also| |https://bugs.koha-community | |.org/bugzilla3/show_bug.cgi | |?id=16885 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17814 --- Comment #8 from Marc Véron <veron@veron.ch> --- Created attachment 61927 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=61927&action=edit Bug 17814: koha-plack --stop should make sure that Plack really stop Followed test plan in comment #5. Signed-off-by: Marc Véron <veron@veron.ch> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17814 Marc Véron <veron@veron.ch> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #61845|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=17814 Marc Véron <veron@veron.ch> 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=17814 Marc Véron <veron@veron.ch> 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=17814 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=17814 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #61927|0 |1 is obsolete| | --- Comment #9 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Created attachment 62421 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=62421&action=edit Bug 17814: koha-plack --stop should make sure that Plack really stop koha-plack --stop doesn't ensure that Plack was really stopped before returning So in case that koha-plack --stop was quickly follows by koha-plack --start (e.g. logrotate), it could leave Plack in stop state. This is due to koha-plack --start think that Plack was already started, while it actually is being stopped. For me I think this is the cause why I got random Plack stop when logrotate is run. It should be similar to the case of Zebra in Bug #16885, and the solution might be the same: adding "--retry=TERM/30/KILL/5;" to start-stop-daemon command. TEST PLAN --------- 1) Login to staff client and do something that will hold connection for a long time, e.g. a batch import or a slow report. 2) sudo koha-plack --stop mykoha 3) ps aux | grep plack <-- a Plack process will still running work in 1) 4) wait for 1) to finish and all Plack processes exit 5) sudo koha-plack --start mykoha 6) apply the patch 7) repeat step 1)-2) 8) ps aux | grep plack <-- There should be no Plack process running now 9) Note that work in step 1) might get terminated midway. Since we force Plack to stop after some wait. Signed-off-by: Marc Véron <veron@veron.ch> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17814 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Version|16.11 |master CC| |jonathan.druart@bugs.koha-c | |ommunity.org Severity|enhancement |normal -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17814 Kyle M Hall <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |kyle@bywatersolutions.com Status|Passed QA |Pushed to Master --- Comment #10 from Kyle M Hall <kyle@bywatersolutions.com> --- Pushed to master for 17.05, thanks Pongtawat! -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17814 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|gmcharlt@gmail.com |pongtawat@punsarn.asia CC| |katrin.fischer@bsz-bw.de --- Comment #11 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Thx Pongtawat! -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17814 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to Master |Pushed to Stable --- Comment #12 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- This patch has been pushed to 16.11.x and will be in 16.11.07. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17814 Mason James <mtj@kohaaloha.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |mtj@kohaaloha.com --- Comment #13 from Mason James <mtj@kohaaloha.com> --- Pushed to 16.05.x, for 16.05.12 release -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17814 Julian Maurice <julian.maurice@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |julian.maurice@biblibre.com --- Comment #14 from Julian Maurice <julian.maurice@biblibre.com> --- Pushed to 3.22.x for 3.22.21 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17814 Marc Véron <veron@veron.ch> changed: What |Removed |Added ---------------------------------------------------------------------------- See Also| |https://bugs.koha-community | |.org/bugzilla3/show_bug.cgi | |?id=18998 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17814 John Sterbenz <jsterben@umich.edu> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jsterben@umich.edu -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17814 David Cook <dcook@prosentient.com.au> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |31348 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31348 [Bug 31348] Plack stop should be graceful -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org