[Bug 33044] New: BackgroundJob enqueue does not return the job id if rabbit is unreachable
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33044 Bug ID: 33044 Summary: BackgroundJob enqueue does not return the job id if rabbit is unreachable Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: NEW Severity: major Priority: P5 - low Component: Architecture, internals, and plumbing Assignee: koha-bugs@lists.koha-community.org Reporter: nick@bywatersolutions.com QA Contact: testopia@bugs.koha-community.org Some sites elect to use the worker without rabbit This largely works, however, when a job is enqueued we don't return the job_id unless our connection was successful - this leads to the enqueued result page not providing a correct link, even though the job will be processed by DB polling To recreate: 1 - In KTD: sudo service rabbitmq-server stop 2 - sudo koha-worker --stop kohadev; sudo koha-worker --queue long_tasks --stop kohadev 3 - In staff client enqueue a batch item modification - note the link to view the enqueued job has no id in the url and takes you to the main background jobs viewer -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33044 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Patch complexity|--- |Trivial patch Status|NEW |Needs Signoff -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33044 --- Comment #1 from Nick Clemens <nick@bywatersolutions.com> --- Created attachment 147178 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=147178&action=edit Bug 33044: Return job id if there is no connection to rabbit This patch simply ensures we returnt he job id even if we don't send the job to rabbit To test: 1 - In KTD: sudo service rabbitmq-server stop 2 - sudo koha-worker --stop kohadev; sudo koha-worker --queue long_tasks --stop kohadev 3 - In staff client enqueue a batch item modification - note the link to view the enqueued job has no id in the url and takes you to the main background jobs viewer 4 - Apply patch 5 - Restart all 6 - Enqueue a new batch item modification 7 - Confirm the link works and has the correct id -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33044 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33044 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #147178|0 |1 is obsolete| | --- Comment #2 from David Nind <david@davidnind.com> --- Created attachment 147670 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=147670&action=edit Bug 33044: Return job id if there is no connection to rabbit This patch simply ensures we returnt he job id even if we don't send the job to rabbit To test: 1 - In KTD: sudo service rabbitmq-server stop 2 - sudo koha-worker --stop kohadev; sudo koha-worker --queue long_tasks --stop kohadev 3 - In staff client enqueue a batch item modification - note the link to view the enqueued job has no id in the url and takes you to the main background jobs viewer 4 - Apply patch 5 - Restart all 6 - Enqueue a new batch item modification 7 - Confirm the link works and has the correct id Signed-off-by: David Nind <david@davidnind.com> -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33044 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|koha-bugs@lists.koha-commun |nick@bywatersolutions.com |ity.org | CC| |m.de.rooy@rijksmuseum.nl Status|Signed Off |BLOCKED QA Contact|testopia@bugs.koha-communit |m.de.rooy@rijksmuseum.nl |y.org | --- Comment #3 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- Looking here -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33044 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #147670|0 |1 is obsolete| | --- Comment #4 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- Created attachment 147682 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=147682&action=edit Bug 33044: Return job id if there is no connection to rabbit This patch simply ensures we return the job id even if we couldn't send the job to rabbit. To test: 1 - In KTD: sudo service rabbitmq-server stop 2 - sudo koha-worker --stop kohadev; sudo koha-worker --queue long_tasks --stop kohadev 3 - In staff client enqueue a batch item modification - note the link to view the enqueued job has no id in the url and takes you to the main background jobs viewer 4 - Run t/db_dependent/Koha/BackgroundJob.t and notice that it fails. 5 - Apply patch 6 - Restart all 7 - Enqueue a new batch item modification 8 - Confirm the link works and has the correct id 9 - Run t/db_dependent/Koha/BackgroundJob.t; it should pass now. Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Marcel de Rooy <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=33044 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |dcook@prosentient.com.au, | |jonathan.druart+koha@gmail. | |com, | |katrin.fischer@bsz-bw.de, | |kyle@bywatersolutions.com, | |martin.renvoize@ptfs-europe | |.com, tomascohen@gmail.com Status|BLOCKED |Passed QA --- Comment #5 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- The patch is simple and works. But I feel that we are on the crossroad here: Should we facilitate working without rabbitmq any further? Should we put more time in getting it stable in Koha? Is the plugin we use the cause of that? Bad configuration? Many people run it and it should be able to handle millions of messages.. The volume of messages in Koha is not expected to be that large. The hybrid solution for background jobs feels like 'suboptimal' design to me. The current state allows for strange sync issues: you can submit jobs without rabbitmq; if the worker is running and rabbit is not, they will be picked up. If the worker was not running, and you restart rabbit and worker, these jobs will be ignored since they are not in rabbit. PQA could have been In discussion too :) -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33044 --- Comment #6 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- Just for reference about connectivity issues: https://www.rabbitmq.com/heartbeats.html -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33044 --- Comment #7 from David Cook <dcook@prosentient.com.au> --- (In reply to Marcel de Rooy from comment #5)
The patch is simple and works. But I feel that we are on the crossroad here: Should we facilitate working without rabbitmq any further?
Imho, we should focus on it just working with rabbitmq.
Should we put more time in getting it stable in Koha? Is the plugin we use the cause of that? Bad configuration? Many people run it and it should be able to handle millions of messages.. The volume of messages in Koha is not expected to be that large.
I'm curious about this as well. I use RabbitMQ for a different system and I process hundreds of thousands of messages a day (usually in bursts of several per second) with zero problems. I do use the AMQP for that one instead of the STOMP but I'm not sure what people's problem with RabbitMQ is... -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33044 --- Comment #8 from Nick Clemens <nick@bywatersolutions.com> --- (In reply to David Cook from comment #7)
(In reply to Marcel de Rooy from comment #5) Imho, we should focus on it just working with rabbitmq.
I agree, Rabbit should be the focus, but as long as this code is still there, we should make it work :-)
Should we put more time in getting it stable in Koha? Is the plugin we use the cause of that? Bad configuration? Many people run it and it should be able to handle millions of messages.. The volume of messages in Koha is not expected to be that large. I'm curious about this as well. I use RabbitMQ for a different system and I process hundreds of thousands of messages a day (usually in bursts of several per second) with zero problems.
I think we are much closer - with the initial implementation we had may problems in production (connection failing, jobs being lost, things getting 'stuck') so we went back to using the DB polling
I do use the AMQP for that one instead of the STOMP but I'm not sure what people's problem with RabbitMQ is...
Our goal is to run rabbit in production, and we are working on moving all the bugs to address our issues forward too. We are waiting for the next stable release, and then will begin switching back and seeing how things go -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33044 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Version(s)| |23.05.00 released in| | Status|Passed QA |Pushed to master -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33044 --- Comment #9 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Pushed to master for 23.05. Nice work everyone, thanks! -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33044 Michael Adamyk <madamyk@ckls.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |madamyk@ckls.org -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33044 --- Comment #10 from David Cook <dcook@prosentient.com.au> --- (In reply to Nick Clemens from comment #8)
Our goal is to run rabbit in production, and we are working on moving all the bugs to address our issues forward too. We are waiting for the next stable release, and then will begin switching back and seeing how things go
Certainly grateful for Bywater kicking the tires/tyres! -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33044 Jacob O'Mara <jacob.omara@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to master |Pushed to stable Version(s)|23.05.00 |23.05.00,22.11.04 released in| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33044 --- Comment #11 from Jacob O'Mara <jacob.omara@ptfs-europe.com> --- Nice work, thanks everyone! Pushed to 22.11.x for the next release. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33044 Lucas Gass <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |lucas@bywatersolutions.com Version(s)|23.05.00,22.11.04 |23.05.00,22.11.04,22.05.11 released in| | Status|Pushed to stable |Pushed to oldstable --- Comment #12 from Lucas Gass <lucas@bywatersolutions.com> --- Backported to 22.05.x for upcoming 22.05.11 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33044 Arthur Suzuki <arthur.suzuki@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to oldstable |RESOLVED Resolution|--- |FIXED CC| |arthur.suzuki@biblibre.com Version(s)|23.05.00,22.11.04,22.05.11 |23.05.00,22.11.04,22.05.11, released in| |21.11.19 --- Comment #13 from Arthur Suzuki <arthur.suzuki@biblibre.com> --- applied to 21.11 for 21.11.19 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33044 wainuiwitikapark@catalyst.net.nz changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |wainuiwitikapark@catalyst.n | |et.nz --- Comment #14 from wainuiwitikapark@catalyst.net.nz --- Not backported to 21.05.x -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33044 Michael Adamyk <madamyk@ckls.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC|madamyk@ckls.org | -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org